diff --git a/electron-builder.yml b/electron-builder.yml
index e2c85a91..0e2846fa 100644
--- a/electron-builder.yml
+++ b/electron-builder.yml
@@ -30,8 +30,8 @@ win:
# macOS 配置
mac:
target:
- - { target: dmg, arch: x64 }
- { target: dmg, arch: arm64 }
+ - { target: dmg, arch: x64 }
entitlementsInherit: build/entitlements.mac.plist
icon: build/icon-client-mac.icns
darkModeSupport: true
@@ -55,14 +55,14 @@ linux:
- { target: tar.gz, arch: arm64 }
maintainer: Stapx Steve [林槐]
vendor: Stapxs Steve Team
- synopsis: 一个兼容 OneBot 的非官方网页版 QQ 客户端。
+ synopsis: 一个兼容 OneBot 协议的非官方 QQ 全平台客户端实现。
category: Network
mimeTypes: [ application/x-stapxs-qq-lite ]
desktop:
Type: Application
Name: Stapxs QQ Lite
GenericName: Stapxs QQ Lite Electron 客户端
- Comment: 一个兼容 OneBot 的非官方网页版 QQ 客户端。
+ Comment: 一个兼容 OneBot 协议的非官方 QQ 全平台客户端实现。
Terminal: false
Category: Network
Icon: stapxs-qq-lite
diff --git a/package.json b/package.json
index aaa5f2f6..70d5b5d2 100644
--- a/package.json
+++ b/package.json
@@ -1,9 +1,9 @@
{
"name": "stapxs-qq-lite",
- "version": "3.0.5",
+ "version": "3.0.6",
"private": false,
"author": "Stapx Steve [林槐]",
- "description": "一个兼容 OneBot 协议的非官方 QQ 全平台客户端实现",
+ "description": "一个兼容 OneBot 协议的非官方 QQ 全平台客户端实现。",
"homepage": "http://github.com/Stapxs/Stapxs-QQ-Lite-2.0",
"license": "Apache-2.0",
"main": "./out/main/index.js",
diff --git a/scripts/clear-dist.sh b/scripts/clear-dist.sh
index 966af440..6740dcfa 100644
--- a/scripts/clear-dist.sh
+++ b/scripts/clear-dist.sh
@@ -1,11 +1,18 @@
dirs=(
+ # web
"dist"
+ "stats.html"
+ # electron
+ "out"
"dist_electron"
+ # capacitor
"dist_capacitor"
- "out"
+ # npx
"ssqq.npx-web-quick-start/bin"
"ssqq.npx-web-quick-start/node_modules"
- "stats.html"
+ # android
+ "src/mobile/android/app/release"
+ "src/mobile/android/app/debug"
)
for dir in ${dirs[@]}; do
diff --git a/src/mobile/android/app/app.properties b/src/mobile/android/app/app.properties
index 065490f2..d70c792d 100644
--- a/src/mobile/android/app/app.properties
+++ b/src/mobile/android/app/app.properties
@@ -1,2 +1,2 @@
-versionName=3.0.5
-versionCode=3000005
\ No newline at end of file
+versionName=3.0.6
+versionCode=3000006
\ No newline at end of file
diff --git a/src/mobile/ios/App/App/Info.plist b/src/mobile/ios/App/App/Info.plist
index 7748b9fa..9fca39ed 100644
--- a/src/mobile/ios/App/App/Info.plist
+++ b/src/mobile/ios/App/App/Info.plist
@@ -17,9 +17,9 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 3.0.5
+ 3.0.6
CFBundleVersion
- 3.0.5
+ 3.0.6
LSRequiresIPhoneOS
UILaunchStoryboardName
diff --git a/src/mobile/ios/App/Settings.bundle/Root.plist b/src/mobile/ios/App/Settings.bundle/Root.plist
index 2b759fc5..774c6d49 100644
--- a/src/mobile/ios/App/Settings.bundle/Root.plist
+++ b/src/mobile/ios/App/Settings.bundle/Root.plist
@@ -24,7 +24,7 @@
Key
version
DefaultValue
- 3.0.5
+ 3.0.6
IsSecure
KeyboardType
diff --git a/src/renderer/src/App.vue b/src/renderer/src/App.vue
index 1f938630..a72ce428 100644
--- a/src/renderer/src/App.vue
+++ b/src/renderer/src/App.vue
@@ -95,7 +95,12 @@
{
- return 'undefined'
+ window.moYu = () => { return '\x75\x6e\x64\x65\x66\x69\x6e\x65\x64' }
+ window.onbeforeunload = () => {
+ if (runtimeData.tags.isElectron) {
+ Connector.close()
+ }
}
// 页面加载完成后
window.onload = async () => {
@@ -644,8 +652,6 @@ export default defineComponent({
'getGroupMemberList',
)
}
- // 刷新系统消息
- Connector.send('get_system_msg', {}, 'getSystemMsg')
// 清理通知
if (runtimeData.plantform.reader) {
diff --git a/src/renderer/src/assets/css/append/append_new.css b/src/renderer/src/assets/css/append/append_new.css
index 89941f00..59222eba 100644
--- a/src/renderer/src/assets/css/append/append_new.css
+++ b/src/renderer/src/assets/css/append/append_new.css
@@ -286,11 +286,11 @@ body {
font-size: 0.7rem;
}
.contributors-card > div > div {
- min-width: 25px;
- min-height: 25px;
- margin-top: 5px;
- margin-bottom: 5px;
+ min-width: calc(20% - 10px);
+ aspect-ratio: 1;
+ margin: 5px;
}
+
.contributors-card {
width: calc(100% - 20px);
min-height: 0;
diff --git a/src/renderer/src/assets/css/options.css b/src/renderer/src/assets/css/options.css
index 9dcdba6b..cfd055a0 100644
--- a/src/renderer/src/assets/css/options.css
+++ b/src/renderer/src/assets/css/options.css
@@ -158,25 +158,25 @@
flex-wrap: wrap;
display: flex;
align-items: center;
- justify-content: space-between;
+ width: 100%;
}
.contributors-card > div > div {
+ min-width: calc(20% - 20px);
+ aspect-ratio: 1;
+ margin: 10px;
background-size: 100%;
border-radius: 35px;
- margin-right: 10px;
- min-height: 35px;
- min-width: 35px;
- margin-top: 10px;
- margin-bottom: 10px;
cursor: pointer;
}
.contributors-card > div > div.me {
outline: 2px solid var(--color-main);
border: 1px solid var(--color-card-1);
+ box-sizing: border-box;
}
.contributors-card > div > div.super-thanks {
outline: 2px dashed var(--color-main);
border: 1px solid var(--color-card-1);
+ box-sizing: border-box;
}
.opt-tab {
diff --git a/src/renderer/src/assets/l10n/zh-CAT.po b/src/renderer/src/assets/l10n/zh-CAT.po
index f24edb18..d3638908 100644
--- a/src/renderer/src/assets/l10n/zh-CAT.po
+++ b/src/renderer/src/assets/l10n/zh-CAT.po
@@ -119,12 +119,6 @@ msgstr "喵喵喵喵喵!"
msgid "开发者选项"
msgstr "工程喵选项"
-msgid "通知所有新消息"
-msgstr "通知左右新喵喵"
-
-msgid "让暴风雨来得更猛烈些吧!"
-msgstr "让喵喵风暴来得更猛烈些吧!"
-
msgid "好嘛 …… 不烦你 ……"
msgstr "不可以喵喵!"
diff --git a/src/renderer/src/assets/l10n/zh-CN.po b/src/renderer/src/assets/l10n/zh-CN.po
index c2ed9d29..1a20f3a6 100644
--- a/src/renderer/src/assets/l10n/zh-CN.po
+++ b/src/renderer/src/assets/l10n/zh-CN.po
@@ -246,10 +246,10 @@ msgstr ""
msgid "ReferenceError: moYu is not defined"
msgstr ""
-msgid "通知所有新消息"
+msgid "关闭群收纳盒"
msgstr ""
-msgid "让暴风雨来得更猛烈些吧!"
+msgid "全都放出来!全都放出来!"
msgstr ""
msgid "禁用通知"
@@ -834,7 +834,7 @@ msgstr ""
msgid "确定要退出群聊吗?"
msgstr ""
-msgid "留言"
+msgid "留言:"
msgstr ""
msgid "请求加为好友"
@@ -991,10 +991,10 @@ msgid "别划了别划了被看见了啦"
msgstr ""
msgid "[有人@你]"
-msgstr ""
+msgstr "[有人{'@'}你]"
msgid "[@全体]"
-msgstr ""
+msgstr "[{'@'}全体]"
msgid "[特別关心]"
msgstr ""
diff --git a/src/renderer/src/assets/l10n/zh-TW.po b/src/renderer/src/assets/l10n/zh-TW.po
index 23d2a133..6512a97a 100644
--- a/src/renderer/src/assets/l10n/zh-TW.po
+++ b/src/renderer/src/assets/l10n/zh-TW.po
@@ -246,11 +246,11 @@ msgstr "基本"
msgid "ReferenceError: moYu is not defined"
msgstr "ReferenceError: moYu is not defined"
-msgid "通知所有新消息"
-msgstr "通知所有新訊息"
+msgid "关闭群收纳盒"
+msgstr ""
-msgid "让暴风雨来得更猛烈些吧!"
-msgstr "讓暴風雨來得更猛烈些吧!"
+msgid "全都放出来!全都放出来!"
+msgstr ""
msgid "禁用通知"
msgstr "停用通知"
@@ -834,7 +834,7 @@ msgstr ""
msgid "确定要退出群聊吗?"
msgstr ""
-msgid "留言"
+msgid "留言:"
msgstr ""
msgid "请求加为好友"
diff --git a/src/renderer/src/assets/l10n/zh-YUE.po b/src/renderer/src/assets/l10n/zh-YUE.po
index aa862ab5..f6e46ff4 100644
--- a/src/renderer/src/assets/l10n/zh-YUE.po
+++ b/src/renderer/src/assets/l10n/zh-YUE.po
@@ -246,11 +246,11 @@ msgstr "Info"
msgid "ReferenceError: moYu is not defined"
msgstr "小心老闆叫你 OT debug 囉"
-msgid "通知所有新消息"
-msgstr "通知所有訊息"
+msgid "关闭群收纳盒"
+msgstr ""
-msgid "让暴风雨来得更猛烈些吧!"
-msgstr "電 腦 大 爆 炸!!!"
+msgid "全都放出来!全都放出来!"
+msgstr ""
msgid "禁用通知"
msgstr "停用通知"
@@ -834,7 +834,7 @@ msgstr ""
msgid "确定要退出群聊吗?"
msgstr ""
-msgid "留言"
+msgid "留言:"
msgstr ""
msgid "请求加为好友"
diff --git a/src/renderer/src/function/connect.ts b/src/renderer/src/function/connect.ts
index d13917b8..3c9d1170 100644
--- a/src/renderer/src/function/connect.ts
+++ b/src/renderer/src/function/connect.ts
@@ -77,9 +77,9 @@ export class Connector {
sse.onmessage = (e) => {
this.onmessage(e.data)
}
- sse.onerror = (e) => {
+ sse.onerror = () => {
login.creating = false
- popInfo.add(PopType.ERR, $t('连接失败') + ': ' + e.type, false)
+ popInfo.add(PopType.ERR, $t('连接不稳定'))
return
}
return
@@ -209,11 +209,13 @@ export class Connector {
break
}
default: {
+ login.creating = false
popInfo.add(PopType.ERR, $t('连接失败') + ': ' + code, false)
}
}
logger.error(null, $t('连接失败') + ': ' + code)
+ login.creating = false
login.status = false
}
diff --git a/src/renderer/src/function/msg.ts b/src/renderer/src/function/msg.ts
index 7f4ae455..9bf61e4c 100644
--- a/src/renderer/src/function/msg.ts
+++ b/src/renderer/src/function/msg.ts
@@ -907,13 +907,6 @@ const msgFunctons = {
}
},
- /**
- * 保存系统消息
- */
- getSystemMsg: (_: string, msg: { [key: string]: any }) => {
- runtimeData.systemNoticesList = msg.data
- },
-
/**
* 获取发送的消息(消息发送后处理)
* @deprecated 功能已被遗弃,暂时保留方法
@@ -1471,9 +1464,10 @@ function newMsg(_: string, data: any) {
if (data.detail_type == 'guild') {
return
}
- // 获取一些基础信息
+
const infoList = getMsgData('message_info', data, msgPath.message_info)
if (infoList != undefined) {
+ // 消息基础信息 ============================================
const info = infoList[0]
const id = info.group_id ?? info.private_id
const loginId = runtimeData.loginInfo.uin
@@ -1485,6 +1479,7 @@ function newMsg(_: string, data: any) {
})
const isImportant = senderInfo?.class_id == 9999
+ // 预发送消息填充 ============================================
// 列表内最近的一条 fake_msg(倒序查找)
let fakeIndex = -1
for (let i = runtimeData.messageList.length - 1; i > 0; i--) {
@@ -1512,10 +1507,12 @@ function newMsg(_: string, data: any) {
runtimeData.messageList[fakeIndex].fake_msg = undefined
runtimeData.messageList[fakeIndex].revoke = false
}
+ // 移除最顶端的一条消息以被动刷新整个列表
+ runtimeData.messageList.shift()
return
}
- // 显示消息
+ // 显示消息 ============================================
if (id === showId || info.target_id == showId) {
// 保存消息
saveMsg(buildMsgList([data]), 'bottom')
@@ -1561,6 +1558,68 @@ function newMsg(_: string, data: any) {
)
data = list[0]
}
+
+ // 通知判定预处理 ============================================
+ // 对于其他不在消息里标记 atme、atall 的处理
+ if (data.atme == undefined || data.atall == undefined) {
+ data.message.forEach((item: any) => {
+ if (item.type == 'at' && item.qq == loginId) {
+ data.atme = true
+ }
+ })
+ }
+ // 临时会话名字的特殊处理
+ if (data.sub_type === 'group') {
+ data.sender.nickname = data.sender.user_id
+ }
+ // 检查群组有没有开启通知
+ let isGroupNotice = false
+ if (data.message_type === 'group') {
+ const noticeInfo = Option.get('notice_group') ?? {}
+ const list = noticeInfo[runtimeData.loginInfo.uin]
+ if (list) {
+ isGroupNotice = list.indexOf(id) >= 0
+ }
+ }
+
+ // 群收纳箱 ============================================
+ if(!runtimeData.sysConfig.bubble_sort_user) {
+ // 刷新群收纳箱列表
+ const getGroup = runtimeData.groupAssistList.filter((item, index) => {
+ if (Number(id) === item.group_id) {
+ runtimeData.groupAssistList[index].message_id = data.message_id
+ const name = data.sender.card && data.sender.card !== ''? data.sender.card: data.sender.nickname
+ runtimeData.groupAssistList[index].raw_msg = name + ': ' + getMsgRawTxt(data)
+ runtimeData.groupAssistList[index].raw_msg_base = getMsgRawTxt(data)
+ runtimeData.groupAssistList[index].time = getViewTime(Number(data.time))
+
+ // 重新排序
+ const newList = orderOnMsgList(runtimeData.groupAssistList)
+ runtimeData.groupAssistList = newList
+ return true
+ }
+ return false
+ })
+ // ( 如果 是群组消息 && 群组没有开启通知 && 不是置顶的 ) 这种情况下将群消息添加到群收纳盒中
+ if (getGroup.length != 1 && data.message_type === 'group' && !isGroupNotice) {
+ const getList = runtimeData.userList.filter((item) => {
+ return item.group_id === id
+ })
+ if (getList.length === 1) {
+ const showGroup = getList[0]
+ if (!showGroup.always_top) {
+ const formatted = formatMessageData(data, true)
+ Object.assign(showGroup, formatted)
+ runtimeData.groupAssistList.push(showGroup)
+ // 重新排序
+ const newList = orderOnMsgList(runtimeData.groupAssistList)
+ runtimeData.groupAssistList = newList
+ }
+ }
+ }
+ }
+
+ // 消息列表 ============================================
// 刷新消息列表
const get = runtimeData.onMsgList.filter((item, index) => {
if (
@@ -1580,6 +1639,11 @@ function newMsg(_: string, data: any) {
runtimeData.onMsgList[index].time = getViewTime(
Number(data.time),
)
+ if(id != showId) {
+ if(data.atme) { runtimeData.onMsgList[index].highlight = $t('[有人@你]') }
+ if(data.atall) { runtimeData.onMsgList[index].highlight = $t('[@全体]') }
+ if(isImportant) { runtimeData.onMsgList[index].highlight = $t('[特別关心]') }
+ }
// 重新排序列表
const newList = orderOnMsgList(runtimeData.onMsgList)
@@ -1588,54 +1652,36 @@ function newMsg(_: string, data: any) {
}
return false
})
- // 刷新群收纳箱列表
- const getGroup = runtimeData.groupAssistList.filter((item, index) => {
- if (Number(id) === item.group_id) {
- runtimeData.groupAssistList[index].message_id = data.message_id
- const name = data.sender.card && data.sender.card !== ''? data.sender.card: data.sender.nickname
- runtimeData.groupAssistList[index].raw_msg = name + ': ' + getMsgRawTxt(data)
- runtimeData.groupAssistList[index].raw_msg_base = getMsgRawTxt(data)
- runtimeData.groupAssistList[index].time = getViewTime(Number(data.time))
-
- // 重新排序
- const newList = orderOnMsgList(runtimeData.groupAssistList)
- runtimeData.groupAssistList = newList
- return true
- }
- return false
- })
- // 对于其他不在消息里标记 atme、atall 的处理
- if (data.atme == undefined || data.atall == undefined) {
- data.message.forEach((item: any) => {
- if (item.type == 'at' && item.qq == loginId) {
- data.atme = true
+ // 如果禁用了群收纳箱,将群消息添加到消息列表里
+ if(runtimeData.sysConfig.bubble_sort_user) {
+ if (get.length !== 1 && data.message_type === 'group') {
+ const getList = runtimeData.userList.filter((item) => {
+ return item.group_id === id
+ })
+ if (getList.length === 1) {
+ const showGroup = getList[0]
+ const formatted = formatMessageData(data, true)
+ Object.assign(showGroup, formatted)
+ runtimeData.onMsgList.push(showGroup)
+ // 重新排序列表
+ const newList = orderOnMsgList(runtimeData.onMsgList)
+ runtimeData.onMsgList = newList
}
- })
- }
- // 临时会话名字的特殊处理
- if (data.sub_type === 'group') {
- data.sender.nickname = data.sender.user_id
- }
- // 检查群组有没有开启通知
- let isGroupNotice = false
- if (data.message_type === 'group') {
- const noticeInfo = Option.get('notice_group') ?? {}
- const list = noticeInfo[runtimeData.loginInfo.uin]
- if (list) {
- isGroupNotice = list.indexOf(id) >= 0
}
}
+
+ // 通知判定 ============================================
// eslint-disable-next-line max-len
- // (发送者不是自己 && (在特别关心列表里 || 发送者不是群组 || 群组 AT || 群组 AT 全体 || 群组开启了通知 || 打开了通知全部消息)) 这些情况需要进行新消息处理
+ // (发送者不是自己 && (在特别关心列表里 || 发送者不是群组 || 开启了群组通知模式 || 群组 AT || 群组 AT 全体 || 群组开启了通知)) 这些情况需要进行新消息处理
if (
sender != loginId &&
sender != 0 &&
(isImportant ||
data.message_type !== 'group' ||
+ runtimeData.sysConfig.group_notice_type != 'none' ||
data.atme ||
data.atall ||
- isGroupNotice ||
- Option.get('notice_all') === true)
+ isGroupNotice)
) {
logger.add(LogType.DEBUG, '通知判定:', {
notShow: id !== showId,
@@ -1645,6 +1691,7 @@ function newMsg(_: string, data: any) {
})
// (发送者没有被打开 || 窗口没有焦点 || 窗口被最小化 || 在特别关心列表里) 这些情况需要进行消息通知
if (
+ runtimeData.sysConfig.group_notice_type == 'all' ||
id !== showId ||
!document.hasFocus() ||
document.hidden ||
@@ -1708,16 +1755,24 @@ function newMsg(_: string, data: any) {
const getList = runtimeData.userList.filter((item) => {
return item.user_id === id || item.group_id === id
})
- if (getList.length === 1) {
- const showUser = getList[0]
- const formatted = formatMessageData(data, data.message_type === 'group')
- Object.assign(showUser, formatted)
-
- if(data.atme) { showUser.highlight = $t('[有人@你]') }
- if(data.atall) { showUser.highlight = $t('[@全体]') }
- if(isImportant) { showUser.highlight = $t('[特別关心]') }
+ // 检查 onMsgList 里有没有这个人
+ const getOnMsg = runtimeData.onMsgList.filter((item) => {
+ return item.user_id === id || item.group_id === id
+ })
- runtimeData.onMsgList.push(showUser)
+ if (getList.length === 1) {
+ if(getOnMsg.length === 0) {
+ const showUser = getList[0]
+ const formatted = formatMessageData(data, data.message_type === 'group')
+ Object.assign(showUser, formatted)
+ runtimeData.onMsgList.push(showUser)
+ } else if(id != showId) {
+ // 显示特殊高亮提醒
+ const showUser = getOnMsg[0]
+ if(data.atme) { showUser.highlight = $t('[有人@你]') }
+ if(data.atall) { showUser.highlight = $t('[@全体]') }
+ if(isImportant) { showUser.highlight = $t('[特別关心]') }
+ }
}
}
}
@@ -1729,21 +1784,6 @@ function newMsg(_: string, data: any) {
}
})
}
-
- // ( 如果是群组消息 && 群组没有开启通知 && 不是置顶的 ) 这种情况下将群消息添加到群通知列表中
- if (getGroup.length != 1 && data.message_type === 'group' && !isGroupNotice) {
- const getList = runtimeData.userList.filter((item) => {
- return item.group_id === id
- })
- if(getList.length === 1) {
- const showGroup = getList[0]
- if(!showGroup.always_top) {
- const formatted = formatMessageData(data, true)
- Object.assign(showGroup, formatted)
- runtimeData.groupAssistList.push(showGroup)
- }
- }
- }
}
}
diff --git a/src/renderer/src/function/option.ts b/src/renderer/src/function/option.ts
index 6e2e3256..041166ee 100644
--- a/src/renderer/src/function/option.ts
+++ b/src/renderer/src/function/option.ts
@@ -26,6 +26,8 @@ import {
getPortableFileLang,
getTrueLang,
} from '@renderer/function/utils/systemUtil'
+import { orderOnMsgList } from './utils/msgUtil'
+import OptionFun from './option'
let cacheConfigs: { [key: string]: any }
@@ -42,6 +44,7 @@ const optDefault: { [key: string]: any } = {
chat_background_blur: 0,
msg_type: 2,
store_face: '[]',
+ group_notice_type: 'none',
}
// =============== 设置项事件 ===============
@@ -58,6 +61,43 @@ const configFunction: { [key: string]: (value: any) => void } = {
opt_revolve: viewRevolve,
opt_always_top: viewAlwaysTop,
opt_fast_animation: updateFarstAnimation,
+ bubble_sort_user: clearGroupAssist,
+}
+
+function clearGroupAssist(value: boolean) {
+ if(value) {
+ // 如果 GroupAssistList 里有东西,把它们全部挪到 OnMsgList 里然后清空
+ if (runtimeData.groupAssistList.length > 0) {
+ runtimeData.onMsgList.push(...runtimeData.groupAssistList)
+ runtimeData.groupAssistList = []
+ const newList = orderOnMsgList(runtimeData.onMsgList)
+ runtimeData.onMsgList = newList
+ }
+ } else {
+ // 将 onMsgList 中的非置顶、没有开启消息通知的群挪到 GroupAssistList 里
+ const noticeInfo = OptionFun.get('notice_group') ?? {}
+ const noticeGroupIdList = noticeInfo[runtimeData.loginInfo.uin]
+
+ const notTopGroupIdList = runtimeData.onMsgList.filter((item) => {
+ return !item.always_top && item.group_id
+ }).map((item) => {
+ return item.group_id
+ })
+
+ const groupAssistList = notTopGroupIdList.filter((item) => {
+ return !noticeGroupIdList.includes(item)
+ })
+
+ const newList = runtimeData.onMsgList.filter((item) => {
+ return groupAssistList.includes(item.group_id)
+ })
+ // 删除 onMsgList 中的这些群
+ runtimeData.onMsgList = runtimeData.onMsgList.filter((item) => {
+ return !groupAssistList.includes(item.group_id)
+ })
+ const sortedList = orderOnMsgList(newList)
+ runtimeData.groupAssistList = sortedList
+ }
}
function updateFarstAnimation(value: boolean) {
diff --git a/src/renderer/src/function/utils/appUtil.ts b/src/renderer/src/function/utils/appUtil.ts
index 9e5d05dd..0b8b1da5 100644
--- a/src/renderer/src/function/utils/appUtil.ts
+++ b/src/renderer/src/function/utils/appUtil.ts
@@ -173,8 +173,6 @@ export function reloadUsers() {
}
Connector.send(friendName, {}, 'getFriendList')
Connector.send(groupName, {}, 'getGroupList')
- // 获取系统消息
- Connector.send('get_system_msg', {}, 'getSystemMsg')
}
}
@@ -581,7 +579,11 @@ export async function loadMobile() {
case 'onopen': Connector.onopen(login.address, login.token); break
case 'onmessage': Connector.onmessage(data.data); break
case 'onclose': Connector.onclose(msg.code, msg.message, login.address, login.token); break
- case 'onerror': popInfo.add(PopType.ERR, $t('连接失败') + ': ' + msg.type, false); break
+ case 'onerror': {
+ login.creating = false
+ popInfo.add(PopType.ERR, $t('连接失败') + ': ' + msg.type, false);
+ break
+ }
case 'onServiceFound': setQuickLogin(msg.address, msg.port); break
default: break
}
diff --git a/src/renderer/src/pages/Chat.vue b/src/renderer/src/pages/Chat.vue
index 40258f31..6b456d91 100644
--- a/src/renderer/src/pages/Chat.vue
+++ b/src/renderer/src/pages/Chat.vue
@@ -1367,10 +1367,9 @@
if (
runtimeData.chatInfo.show.type != 'group' ||
data.sender.user_id === runtimeData.loginInfo.uin ||
- runtimeData.chatInfo.info.me_info.role ===
- 'member' ||
+ runtimeData.chatInfo.info.me_info.role === 'member' ||
selectUserType == 'owner' ||
- selectUserType == 'admin'
+ (selectUserType == 'admin' && runtimeData.chatInfo.info.me_info.role != 'owner')
) {
// 自己、私聊或者没有权限的时候不显示移除
this.tags.menuDisplay.remove = false
diff --git a/src/renderer/src/pages/Messages.vue b/src/renderer/src/pages/Messages.vue
index f7216a04..8e62a2af 100644
--- a/src/renderer/src/pages/Messages.vue
+++ b/src/renderer/src/pages/Messages.vue
@@ -259,8 +259,11 @@
).toString(),
)
}
+
// 判断一下群是否应该在群收纳盒内
- if(!this.showGroupAssist) {
+ if (!this.showGroupAssist &&
+ !runtimeData.sysConfig.bubble_sort_user
+ ) {
// 如果这个群没有开启通知并且不是置顶的,就移动到群收纳盒
if (
data.group_id &&
@@ -279,7 +282,7 @@
return data == get
})
runtimeData.onMsgList.splice(index, 1)
- if(!has) {
+ if (!has) {
runtimeData.groupAssistList.push(data)
}
// 打开群收纳盒
@@ -424,14 +427,17 @@
}
Option.save('notice_group', noticeInfo)
// 如果它在 onMsgList 里面,移到 groupAssistList
- const index = runtimeData.onMsgList.findIndex(
- (get) => {
- return item == get
- },
- )
- if (index >= 0 && !item.always_top) {
- runtimeData.onMsgList.splice(index, 1)
- runtimeData.groupAssistList.push(item)
+ if(!runtimeData.sysConfig.bubble_sort_user) {
+ const index = runtimeData.onMsgList.findIndex(
+ (get) => {
+ return item == get
+ },
+ )
+
+ if (index >= 0 && !item.always_top) {
+ runtimeData.onMsgList.splice(index, 1)
+ runtimeData.groupAssistList.push(item)
+ }
}
break
}
@@ -490,6 +496,28 @@
}
// 为消息列表内的对象刷新置顶标志
item.always_top = value
+ // 刷新群收纳盒
+ if(item.group_id && !runtimeData.sysConfig.bubble_sort_user) {
+ if(value) {
+ const index = runtimeData.groupAssistList.findIndex((get) => {
+ return item == get
+ })
+ if (index >= 0) {
+ runtimeData.groupAssistList.splice(index, 1)
+ }
+ runtimeData.onMsgList.push(item)
+ this.showGroupAssist = false
+ } else {
+ const index = runtimeData.onMsgList.findIndex((get) => {
+ return item == get
+ })
+ if (index >= 0) {
+ runtimeData.onMsgList.splice(index, 1)
+ runtimeData.groupAssistList.push(item)
+ }
+ this.showGroupAssist = true
+ }
+ }
// 重新排序列表
const newList = orderOnMsgList(runtimeData.onMsgList)
runtimeData.onMsgList = newList
diff --git a/src/renderer/src/pages/chat-view/SystemNotice.vue b/src/renderer/src/pages/chat-view/SystemNotice.vue
index e99d0538..dba39fee 100644
--- a/src/renderer/src/pages/chat-view/SystemNotice.vue
+++ b/src/renderer/src/pages/chat-view/SystemNotice.vue
@@ -43,7 +43,7 @@
minute: 'numeric',
}).format(new Date(notice.time * 1000))
}}
- {{ $t('留言') + notice.comment }}
+ {{ $t('留言:') + notice.comment }}
diff --git a/src/renderer/src/pages/options/OptFunction.vue b/src/renderer/src/pages/options/OptFunction.vue
index da8775f2..4f7fd131 100644
--- a/src/renderer/src/pages/options/OptFunction.vue
+++ b/src/renderer/src/pages/options/OptFunction.vue
@@ -27,25 +27,45 @@
-
-
+
+
+
+
+ {{ $t('群消息通知方式') }}
+ {{ $t('重要消息将始终发起应用内通知和系统通知') }}
+
+
+