From 98b536d9b8f2211c1400c92cf4918c7fc03eb3ef Mon Sep 17 00:00:00 2001 From: Rrrrrrray <28804884+Rrrrrrray@users.noreply.github.com> Date: Sat, 15 Mar 2025 06:13:59 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=88=20perf:=20`zzz.tool.panel`=20?= =?UTF-8?q?=E6=B8=B2=E6=9F=93=E5=8F=AF=E9=80=89,=20=E4=B8=8D=E6=B8=B2?= =?UTF-8?q?=E6=9F=93=E6=97=B6=E8=B5=84=E6=BA=90=E9=9D=99=E9=BB=98=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/panel.js | 12 ++++++++---- resources/map/PartnerId2Data.json | 6 +++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/panel.js b/apps/panel.js index 5b04d0a..e483ecd 100644 --- a/apps/panel.js +++ b/apps/panel.js @@ -147,6 +147,7 @@ export class Panel extends ZZZPlugin { data = undefined, needSave = true, reply = true, + needImg = true } = _data; if (!uid) { await this.reply('UID为空'); @@ -160,8 +161,11 @@ export class Panel extends ZZZPlugin { updatePanelData(uid, [data]); } const timer = setTimeout(() => { - if (this?.reply) { - this.reply('查询成功,正在下载图片资源,请稍候。'); + const msg = '查询成功,正在下载图片资源,请稍候。' + if (this?.reply && needImg) { + this.reply(msg); + } else { + logger.mark(msg) } }, 5000); const parsedData = formatPanelData(data); @@ -171,9 +175,9 @@ export class Panel extends ZZZPlugin { uid, charData: parsedData, }; - const image = await this.render('panel/card.html', finalData, { + const image = needImg ? await this.render('panel/card.html', finalData, { retType: 'base64', - }); + }) : needImg; if (reply) { const res = await this.reply(image); diff --git a/resources/map/PartnerId2Data.json b/resources/map/PartnerId2Data.json index 574fad6..29a7e7f 100644 --- a/resources/map/PartnerId2Data.json +++ b/resources/map/PartnerId2Data.json @@ -50,7 +50,7 @@ "1321": { "sprite_id": "37", "name": "伊芙琳", - "full_name": "伊芙琳 · 舒瓦利耶", + "full_name": "伊芙琳·舒瓦利耶", "en_name": "Evelyn" }, "2011": { @@ -134,7 +134,7 @@ "1361": { "sprite_id": "39", "name": "「扳机」", - "full_name": "...", + "full_name": "「扳机」", "en_name": "Trigger" }, "1121": { @@ -158,7 +158,7 @@ "1351": { "sprite_id": "38", "name": "波可娜", - "full_name": "...", + "full_name": "波可娜·费雷尼", "en_name": "Pulchra" }, "1311": {