From 487bff78f9b63f1014cbdf0f04f0b1b60f85d6ca Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Fri, 7 Jul 2023 17:50:00 +0800 Subject: [PATCH] fix: append some ignored offine icons --- .../scripts/extract-icons.ts | 7 +++- .../com.msgbyte.offline-icons/src/icons.json | 37 +++++++++++++------ client/web/registry.json | 4 +- 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/client/web/plugins/com.msgbyte.offline-icons/scripts/extract-icons.ts b/client/web/plugins/com.msgbyte.offline-icons/scripts/extract-icons.ts index a8442348..f67e94df 100644 --- a/client/web/plugins/com.msgbyte.offline-icons/scripts/extract-icons.ts +++ b/client/web/plugins/com.msgbyte.offline-icons/scripts/extract-icons.ts @@ -71,10 +71,13 @@ async function extractIcons(filepath: string): Promise { traverse(ast, { JSXOpeningElement(path) { const name = path.node.name; - if (isJSXIdentifier(name) && name.name === 'Icon') { + if ( + isJSXIdentifier(name) && + ['Icon', 'BaseChatInputButton'].includes(name.name) + ) { path.node.attributes.forEach((attribute) => { if (isJSXAttribute(attribute) && attribute.name.name === 'icon') { - if (isStringLiteral(attribute.value)) { + if (isStringLiteral(attribute.value) && attribute.value.value) { icons.push(attribute.value.value); } } diff --git a/client/web/plugins/com.msgbyte.offline-icons/src/icons.json b/client/web/plugins/com.msgbyte.offline-icons/src/icons.json index 790832a5..634a976a 100644 --- a/client/web/plugins/com.msgbyte.offline-icons/src/icons.json +++ b/client/web/plugins/com.msgbyte.offline-icons/src/icons.json @@ -57,6 +57,18 @@ "arrow-right": { "body": "" }, + "plus-circle-outline": { + "body": "" + }, + "cloud-upload": { + "body": "" + }, + "emoticon-happy-outline": { + "body": "" + }, + "send-circle-outline": { + "body": "" + }, "pound": { "body": "" }, @@ -78,21 +90,12 @@ "file-question-outline": { "body": "" }, - "plus-circle-outline": { - "body": "" - }, - "cloud-upload": { - "body": "" - }, - "send-circle-outline": { - "body": "" + "magnify": { + "body": "" }, "email-edit-outline": { "body": "" }, - "magnify": { - "body": "" - }, "message-badge-outline": { "body": "" }, @@ -143,6 +146,18 @@ } } }, + { + "prefix": "eos-icons", + "lastModified": 1672651928, + "aliases": {}, + "width": 24, + "height": 24, + "icons": { + "ai": { + "body": "" + } + } + }, { "prefix": "openmoji", "lastModified": 1686116966, diff --git a/client/web/registry.json b/client/web/registry.json index 18cd7fc6..546b169a 100644 --- a/client/web/registry.json +++ b/client/web/registry.json @@ -183,7 +183,7 @@ "author": "msgbyte", "description": "Provide the operating capability of the open platform for the application", "description.zh-CN": "为应用提供开放平台的操作能力", - "requireRestart": true + "requireRestart": false }, { "label": "third party integration", @@ -194,7 +194,7 @@ "author": "moonrailgun", "description": "Used to integrate third-party applications in groups", "description.zh-CN": "用于在群组中集成第三方应用", - "requireRestart": true + "requireRestart": false }, { "label": "sakana-widget",