From 1d202d5e77900ebad4368e3484fb2ec22647fac9 Mon Sep 17 00:00:00 2001 From: stapxs <1007028430.stapx@gmail.com> Date: Mon, 29 Jul 2024 11:02:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=94=B6=E8=97=8F=E8=A1=A8?= =?UTF-8?q?=E6=83=85=E9=80=86=E5=BA=8F=E6=94=AF=E6=8C=81=20:sparkles:=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81=20napcat=201.7.0=20=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=94=B6=E8=97=8F=E8=A1=A8=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/append/append_new.css | 10 +++++++++- src/assets/pathMap/Lagrange.OneBot.yaml | 1 + src/assets/pathMap/NapCat.Onebot.yaml | 6 +++++- src/components/FacePan.vue | 6 +++++- src/function/msg.ts | 13 ++++++++++++- 5 files changed, 32 insertions(+), 4 deletions(-) diff --git a/src/assets/css/append/append_new.css b/src/assets/css/append/append_new.css index f44e24d5..1bb4479e 100644 --- a/src/assets/css/append/append_new.css +++ b/src/assets/css/append/append_new.css @@ -575,7 +575,15 @@ width: 19px; } .store-face-list { - height: calc(300px - 100px); + height: calc(300px - 90px) !important; +} + +.face-stickers { + height: calc(300px - 90px); +} +.face-stickers > img { + height: 44px; + width: 44px; } .respond { diff --git a/src/assets/pathMap/Lagrange.OneBot.yaml b/src/assets/pathMap/Lagrange.OneBot.yaml index 20cd748c..0077d37e 100644 --- a/src/assets/pathMap/Lagrange.OneBot.yaml +++ b/src/assets/pathMap/Lagrange.OneBot.yaml @@ -29,6 +29,7 @@ user_list: # 收藏表情 roaming_stamp: name: fetch_custom_face + reverse: true # 消息列表 message_list: name: get_group_msg_history diff --git a/src/assets/pathMap/NapCat.Onebot.yaml b/src/assets/pathMap/NapCat.Onebot.yaml index f1fc6094..9c29c1c0 100644 --- a/src/assets/pathMap/NapCat.Onebot.yaml +++ b/src/assets/pathMap/NapCat.Onebot.yaml @@ -108,4 +108,8 @@ group_essence: add_digest_uin: /add_digest_uin add_digest_nick: /add_digest_nick add_digest_time: /add_digest_time - is_end: $.data.is_end \ No newline at end of file + is_end: $.data.is_end +# 获取收藏表情 +roaming_stamp: + name: fetch_custom_face + pageed: true \ No newline at end of file diff --git a/src/components/FacePan.vue b/src/components/FacePan.vue index eeb62650..5a9d8387 100644 --- a/src/components/FacePan.vue +++ b/src/components/FacePan.vue @@ -97,7 +97,11 @@ export default defineComponent({ mounted() { // 加载漫游表情 if (runtimeData.stickerCache === undefined && runtimeData.jsonMap.roaming_stamp) { - Connector.send(runtimeData.jsonMap.roaming_stamp.name, {}, 'getRoamingStamp') + if(runtimeData.jsonMap.roaming_stamp.paged) { + Connector.send(runtimeData.jsonMap.roaming_stamp.name, { count: 20 }, 'getRoamingStamp') + } else { + Connector.send(runtimeData.jsonMap.roaming_stamp.name, {}, 'getRoamingStamp') + } } this.getStoreFaceList() } diff --git a/src/function/msg.ts b/src/function/msg.ts index 778bc6a1..2a90d56d 100644 --- a/src/function/msg.ts +++ b/src/function/msg.ts @@ -56,7 +56,7 @@ export function parse(str: string) { case 'getChatHistory' : saveMsg(msg, 'top'); break case 'getForwardMsg' : saveForwardMsg(msg); break case 'sendMsgBack' : showSendedMsg(msg, echoList); break - case 'getRoamingStamp' : runtimeData.stickerCache = msg.data.reverse(); break + case 'getRoamingStamp' : saveSticker(msg.data); break case 'getMoreGroupInfo' : runtimeData.chatInfo.info.group_info = msg.data.data; break case 'getMoreUserInfo' : runtimeData.chatInfo.info.user_info = msg.data.data.result.buddy.info_list[0]; break case 'getGroupNotices' : saveGroupNotices(msg); break @@ -1112,6 +1112,17 @@ function saveCookie(data: any, echoList: string[]) { runtimeData.loginInfo.webapi[domain].bkn = (hash & 0x7FFFFFFF).toString() } +function saveSticker(data: any) { + if(msgPath.roaming_stamp.reverse) { + data.reverse() + } + if(runtimeData.stickerCache == undefined) { + runtimeData.stickerCache = data + } else { + runtimeData.stickerCache = runtimeData.stickerCache.concat(data) + } +} + // ============================================================== const baseRuntime = {