Skip to content

Commit

Permalink
improve: status-server主题日常优化 (#467)
Browse files Browse the repository at this point in the history
* improve: status-server主题日常优化
1.首页vps套餐流量增加一种类型max(in,out)类型,感谢@hi2global
2.network页修复逻辑缺陷
3.一些其他小优化

演示地址 https://dev.nezha.pp.ua/

* 修正 NetTransfer 展示方式
  • Loading branch information
nap0o authored Nov 4, 2024
1 parent 96c3fd4 commit c20dfdc
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 30 deletions.
2 changes: 0 additions & 2 deletions resource/static/theme-server-status/css/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ body[theme="dark"] .content {
background-color: rgba(28, 29, 38, 1);
border: none;
box-shadow: rgba(0, 0, 0, 0.5) 0 0.625em 2em;
-webkit-box-shadow: rgba(0, 0, 0, 0.5) 0 0.625em 2em;
box-shadow: rgba(0, 0, 0, 0.5) 0 0.625em 2em;
}

body[theme="dark"] .table {
Expand Down
2 changes: 0 additions & 2 deletions resource/static/theme-server-status/css/dark.plus.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ body[theme="dark"] .content {
background-color: rgba(28, 29, 38, 0.8);
border: none;
box-shadow: rgba(0, 0, 0, 0.5) 0 0.625em 2em;
-webkit-box-shadow: rgba(0, 0, 0, 0.5) 0 0.625em 2em;
box-shadow: rgba(0, 0, 0, 0.5) 0 0.625em 2em;
}

body[theme="dark"] .table > thead > tr.node-group-tag > th,
Expand Down
5 changes: 1 addition & 4 deletions resource/static/theme-server-status/css/light.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions resource/static/theme-server-status/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ tr.accordion-toggle{
}

.node-cell.network {
min-width: 100px;
max-width: 100px;
min-width: 110px;
max-width: 110px;
}

.node-cell.traffic {
Expand Down
4 changes: 2 additions & 2 deletions resource/template/theme-server-status/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
</span>
</aside>
<template v-if="semiTransparent">
<link rel="stylesheet" href="/static/theme-server-status/css/light.plus.css?v20241008">
<link rel="stylesheet" href="/static/theme-server-status/css/dark.plus.css?v20241008">
<link rel="stylesheet" href="/static/theme-server-status/css/light.plus.css?v20241103">
<link rel="stylesheet" href="/static/theme-server-status/css/dark.plus.css?v20241103">
</template>
</div>
{{if ts .CustomCode}}{{.CustomCode|safe}}{{end}}
Expand Down
6 changes: 3 additions & 3 deletions resource/template/theme-server-status/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
<script src="https://unpkg.com/[email protected]/dist/js/bootstrap.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/vue.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/echarts.min.js"></script>
<link rel="stylesheet" href="/static/theme-server-status/css/main.css?v20241029">
<link rel="stylesheet" href="/static/theme-server-status/css/dark.css?v20241029">
<link rel="stylesheet" href="/static/theme-server-status/css/light.css?v20241029">
<link rel="stylesheet" href="/static/theme-server-status/css/main.css?v20241103">
<link rel="stylesheet" href="/static/theme-server-status/css/dark.css?v20241103">
<link rel="stylesheet" href="/static/theme-server-status/css/light.css?v20241103">
<script src="/static/theme-server-status/js/mixin.js?v20240915"></script>
</head>
<body>
Expand Down
11 changes: 4 additions & 7 deletions resource/template/theme-server-status/home-group-false.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,17 @@
<span v-else><i class="bi bi-cash-stack"></i> @#node.additional.price.amount#@@#(node.additional.price.cycle ? '/' + node.additional.price.cycle : '')#@</span>
</span>
<span v-if="node.additional && node.additional.remaining.endDate" class="plan enddate">
<i class="bi bi-clock-history"></i>
<span v-if="node.additional.remaining.days == 'lifetime'">{{tr "Lifetime"}}</span>
<span v-else-if="node.additional.remaining.days < 0">{{tr "Expired"}}</span>
<span v-else>@#node.additional.remaining.endDate.toISOString().split('T')[0]#@</span>
<span v-else><i class="bi bi-clock-history"></i> @#node.additional.remaining.endDate.toISOString().split('T')[0]#@</span>
</span>
<span v-if="node.additional && node.additional.plan.bandwidth" class="plan bandwidth">
<i class="bi bi-speedometer2"></i>
<span>@#node.additional.plan.bandwidth#@</span>
</span>
<span v-if="node.additional && node.additional.plan.trafficVol" class="plan traffic">
<span v-if="node.additional && node.additional.plan.trafficVol" class="plan traffics">
<i v-if="node.additional && node.additional.plan.trafficType == 1" class="bi bi-arrow-up"></i>
<i v-else-if="node.additional && node.additional.plan.trafficType == 3" class="bi bi-arrows-collapse"></i>
<i v-else class="bi bi-arrow-down-up"></i>
<span>@#node.additional.plan.trafficVol#@</span>
</span>
Expand Down Expand Up @@ -159,10 +159,7 @@
</span>
<span class="node-cell-expand">
<span class="node-cell-expand-label">{{tr "NetTransfer"}}:</span>
<i class="arrow alternate circle down outline icon"
style="margin: 0"></i>@#formatByteSize(node.state.NetInTransfer)#@
<i class="arrow alternate circle up outline icon"
style="margin: 0"></i>@#formatByteSize(node.state.NetOutTransfer)#@
IN @#formatByteSize(node.state.NetInTransfer)#@ / OUT @#formatByteSize(node.state.NetOutTransfer)#@
</span>
<span class="node-cell-expand load">
<span class="node-cell-expand-label">{{tr "Load"}}:</span>
Expand Down
11 changes: 4 additions & 7 deletions resource/template/theme-server-status/home-group-true.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,17 @@
<span v-else><i class="bi bi-cash-stack"></i> @#node.additional.price.amount#@@#(node.additional.price.cycle ? '/' + node.additional.price.cycle : '')#@</span>
</span>
<span v-if="node.additional && node.additional.remaining.endDate" class="plan enddate">
<i class="bi bi-clock-history"></i>
<span v-if="node.additional.remaining.days == 'lifetime'">{{tr "Lifetime"}}</span>
<span v-else-if="node.additional.remaining.days < 0">{{tr "Expired"}}</span>
<span v-else>@#node.additional.remaining.endDate.toISOString().split('T')[0]#@</span>
<span v-else><i class="bi bi-clock-history"></i> @#node.additional.remaining.endDate.toISOString().split('T')[0]#@</span>
</span>
<span v-if="node.additional && node.additional.plan.bandwidth" class="plan bandwidth">
<i class="bi bi-speedometer2"></i>
<span>@#node.additional.plan.bandwidth#@</span>
</span>
<span v-if="node.additional && node.additional.plan.trafficVol" class="plan traffic">
<span v-if="node.additional && node.additional.plan.trafficVol" class="plan traffics">
<i v-if="node.additional && node.additional.plan.trafficType == 1" class="bi bi-arrow-up"></i>
<i v-else-if="node.additional && node.additional.plan.trafficType == 3" class="bi bi-arrows-collapse"></i>
<i v-else class="bi bi-arrow-down-up"></i>
<span>@#node.additional.plan.trafficVol#@</span>
</span>
Expand Down Expand Up @@ -162,10 +162,7 @@
</span>
<span class="node-cell-expand">
<span class="node-cell-expand-label">{{tr "NetTransfer"}}:</span>
<i class="arrow alternate circle down outline icon"
style="margin: 0"></i>@#formatByteSize(node.state.NetInTransfer)#@
<i class="arrow alternate circle up outline icon"
style="margin: 0"></i>@#formatByteSize(node.state.NetOutTransfer)#@
IN @#formatByteSize(node.state.NetInTransfer)#@ / OUT @#formatByteSize(node.state.NetOutTransfer)#@
</span>
<span class="node-cell-expand load">
<span class="node-cell-expand-label">{{tr "Load"}}:</span>
Expand Down
2 changes: 1 addition & 1 deletion resource/template/theme-server-status/network.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</li>
</ul>
</div>
<div class="chartTitle" @click="showCharts(nextServerId)"><i class="chartCountryCode" :class="'fi fi-' + chartCountryCode"></i> @#chartTitle#@</div>
<div v-if="chartTitle" class="chartTitle" @click="showCharts(nextServerId)"><i class="chartCountryCode" :class="'fi fi-' + chartCountryCode"></i> @#chartTitle#@</div>
<div id="chartbox" style="width:100%;height:auto;"></div>
</div>
{{template "theme-server-status/footer" .}}
Expand Down

0 comments on commit c20dfdc

Please sign in to comment.