From 17373e2dee867c0b1e74669f57fff913faf057f4 Mon Sep 17 00:00:00 2001
From: nap0o <144927971+nap0o@users.noreply.github.com>
Date: Fri, 12 Jul 2024 10:29:11 -0400
Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fixbug=20(#388)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* 修复bug:在server-status主题无法切换
* 替换哪吒面板后台cdn提供商为unpkg
* 替换哪吒面板后台cdn提供商为unpkg
* 加快Agent详情下拉展示速度
---
resource/static/theme-server-status/css/main.css | 13 +++++++++++++
resource/static/theme-server-status/js/mixin.js | 7 +++++++
resource/template/common/footer.html | 7 +++----
resource/template/common/header.html | 12 ++++--------
resource/template/dashboard-default/redirect.html | 3 ---
resource/template/dashboard-default/server.html | 2 +-
resource/template/dashboard-default/terminal.html | 12 ++++--------
resource/template/theme-server-status/header.html | 4 ++--
8 files changed, 34 insertions(+), 26 deletions(-)
diff --git a/resource/static/theme-server-status/css/main.css b/resource/static/theme-server-status/css/main.css
index a110a1a..6f3d6b1 100644
--- a/resource/static/theme-server-status/css/main.css
+++ b/resource/static/theme-server-status/css/main.css
@@ -234,6 +234,19 @@ body {
cursor: pointer;
}
+/*加快Agent详情下拉展示速度*/
+.collapsing{
+ -webkit-transition-property:height,visibility;
+ -o-transition-property:height,visibility;
+ transition-property:height,visibility;
+ -webkit-transition-duration:.15s;
+ -o-transition-duration:.15s;
+ transition-duration:.15s;
+ -webkit-transition-timing-function: linear;
+ -o-transition-timing-function: linear;
+ transition-timing-function: linear
+}
+
/*正文结束*/
/* 服务页 正文*/
diff --git a/resource/static/theme-server-status/js/mixin.js b/resource/static/theme-server-status/js/mixin.js
index be04471..1260709 100644
--- a/resource/static/theme-server-status/js/mixin.js
+++ b/resource/static/theme-server-status/js/mixin.js
@@ -25,6 +25,13 @@ const mixinsVue = {
window.removeEventListener('scroll', this.handleScroll);
},
methods: {
+ toggleTemplate(template) {
+ if( template != this.preferredTemplate){
+ this.preferredTemplate = template;
+ this.updateCookie("preferred_theme", template);
+ window.location.reload();
+ }
+ },
initTheme() {
const storedTheme = localStorage.getItem("theme");
const theme = (storedTheme === 'dark' || storedTheme === 'light') ? storedTheme : (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
diff --git a/resource/template/common/footer.html b/resource/template/common/footer.html
index 94a61c2..8b17c69 100644
--- a/resource/template/common/footer.html
+++ b/resource/template/common/footer.html
@@ -6,10 +6,10 @@
{{.Version}}
-
-
+
+
-
+