mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 20:58:14 -05:00
improve: status-server主题日常优化 (#432)
* improve: status-server主题日常优化 1. 首页账单信息:价格设置成“-1”前台展示为”PAYG“,自动续期(autoRenewal)功能增加支持付费周期yr,mo; 2. 当未获取到国旗图标时,默认彩虹旗; 3. 当未获取到os(操作系统)信息时,默认linux 4. 一些其他优化 * 修改表达不准确的语言文件
This commit is contained in:
parent
08aaea8244
commit
937696c26d
2
resource/l10n/zh-CN.toml
vendored
2
resource/l10n/zh-CN.toml
vendored
@ -425,7 +425,7 @@ other = "活动"
|
||||
other = "版本"
|
||||
|
||||
[NetSpeed]
|
||||
other = "网络"
|
||||
other = "网速"
|
||||
|
||||
[Uptime]
|
||||
other = "在线"
|
||||
|
2
resource/l10n/zh-TW.toml
vendored
2
resource/l10n/zh-TW.toml
vendored
@ -425,7 +425,7 @@ other = "活動"
|
||||
other = "版本"
|
||||
|
||||
[NetSpeed]
|
||||
other = "網路"
|
||||
other = "網速"
|
||||
|
||||
[Uptime]
|
||||
other = "在線"
|
||||
|
@ -237,8 +237,8 @@ tr.accordion-toggle{
|
||||
}
|
||||
|
||||
.node-cell.network {
|
||||
min-width: 110px;
|
||||
max-width: 110px;
|
||||
min-width: 100px;
|
||||
max-width: 100px;
|
||||
}
|
||||
|
||||
.node-cell.traffic {
|
||||
@ -549,6 +549,10 @@ footer p{
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
}
|
||||
.node-cell.network {
|
||||
min-width: 95px;
|
||||
max-width: 95px;
|
||||
}
|
||||
.node-cell.remaining {
|
||||
min-width: 75px;
|
||||
max-width: 75px;
|
||||
|
@ -28,8 +28,8 @@
|
||||
</span>
|
||||
</aside>
|
||||
<template v-if="semiTransparent">
|
||||
<link rel="stylesheet" href="/static/theme-server-status/css/light.plus.css?v20240807">
|
||||
<link rel="stylesheet" href="/static/theme-server-status/css/dark.plus.css?v20240807">
|
||||
<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">
|
||||
</template>
|
||||
</div>
|
||||
{{if ts .CustomCode}}{{.CustomCode|safe}}{{end}}
|
||||
|
@ -26,9 +26,9 @@
|
||||
<script src="https://unpkg.com/bootstrap@3.4.1/dist/js/bootstrap.min.js"></script>
|
||||
<script src="https://unpkg.com/vue@2.6.14/dist/vue.min.js"></script>
|
||||
<script src="https://unpkg.com/echarts@5.5.0/dist/echarts.min.js"></script>
|
||||
<link rel="stylesheet" href="/static/theme-server-status/css/main.css?v20240929">
|
||||
<link rel="stylesheet" href="/static/theme-server-status/css/dark.css?v202409029">
|
||||
<link rel="stylesheet" href="/static/theme-server-status/css/light.css?v20240916">
|
||||
<link rel="stylesheet" href="/static/theme-server-status/css/main.css?v20241008">
|
||||
<link rel="stylesheet" href="/static/theme-server-status/css/dark.css?v20241008">
|
||||
<link rel="stylesheet" href="/static/theme-server-status/css/light.css?v20241008">
|
||||
<script src="/static/theme-server-status/js/mixin.js?v20240915"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -32,15 +32,16 @@
|
||||
<i v-if='isWindowsPlatform(node.host.Platform)' class="windows icon"></i>
|
||||
<i v-else-if='getFontLogoClass(node.host.Platform) == "" && node.stateuptime > 0' class="fl-tux"></i>
|
||||
<i v-else :class="'fl-' + getFontLogoClass(node.host.Platform)"></i>
|
||||
<span class="node-cell-os-text">@#getPlatformName(node.os)#@</span>
|
||||
<span class="node-cell-os-text">@#getPlatformName(node.os) === '' && node.stateuptime > 0 ? 'linux' : getPlatformName(node.os)#@</span>
|
||||
</td>
|
||||
<td style="text-align: center;" class="node-cell location">
|
||||
<i :class="'fi fi-' + node.location"></i>
|
||||
<span class="node-cell-location-text text-uppercase">@#node.location#@</span>
|
||||
<td class="node-cell location center">
|
||||
<i :class="'fi fi-' + (node.stateuptime > 0 ? (node.location || 'rb') : '')"></i>
|
||||
<span class="node-cell-location-text text-uppercase">@#node.stateuptime > 0 ? (node.location || 'RB') : ''#@</span>
|
||||
</td>
|
||||
<td v-if="nodesNoTag.some(item => item.additional && item.additional.price && Object.keys(item.additional.price).length > 0)" class="node-cell price center">
|
||||
<template v-if="node.additional && node.additional.price">
|
||||
<span v-if="node.additional.price.amount == 0" class="node-cell-price-text">Free</span>
|
||||
<span v-if="node.additional.price.amount == 0" class="node-cell-price-text">FREE</span>
|
||||
<span v-else-if="node.additional.price.amount == -1" class="node-cell-price-text">PAYG</span>
|
||||
<span v-else class="node-cell-price-text">@#node.additional.price.amount#@@#(node.additional.price.cycle ? '/' + node.additional.price.cycle : '')#@</span>
|
||||
</template>
|
||||
</td>
|
||||
@ -89,8 +90,8 @@
|
||||
<div style="display: flex;left-items: center;justify-content: center;flex-direction: column; max-width: 89vw">
|
||||
<span class="node-cell-expand">
|
||||
<span class="node-cell-expand-label">{{tr "Platform"}}:</span>
|
||||
@#node.host.Platform#@-@#node.host.PlatformVersion#@
|
||||
[<span v-if="node.host.Virtualization">@#node.host.Virtualization#@:</span>@#node.host.Arch#@]
|
||||
<span v-if="node.host.Platform">@#node.host.Platform#@@#node.host.PlatformVersion ? '-' + node.host.PlatformVersion : ''#@</span>
|
||||
<span v-if="node.host.Arch">[@#node.host.Virtualization ? node.host.Virtualization + ':' : ''#@@#node.host.Arch#@]</span>
|
||||
</span>
|
||||
<span class="node-cell-expand" v-if="node.host.CPU">
|
||||
<span class="node-cell-expand-label">CPU:</span>
|
||||
|
@ -35,15 +35,16 @@
|
||||
<i v-if='isWindowsPlatform(node.host.Platform)' class="windows icon"></i>
|
||||
<i v-else-if='getFontLogoClass(node.host.Platform) == "" && node.stateuptime > 0' class="fl-tux"></i>
|
||||
<i v-else :class="'fl-' + getFontLogoClass(node.host.Platform)"></i>
|
||||
<span class="node-cell-os-text">@#getPlatformName(node.os)#@</span>
|
||||
<span class="node-cell-os-text">@#getPlatformName(node.os) === '' && node.stateuptime > 0 ? 'linux' : getPlatformName(node.os)#@</span>
|
||||
</td>
|
||||
<td style="text-align: center;" class="node-cell location">
|
||||
<i :class="'fi fi-' + node.location"></i>
|
||||
<span class="node-cell-location-text text-uppercase"> @#node.location#@</span>
|
||||
<td class="node-cell location center">
|
||||
<i :class="'fi fi-' + (node.stateuptime > 0 ? (node.location || 'rb') : '')"></i>
|
||||
<span class="node-cell-location-text text-uppercase">@#node.stateuptime > 0 ? (node.location || 'RB') : ''#@</span>
|
||||
</td>
|
||||
<td v-if="group.data.some(item => item.additional && item.additional.price && Object.keys(item.additional.price).length > 0)" class="node-cell price center">
|
||||
<template v-if="node.additional && node.additional.price">
|
||||
<span v-if="node.additional.price.amount == 0" class="node-cell-price-text">Free</span>
|
||||
<span v-if="node.additional.price.amount == 0" class="node-cell-price-text">FREE</span>
|
||||
<span v-else-if="node.additional.price.amount == -1" class="node-cell-price-text">PAYG</span>
|
||||
<span v-else class="node-cell-price-text">@#node.additional.price.amount#@@#(node.additional.price.cycle ? '/' + node.additional.price.cycle : '')#@</span>
|
||||
</template>
|
||||
</td>
|
||||
@ -92,8 +93,8 @@
|
||||
<div style="display: flex;left-items: center;justify-content: center;flex-direction: column; max-width: 89vw">
|
||||
<span class="node-cell-expand">
|
||||
<span class="node-cell-expand-label">{{tr "Platform"}}:</span>
|
||||
@#node.host.Platform#@-@#node.host.PlatformVersion#@
|
||||
[<span v-if="node.host.Virtualization">@#node.host.Virtualization#@:</span>@#node.host.Arch#@]
|
||||
<span v-if="node.host.Platform">@#node.host.Platform#@@#node.host.PlatformVersion ? '-' + node.host.PlatformVersion : ''#@</span>
|
||||
<span v-if="node.host.Arch">[@#node.host.Virtualization ? node.host.Virtualization + ':' : ''#@@#node.host.Arch#@]</span>
|
||||
</span>
|
||||
<span class="node-cell-expand" v-if="node.host.CPU">
|
||||
<span class="node-cell-expand-label">CPU:</span>
|
||||
|
@ -819,6 +819,7 @@
|
||||
|
||||
switch (cycle) {
|
||||
case '月':
|
||||
case 'mo':
|
||||
case 'month':
|
||||
case 'monthly':
|
||||
case 'm':
|
||||
@ -834,6 +835,7 @@
|
||||
case 'h':
|
||||
return "H";
|
||||
case '年':
|
||||
case 'yr':
|
||||
case 'year':
|
||||
case 'annually':
|
||||
case 'y':
|
||||
|
Loading…
Reference in New Issue
Block a user