From a99bd8143125964a75dcdca5b5856893f17443c4 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sat, 19 Oct 2024 23:23:07 +0800 Subject: [PATCH] =?UTF-8?q?refactor=EF=BC=9AMoviePilot=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 7 +++++-- plugins/mpserverstatus/__init__.py | 18 ++++++++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index e8fbce8..66f7bb3 100644 --- a/package.json +++ b/package.json @@ -771,11 +771,14 @@ "name": "MoviePilot服务器监控", "description": "在仪表板中实时显示MoviePilot公共服务器状态。", "labels": "仪表板", - "version": "1.0", + "version": "1.1", "icon": "Duplicati_A.png", "author": "jxxghp", "level": 1, - "v2": true + "v2": true, + "history": { + "v1.1": "增加详情界面显示" + } }, "CleanInvalidSeed": { "name": "清理QB无效做种", diff --git a/plugins/mpserverstatus/__init__.py b/plugins/mpserverstatus/__init__.py index 0768b34..d4d2070 100644 --- a/plugins/mpserverstatus/__init__.py +++ b/plugins/mpserverstatus/__init__.py @@ -15,7 +15,7 @@ class MPServerStatus(_PluginBase): # 插件图标 plugin_icon = "Duplicati_A.png" # 插件版本 - plugin_version = "1.0" + plugin_version = "1.1" # 插件作者 plugin_author = "jxxghp" # 作者主页 @@ -73,7 +73,21 @@ class MPServerStatus(_PluginBase): } def get_page(self) -> List[dict]: - pass + """ + 获取插件页面 + """ + if not self._enable: + return [ + { + 'component': 'div', + 'text': '插件未启用', + 'props': { + 'class': 'text-center', + } + } + ] + _, _, elements = self.get_dashboard() + return elements def get_dashboard(self) -> Optional[Tuple[Dict[str, Any], Dict[str, Any], List[dict]]]: """