From 7e4d4d5fd64c0f2c828fb54e82937495ea08d875 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Thu, 9 May 2024 19:10:30 +0800 Subject: [PATCH] rollback dashboard switch --- plugins/brushflow/__init__.py | 26 +++----------------------- plugins/sitestatistic/__init__.py | 28 +++------------------------- 2 files changed, 6 insertions(+), 48 deletions(-) diff --git a/plugins/brushflow/__init__.py b/plugins/brushflow/__init__.py index b618693..c0432fa 100644 --- a/plugins/brushflow/__init__.py +++ b/plugins/brushflow/__init__.py @@ -40,7 +40,6 @@ class BrushConfig: self.enabled = config.get("enabled", False) self.notify = config.get("notify", True) self.onlyonce = config.get("onlyonce", False) - self.dashboard = config.get("dashboard", True) self.brushsites = config.get("brushsites", []) self.downloader = config.get("downloader", "qbittorrent") self.disksize = self.__parse_number(config.get("disksize")) @@ -762,8 +761,6 @@ class BrushFlow(_PluginBase): } 3、页面配置使用Vuetify组件拼装,参考:https://vuetifyjs.com/ """ - if not self._brush_config.dashboard: - return None # 列配置 cols = { "cols": 12 @@ -798,7 +795,7 @@ class BrushFlow(_PluginBase): 'component': 'VCol', 'props': { 'cols': 12, - 'md': 3 + 'md': 4 }, 'content': [ { @@ -814,7 +811,7 @@ class BrushFlow(_PluginBase): 'component': 'VCol', 'props': { 'cols': 12, - 'md': 3 + 'md': 4 }, 'content': [ { @@ -830,7 +827,7 @@ class BrushFlow(_PluginBase): 'component': 'VCol', 'props': { 'cols': 12, - 'md': 3 + 'md': 4 }, 'content': [ { @@ -841,22 +838,6 @@ class BrushFlow(_PluginBase): } } ] - }, - { - 'component': 'VCol', - 'props': { - 'cols': 12, - 'md': 3 - }, - 'content': [ - { - 'component': 'VSwitch', - 'props': { - 'model': 'dashboard', - 'label': '在仪表板中显示', - } - } - ] } ] }, @@ -2982,7 +2963,6 @@ class BrushFlow(_PluginBase): "onlyonce": brush_config.onlyonce, "enabled": brush_config.enabled, "notify": brush_config.notify, - "dashboard": brush_config.dashboard, "brushsites": brush_config.brushsites, "downloader": brush_config.downloader, "disksize": brush_config.disksize, diff --git a/plugins/sitestatistic/__init__.py b/plugins/sitestatistic/__init__.py index de84561..821e752 100644 --- a/plugins/sitestatistic/__init__.py +++ b/plugins/sitestatistic/__init__.py @@ -66,7 +66,6 @@ class SiteStatistic(_PluginBase): # 配置属性 _enabled: bool = False _onlyonce: bool = False - _dashboard: bool = True _sitemsg: bool = True _cron: str = "" _notify: bool = False @@ -85,7 +84,6 @@ class SiteStatistic(_PluginBase): if config: self._enabled = config.get("enabled") self._onlyonce = config.get("onlyonce") - self._dashboard = True if config.get("dashboard") is None else config.get("dashboard") self._cron = config.get("cron") self._notify = config.get("notify") self._sitemsg = config.get("sitemsg") @@ -231,7 +229,7 @@ class SiteStatistic(_PluginBase): 'component': 'VCol', 'props': { 'cols': 12, - 'md': 3 + 'md': 4 }, 'content': [ { @@ -247,7 +245,7 @@ class SiteStatistic(_PluginBase): 'component': 'VCol', 'props': { 'cols': 12, - 'md': 3 + 'md': 4 }, 'content': [ { @@ -263,7 +261,7 @@ class SiteStatistic(_PluginBase): 'component': 'VCol', 'props': { 'cols': 12, - 'md': 3 + 'md': 4 }, 'content': [ { @@ -274,22 +272,6 @@ class SiteStatistic(_PluginBase): } } ] - }, - { - 'component': 'VCol', - 'props': { - 'cols': 12, - 'md': 3 - }, - 'content': [ - { - 'component': 'VSwitch', - 'props': { - 'model': 'dashboard', - 'label': '在仪表板中显示', - } - } - ] } ] }, @@ -414,7 +396,6 @@ class SiteStatistic(_PluginBase): "enabled": False, "onlyonce": False, "notify": True, - "dashboard": True, "sitemsg": True, "cron": "5 1 * * *", "queue_cnt": 5, @@ -899,8 +880,6 @@ class SiteStatistic(_PluginBase): "refresh": 10 // 自动刷新时间,单位秒 } """ - if not self._dashboard: - return None # 列配置 cols = { "cols": 12 @@ -1450,7 +1429,6 @@ class SiteStatistic(_PluginBase): self.update_config({ "enabled": self._enabled, "onlyonce": self._onlyonce, - "dashboard": self._dashboard, "cron": self._cron, "notify": self._notify, "sitemsg": self._sitemsg,