From 96c3fd433ff4e553d41a2173c24499483fb04d85 Mon Sep 17 00:00:00 2001 From: nap0o <144927971+nap0o@users.noreply.github.com> Date: Fri, 1 Nov 2024 09:28:14 -0400 Subject: [PATCH] =?UTF-8?q?feat:=20status-server=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A5=97=E9=A4=90=E4=BF=A1=E6=81=AF=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=20(#464)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: status-server主题增加套餐信息展示 1. 首页通过在后台配置PublicNote字段,实现agent套餐信息展示 2. 一些其他小优化 * 1.未获取agent国家时,默认彩虹旗修改为联合国旗 --- resource/l10n/en-US.toml | 3 + resource/l10n/es-ES.toml | 3 + resource/l10n/zh-CN.toml | 3 + resource/l10n/zh-TW.toml | 3 + .../static/theme-server-status/css/dark.css | 5 ++ .../static/theme-server-status/css/light.css | 7 ++ .../theme-server-status/css/light.plus.css | 5 ++ .../static/theme-server-status/css/main.css | 19 ++++ .../template/theme-server-status/header.html | 6 +- .../theme-server-status/home-group-false.html | 43 ++++++++- .../theme-server-status/home-group-true.html | 43 ++++++++- .../template/theme-server-status/home.html | 90 +++++++++++-------- .../template/theme-server-status/network.html | 4 +- 13 files changed, 187 insertions(+), 47 deletions(-) diff --git a/resource/l10n/en-US.toml b/resource/l10n/en-US.toml index 38cdfa5..64036f3 100644 --- a/resource/l10n/en-US.toml +++ b/resource/l10n/en-US.toml @@ -750,3 +750,6 @@ other = "d" [CustomNameservers] other = "Custom Public DNS Nameservers for DDNS (separate with comma)" + +[Plan] +other = "Plan" diff --git a/resource/l10n/es-ES.toml b/resource/l10n/es-ES.toml index c6b598c..1516253 100644 --- a/resource/l10n/es-ES.toml +++ b/resource/l10n/es-ES.toml @@ -750,3 +750,6 @@ other = "d" [CustomNameservers] other = "Servidores DNS públicos personalizados para DDNS (separar con coma)" + +[Plan] +other = "Plan" diff --git a/resource/l10n/zh-CN.toml b/resource/l10n/zh-CN.toml index 204b830..8046298 100644 --- a/resource/l10n/zh-CN.toml +++ b/resource/l10n/zh-CN.toml @@ -750,3 +750,6 @@ other = "天" [CustomNameservers] other = "自定义DDNS使用的公共DNS服务器(逗号分隔)" + +[Plan] +other = "套餐" diff --git a/resource/l10n/zh-TW.toml b/resource/l10n/zh-TW.toml index 4e41db7..c9ba6c5 100644 --- a/resource/l10n/zh-TW.toml +++ b/resource/l10n/zh-TW.toml @@ -750,3 +750,6 @@ other = "天" [CustomNameservers] other = "自訂DDNS使用的公共DNS伺服器(逗號分隔)" + +[Plan] +other = "套餐" diff --git a/resource/static/theme-server-status/css/dark.css b/resource/static/theme-server-status/css/dark.css index 47b57ee..00e8e12 100755 --- a/resource/static/theme-server-status/css/dark.css +++ b/resource/static/theme-server-status/css/dark.css @@ -90,6 +90,11 @@ body[theme="dark"] .table > tbody > tr.expandRow.odd > td:before { body[theme="dark"] .table > tbody > tr.expandRow.even > td:before { background-color: rgba(28, 29, 38, 1); } + +body[theme="dark"] .plan { + background-image: none; + background-color: rgba(255, 255, 255, 0.075); +} /* expandRow展开部分样式结束 */ body[theme="dark"] .progress { diff --git a/resource/static/theme-server-status/css/light.css b/resource/static/theme-server-status/css/light.css index 9262d49..cfa9921 100755 --- a/resource/static/theme-server-status/css/light.css +++ b/resource/static/theme-server-status/css/light.css @@ -116,6 +116,13 @@ body[theme="light"] tr.odd.expandRow > :hover { background: #ffffff !important; } +body[theme="light"] .plan { + color: #000000; + background-color: #f5f5f5; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); +} + body[theme="light"] .progress-bar { color: #000000; } diff --git a/resource/static/theme-server-status/css/light.plus.css b/resource/static/theme-server-status/css/light.plus.css index b74c805..da791ca 100644 --- a/resource/static/theme-server-status/css/light.plus.css +++ b/resource/static/theme-server-status/css/light.plus.css @@ -104,6 +104,11 @@ body[theme="light"] .table > tbody > tr.expandRow.odd > td:before { body[theme="light"] .table > tbody > tr.expandRow.even > td:before { background-color: unset; } + +body[theme="light"] .plan { + background-image: none; + background-color: rgba(0, 0, 0, 0.015); +} /* expandRow展开部分样式结束 */ body[theme="light"] .progress { diff --git a/resource/static/theme-server-status/css/main.css b/resource/static/theme-server-status/css/main.css index 0526b4c..5f6756f 100755 --- a/resource/static/theme-server-status/css/main.css +++ b/resource/static/theme-server-status/css/main.css @@ -268,6 +268,22 @@ tr.accordion-toggle{ font-size: 80%; } +.plan { + display: inline-block; + font-size: 85%; + margin-right: 2px; + padding: 2px 5px; + border-radius: 2px; +} + +.network-route, .extra { + margin-right: 6px; +} + +.last { + margin-right: 2px; +} + .temp-detail { cursor: pointer; } @@ -557,6 +573,9 @@ footer p { min-width: 75px; max-width: 75px; } + .plan { + display: inline; + } .accordian-body { margin: 5px 0px 5px 10px; } diff --git a/resource/template/theme-server-status/header.html b/resource/template/theme-server-status/header.html index f1a098f..4247a70 100644 --- a/resource/template/theme-server-status/header.html +++ b/resource/template/theme-server-status/header.html @@ -26,9 +26,9 @@ - - - + + + diff --git a/resource/template/theme-server-status/home-group-false.html b/resource/template/theme-server-status/home-group-false.html index cd1792c..4a8f42b 100644 --- a/resource/template/theme-server-status/home-group-false.html +++ b/resource/template/theme-server-status/home-group-false.html @@ -35,8 +35,8 @@ @#getPlatformName(node.os) === '' && node.stateuptime > 0 ? 'linux' : getPlatformName(node.os)#@ - - @#node.stateuptime > 0 ? (node.location || 'RB') : ''#@ + + @#node.stateuptime > 0 ? (node.location || 'UN') : ''#@