From 8deea08231886e0845a1db55be605cb182846a7f Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Wed, 17 May 2023 11:54:15 +0800 Subject: [PATCH] refactor: abnormal status display of plugin management (#3945) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind improvement /area console /milestone 2.6.x #### What this PR does / why we need it: 重构 Console 端插件异常状态的判断和显示,改动如下: 1. 移除插件名称旁边的启用状态。 2. 切换按钮的状态是期望值,意思就是不与插件实际状态一致。 3. 小红点出现的时机为:插件的实际状态与期望状态不一致以及插件本身出了异常。 4. 插件详情页面支持横幅显示插件异常状态。 image image #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/3940 #### Special notes for your reviewer: 测试方式: 1. 想办法将插件状态变成异常,比如在开发环境将 runtime-mode 改为 deployment。 2. 检查 Console 端插件管理中的 UI 表现是否和上面的描述一致。 #### Does this PR introduce a user-facing change? ```release-note 重构 Console 插件管理的异常状态显示。 ``` --- .../modules/system/plugins/PluginDetail.vue | 32 ++++++++++--------- .../plugins/components/PluginListItem.vue | 32 +++---------------- .../system/plugins/composables/use-plugin.ts | 14 ++++++++ 3 files changed, 35 insertions(+), 43 deletions(-) diff --git a/console/src/modules/system/plugins/PluginDetail.vue b/console/src/modules/system/plugins/PluginDetail.vue index 7d003b2d9..e5148f6ee 100644 --- a/console/src/modules/system/plugins/PluginDetail.vue +++ b/console/src/modules/system/plugins/PluginDetail.vue @@ -1,9 +1,9 @@