mirror of
https://github.com/LingChair/LingChair-V0.git
synced 2025-12-08 01:55:50 +08:00
chore: 0.7.1 released
This commit is contained in:
@@ -263,7 +263,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mdui-dialog-content" style="margin-left:15px;margin-right:15px;">
|
<div class="mdui-dialog-content" style="margin-left:15px;margin-right:15px;">
|
||||||
<div class="mdui-textfield">
|
<div class="mdui-textfield">
|
||||||
<label class="mdui-textfield-label">好友/群的ID (不是名称)</label>
|
<label class="mdui-textfield-label">账号/群的ID (不是名称)</label>
|
||||||
<input n-id="dialogNewContactID" class="mdui-textfield-input" maxlength="30" type="text" />
|
<input n-id="dialogNewContactID" class="mdui-textfield-input" maxlength="30" type="text" />
|
||||||
</div>
|
</div>
|
||||||
<select class="mdui-select" mdui-select="{position: 'top'}" n-id="dialogNewContactType">
|
<select class="mdui-select" mdui-select="{position: 'top'}" n-id="dialogNewContactType">
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ const UrlArgs = new URL(location.href).searchParams
|
|||||||
|
|
||||||
// https://www.ruanyifeng.com/blog/2021/09/detecting-mobile-browser.html
|
// https://www.ruanyifeng.com/blog/2021/09/detecting-mobile-browser.html
|
||||||
function isMobile() {
|
function isMobile() {
|
||||||
return ('ontouchstart' in document.documentElement);
|
return ('ontouchstart' in document.documentElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setOnRightClick(e, cb) {
|
function setOnRightClick(e, cb) {
|
||||||
@@ -396,7 +396,7 @@ class ChatMsgAdapter {
|
|||||||
// 微机课闲的没事干玩玩 发现私聊会多发一个(一个是本地的, 另一个是发送成功的) 选择一个关掉就好了
|
// 微机课闲的没事干玩玩 发现私聊会多发一个(一个是本地的, 另一个是发送成功的) 选择一个关掉就好了
|
||||||
// 这里我选择服务端不发送回调, 不然多设备同步会吵死
|
// 这里我选择服务端不发送回调, 不然多设备同步会吵死
|
||||||
// 错了 应该是客户端少发条才对 不然不能多设备同步
|
// 错了 应该是客户端少发条才对 不然不能多设备同步
|
||||||
if (ChatMsgAdapter.target !== localStorage.userName && ChatMsgAdapter.type === "single") {
|
if ((ChatMsgAdapter.target !== localStorage.userName) && ChatMsgAdapter.type === "single") {
|
||||||
let i = ChatMsgAdapter.isAtBottom()
|
let i = ChatMsgAdapter.isAtBottom()
|
||||||
await ChatMsgAdapter.addMsg(localStorage.userName, msg, re.data.time, re.data.msgid)
|
await ChatMsgAdapter.addMsg(localStorage.userName, msg, re.data.time, re.data.msgid)
|
||||||
if (i) ChatMsgAdapter.scrollToBottom()
|
if (i) ChatMsgAdapter.scrollToBottom()
|
||||||
@@ -555,7 +555,7 @@ class ChatMsgAdapter {
|
|||||||
// < 0 为窗口变大
|
// < 0 为窗口变大
|
||||||
// cnm的,调试十万次就你tm检测不到底是吧,就你语法天天错误是吧
|
// cnm的,调试十万次就你tm检测不到底是吧,就你语法天天错误是吧
|
||||||
// 欺负我现在用不了电脑
|
// 欺负我现在用不了电脑
|
||||||
top: -(ledi) * ( (ledi < 0 && this.isAtBottom()) ? 6 : -1 ), // (ledi < 0 ? 6 : 6),
|
top: -(ledi) * ((ledi < 0 && this.isAtBottom()) ? 6 : -1), // (ledi < 0 ? 6 : 6),
|
||||||
behavior: 'smooth'
|
behavior: 'smooth'
|
||||||
})
|
})
|
||||||
this.resizeDick = window.innerHeight
|
this.resizeDick = window.innerHeight
|
||||||
@@ -604,11 +604,13 @@ class ChatMsgAdapter {
|
|||||||
callback(self)
|
callback(self)
|
||||||
break
|
break
|
||||||
case 'mousedown':
|
case 'mousedown':
|
||||||
|
if (!isMobile()) return
|
||||||
listeners[self + ""] = setTimeout(() => {
|
listeners[self + ""] = setTimeout(() => {
|
||||||
callback(self)
|
callback(self)
|
||||||
}, 300) // 300颗够吗 应该够吧
|
}, 300) // 300颗够吗 应该够吧
|
||||||
break
|
break
|
||||||
case 'mouseup':
|
case 'mouseup':
|
||||||
|
if (!isMobile()) return
|
||||||
clearTimeout(listeners[self + ""])
|
clearTimeout(listeners[self + ""])
|
||||||
listeners[self + ""] = null
|
listeners[self + ""] = null
|
||||||
break
|
break
|
||||||
@@ -729,11 +731,13 @@ class User {
|
|||||||
if (i) ChatMsgAdapter.scrollToBottom()
|
if (i) ChatMsgAdapter.scrollToBottom()
|
||||||
}
|
}
|
||||||
|
|
||||||
let n = new 通知().setTitle("新消息 - " + await NickCache.getNick(a.target)).setMessage(a.msg.msg).setIcon(User.getUserHeadUrl(a.target)).show(async () => {
|
if (ChatMsgAdapter.target !== localStorage.userName) {
|
||||||
await ChatMsgAdapter.switchTo(a.target, a.type)
|
let n = new 通知().setTitle("" + await NickCache.getNick(a.target)).setMessage(a.msg.msg).setIcon(User.getUserHeadUrl(a.target)).show(async () => {
|
||||||
location.replace("#msgid_" + a.msg.msgid)
|
await ChatMsgAdapter.switchTo(a.target, a.type)
|
||||||
n.close()
|
location.replace("#msgid_" + a.msg.msgid)
|
||||||
})
|
n.close()
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
static async openProfileDialog(name) {
|
static async openProfileDialog(name) {
|
||||||
|
|||||||
Reference in New Issue
Block a user