From 3ccbef141ee2bfe6fa7257a38aedf53028b65bd5 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Mon, 21 Jul 2025 15:16:49 +0800 Subject: [PATCH] perf: extension ui --- astrbot/core/star/star_manager.py | 2 +- dashboard/src/views/ExtensionPage.vue | 161 +++++++++++--------------- 2 files changed, 68 insertions(+), 95 deletions(-) diff --git a/astrbot/core/star/star_manager.py b/astrbot/core/star/star_manager.py index 4a6d4d902..781a51418 100644 --- a/astrbot/core/star/star_manager.py +++ b/astrbot/core/star/star_manager.py @@ -163,7 +163,7 @@ class PluginManager: plugins.extend(_p) return plugins - async def _check_plugin_dept_update(self, target_plugin: str = None): + async def _check_plugin_dept_update(self, target_plugin: str | None = None): """检查插件的依赖 如果 target_plugin 为 None,则检查所有插件的依赖 """ diff --git a/dashboard/src/views/ExtensionPage.vue b/dashboard/src/views/ExtensionPage.vue index c8fb62452..a3dbc9c37 100644 --- a/dashboard/src/views/ExtensionPage.vue +++ b/dashboard/src/views/ExtensionPage.vue @@ -30,12 +30,12 @@ const extension_config = reactive({ config: {} }); const pluginMarketData = ref([]); - const loadingDialog = reactive({ - show: false, - title: "", - statusCode: 0, // 0: loading, 1: success, 2: error, - result: "" - }); +const loadingDialog = reactive({ + show: false, + title: "", + statusCode: 0, // 0: loading, 1: success, 2: error, + result: "" +}); const showPluginInfoDialog = ref(false); const selectedPlugin = ref({}); const curr_namespace = ref(""); @@ -185,8 +185,8 @@ const checkUpdate = () => { if (matchedPlugin) { extension.online_version = matchedPlugin.version; - extension.has_update = extension.version !== matchedPlugin.version && - matchedPlugin.version !== tm('status.unknown'); + extension.has_update = extension.version !== matchedPlugin.version && + matchedPlugin.version !== tm('status.unknown'); } else { extension.has_update = false; } @@ -623,27 +623,12 @@ onMounted(async () => { - + - + @@ -679,33 +664,32 @@ onMounted(async () => { mdi-plus {{ tm('buttons.install') }} - - - - - - + + + + + + @@ -727,7 +711,8 @@ onMounted(async () => {
{{ item.name }}
- {{ tm('status.system') }} + {{ tm('status.system') + }}
@@ -848,8 +833,8 @@ onMounted(async () => { - +
@@ -866,8 +851,8 @@ onMounted(async () => {

{{ tm('market.allPlugins') }}

- +
@@ -905,7 +890,8 @@ onMounted(async () => {