Skip to content

Commit

Permalink
#119 八月累积更新
Browse files Browse the repository at this point in the history
✨ 支持非分页模式加载消息 <- #120
✨ 支持禁言状态显示和对应的输入框禁用 <- #121
✨ 增加了退出群组按钮 <- #121
✨ 现在你可以在消息列表中右击群组设置是否通知了!<- #118
🎨 获取批量消息时判断消息是否为当前页面的消息
🎨 将 UserFriendElem 和 UserGroupElem 抽离出了父类,纠正了类元素写反了的问题
🎨 优化 options 保存读取逻辑对 object 的处理
🎨 对 Napcat 系统通知的识别进行兼容
💄 重制了消息通知的页面样式
💄 修正了用户列表头像未上下居中的问题
💄 修正系统消息在选中时的样式错误
💄 调整窗口初始尺寸
🐛 修正在处理系统通知后未刷新列表的问题 <- #121
🐛 修正后端连接模式 SSL 协议错误的问题
🐛 修正后端连接模式下遗漏的日志输出
🐛 修正后端连接模式自动重连功能的缺失
🐛 修正设置获取方法在处理 json 字符串时的不统一行为
🐛 修正添加商城表情后列表未被刷新的问题
🐛 修正后端连接模式下前端刷新后无法正常重连的问题
🐛 修正消息菜单在添加回应功能后右侧出界判断错误的问题,由 b1c880b 损坏
:bug: 修正消息列表右击菜单底部出界的问题
  • Loading branch information
Stapxs authored Aug 27, 2024
2 parents dac4a65 + e10b46f commit 3a5483e
Show file tree
Hide file tree
Showing 30 changed files with 514 additions and 173 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "stapxs-qq-lite",
"version": "2.8.2",
"version": "2.8.4",
"private": false,
"author": "Stapx Steve [林槐]",
"description": "一个兼容 OneBot 的非官方网页版 QQ 客户端,使用 Vue 重制的全新版本。",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"clear": "rm -rf dist && rm -rf dist_electron",
"lint:fix": "vue-cli-service lint --fix",
"electron:build": "vue-cli-service electron:build",
"electron:serve": "vue-cli-service electron:serve",
Expand Down
16 changes: 16 additions & 0 deletions src/assets/css/append/append_new.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
height: 30px;
width: 30px;
}
.friend-body > div:nth-child(1) {
height: 34px;
}
.friend-body > div p {
font-size: 0.8rem;
}
Expand Down Expand Up @@ -687,6 +690,19 @@
font-size: 0.8rem;
}

.sys-not-list > div > div:first-child img {
width: 40px;
height: 40px;
}
.sys-not-list > div > div:first-child a {
font-size: 0.75rem;
}
.sys-not-list > div > div:last-child button {
width: 70px;
height: 30px;
font-size: 0.75rem;
}

@media (max-width: 700px) {
.main-body > ul {
background: var(--color-card-2) !important;
Expand Down
58 changes: 57 additions & 1 deletion src/assets/css/chat.css
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,15 @@ input {
width: 100%;
border: 0;
}
.chat-pan > div.more > div:nth-child(2) > div > form > input:disabled,
.chat-pan > div.more > div:nth-child(2) > div > form > textarea:disabled {
background: var(--color-card);
outline: 1px solid var(--color-card-2);
color: var(--color-font-2);
opacity: 0.7;
text-align: center;
font-size: 0.8rem;
}
.chat-pan > div.more > div:nth-child(2) > div > div {
border-radius: 7px;
min-height: 40px;
Expand Down Expand Up @@ -281,11 +290,58 @@ input {
}

.sys-not-list {
margin-top: 10px;
}
.sys-not-list > div {
background: var(--color-card-1);
margin-bottom: 10px;
border-radius: 7px;
margin-top: 10px;
display: flex;
flex-direction: row;
align-items: center;
padding: 10px;
}
.sys-not-list > div > div:first-child {
display: flex;
flex-direction: row;
align-items: center;
flex: 1;
}
.sys-not-list > div > div:first-child img {
width: 50px;
height: 50px;
border-radius: 7px;
border: 2px solid var(--color-card-2);
margin-right: 10px;
}
.sys-not-list > div > div:first-child div {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
text-align: left;
}
.sys-not-list > div > div:first-child span {
color: var(--color-main);
font-weight: bold;
}
.sys-not-list > div > div:first-child a {
color: var(--color-font);
font-size: 0.9rem;
}
.sys-not-list > div > div:first-child a:last-child {
color: var(--color-font-2);
}
.sys-not-list > div > div:last-child button {
margin-right: 10px;
width: 90px;
height: 35px;
font-size: 0.9rem;
}
.sys-not-list > div > div:last-child button:first-child {
background: var(--color-card-2);
color: var(--color-font-1);
}

.more-detail {
transition: height .3s;
Expand Down
4 changes: 4 additions & 0 deletions src/assets/css/msg.css
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,10 @@
.note-base > a {
color: var(--color-font);
}
.note-ban > a {
color: var(--color-main);
font-weight: bold;
}
.note-time {
color: var(--color-font-2) !important;
display: block;
Expand Down
9 changes: 8 additions & 1 deletion src/assets/css/view.css
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,16 @@ textarea:focus {
border-radius: 7px;
transform: translate(0, 0);
transition: background .2s, color .2s, transform .2s;
align-items: center;
}
.friend-body.active {
background: var(--color-main);
color: var(--color-font-r);
}
.friend-body.active > svg {
background: var(--color-card-2);
color: var(--color-main);
}
.friend-body.onmenu,
.friend-body:hover {
background: var(--color-card-2) !important;
Expand All @@ -404,6 +409,7 @@ textarea:focus {
width: 50px;
}
.friend-body > svg {
transition: background .3s, color .3s;
background: var(--color-main);
color: var(--color-font-1-r);
pointer-events: none;
Expand All @@ -418,6 +424,7 @@ textarea:focus {
overflow: hidden;
}
.friend-body > div:nth-child(1) {
height: 54px;
flex: unset;
width: 4px;
background: var(--color-main);
Expand Down Expand Up @@ -500,7 +507,7 @@ textarea:focus {
padding: 10px;
}
.msg-menu-body.topOut {
transition: transform .1s, margin-top .1s;
transition: transform .1s, margin-top .2s;
}
.msg-menu-body.show {
transform: scaleY(1);
Expand Down
2 changes: 0 additions & 2 deletions src/assets/l10n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@
"option_account_lnick": "Bio",
"option_account_lnick_tip": "Write something about you here",
"list_system_notice": "System Messages",
"sys_notice_new_friend_from": "Friend source: ",
"option_dev_debug": "Output debugging info",
"option_dev_debug_tip": "Helps you figure out the version you're on.",
"btn_yes": "OK",
Expand Down Expand Up @@ -260,7 +259,6 @@
"chat_chat_info_silence_all_tip": "Mute all members except the owner and admins in the group",
"btn_accept": "Agree",
"btn_reject": "Decline",
"sys_notice_new_friend": "New friend request",
"sys_notice": "System Messages",
"chat_msg_menu_remove": "Remove from group",
"sys_notice_new_group_nmember": "Join request",
Expand Down
2 changes: 0 additions & 2 deletions src/assets/l10n/zh-CAT.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@
"option_account_lnick": "爪印",
"option_account_lnick_tip": "小猫咪才没有到处写字的坏心思",
"list_system_notice": "系统猫叫",
"sys_notice_new_friend_from": "来源:",
"option_dev_debug": "输出调试信息",
"option_dev_debug_tip": "到底用的什么版本呢 ……",
"btn_yes": "确定",
Expand Down Expand Up @@ -251,7 +250,6 @@
"chat_chat_info_silence_all_tip": "你们是不整点活不开心是吧",
"btn_accept": "同意",
"btn_reject": "拒绝",
"sys_notice_new_friend": "新猫友",
"sys_notice": "系统猫话",
"chat_msg_menu_remove": "移出猫圈",
"sys_notice_new_group_nmember": "入圈申请",
Expand Down
18 changes: 16 additions & 2 deletions src/assets/l10n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@
"option_account_lnick": "签名",
"option_account_lnick_tip": "啊吧啊吧(智慧的眼神)",
"list_system_notice": "系统通知",
"sys_notice_new_friend_from": "来源:",
"option_dev_debug": "输出调试信息",
"option_dev_debug_tip": "到底用的什么版本呢 ……",
"btn_yes": "确定",
Expand Down Expand Up @@ -251,7 +250,6 @@
"btn_accept": "同意",
"btn_reject": "拒绝",
"btn_reflush": "刷新页面",
"sys_notice_new_friend": "新朋友",
"sys_notice": "系统消息",
"chat_msg_menu_remove": "移出群聊",
"sys_notice_new_group_nmember": "入群申请",
Expand Down Expand Up @@ -341,6 +339,22 @@
"array_code": "Array 数组",
"chat_pic": "图片",
"log_con_backend": "使用后端连接模式",
"list_menu_notice": "开启通知",
"list_menu_notice_close": "关闭通知",
"chat_send_msg_watermark_ban": "已被禁言至:{time}",
"note_ban_you": "禁言了你",
"note_ban_others": "管理员禁言了",
"note_unban": "管理员解除了 {name} 的禁言",
"days": "",
"hours": "小时",
"minutes": "分钟",
"seconds": "",
"you": "",
"exit_group": "退出群聊",
"trust_leave_group": "确定要退出群聊吗?",
"sys_notice_message": "留言",
"sys_notice_new_friend": "请求加为好友",
"sys_notice_invite_group": "邀请你加入群聊",

"menu_about": "关于",
"menu_update": "检查更新…",
Expand Down
2 changes: 0 additions & 2 deletions src/assets/l10n/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@
"option_account_lnick": "簽名檔",
"option_account_lnick_tip": "啊吧啊吧(充滿智慧的眼神)",
"list_system_notice": "系統通知",
"sys_notice_new_friend_from": "聯絡人來源:",
"option_dev_debug": "輸出偵錯資訊",
"option_dev_debug_tip": "我在用的是什麼版本?",
"btn_yes": "確認",
Expand Down Expand Up @@ -254,7 +253,6 @@
"chat_chat_info_silence_all_tip": "禁止群組所有者和管理員以外的群組成員在群組內傳送訊息",
"btn_accept": "同意",
"btn_reject": "拒絕",
"sys_notice_new_friend": "新的聯絡人請求",
"sys_notice": "系統訊息",
"chat_msg_menu_remove": "移出群組",
"sys_notice_new_group_nmember": "入群請求",
Expand Down
2 changes: 0 additions & 2 deletions src/assets/l10n/zh-YUE.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@
"option_account_lnick": "Bio",
"option_account_lnick_tip": "自我介紹資訊",
"list_system_notice": "系統通知",
"sys_notice_new_friend_from": "Friend 來源:",
"option_dev_debug": "輸出",
"option_dev_debug_tip": "我喺度用緊乜嘢啊……",
"btn_yes": "確認",
Expand Down Expand Up @@ -260,7 +259,6 @@
"chat_chat_info_silence_all_tip": "開啓後除咗 group owner 同管理員之外嘅其他人都唔可以講嘢",
"btn_accept": "同意",
"btn_reject": "拒絕",
"sys_notice_new_friend": "新嘅 friend 請求",
"sys_notice": "系統訊息",
"chat_msg_menu_remove": "踢出群組",
"sys_notice_new_group_nmember": "入群請求",
Expand Down
19 changes: 19 additions & 0 deletions src/assets/pathMap/NapCat.Onebot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ message_list:
name: get_group_msg_history
private_name: get_friend_msg_history
source: $.data.messages[*]
pageed: false # 是否支持分页(id + count 获取)
type: $.data
message_type:
user: private
Expand Down Expand Up @@ -115,6 +116,24 @@ group_essence:
add_digest_nick: /add_digest_nick
add_digest_time: /add_digest_time
is_end: $.data.is_end
# 获取群成员信息
group_member_info:
name: get_group_member_info
source: $.data
list:
group_id: /group_id
user_id: /user_id
nickname: /nickname
card: /card
sex: /sex
age: /age
join_time: /join_time
last_sent_time: /last_sent_time
is_robot: /is_robot
shut_up_timestamp: /shut_up_timestamp
# 退出群聊
leave_group:
name: set_group_leave
# 获取收藏表情
roaming_stamp:
name: fetch_custom_face
Expand Down
4 changes: 2 additions & 2 deletions src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ async function createWindow() {
Menu.setApplicationMenu(null)
// 创建窗口
const mainWindowState = windowStateKeeper({
defaultWidth: 1200,
defaultHeight: 800
defaultWidth: 850,
defaultHeight: 530
})
const store = new Store()
let windowConfig = {
Expand Down
8 changes: 6 additions & 2 deletions src/components/FacePan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ export default defineComponent({
},

getStoreFaceList() {
this.storeFace = JSON.parse(decodeURIComponent(Option.getRaw('store_face') || '[]'))
this.storeFace = Option.get('store_face') ?? []
},
removeMface(data: any) {
const index = this.storeFace.findIndex((face) => face.emoji_id === data.emoji_id)
if (index !== -1) {
this.storeFace.splice(index, 1)
Option.save('store_face', JSON.stringify(this.storeFace))
Option.save('store_face', this.storeFace)
}
}
},
Expand All @@ -104,6 +104,10 @@ export default defineComponent({
}
}
this.getStoreFaceList()
// 监听表情商店列表
this.$watch(() => runtimeData.sysConfig.store_face.length, () => {
this.getStoreFaceList()
})
}
})
</script>
Expand Down
Loading

0 comments on commit 3a5483e

Please sign in to comment.