mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-06 05:30:05 +00:00
优化default和server status主题 (#363)
This commit is contained in:
15
resource/template/theme-server-status/home.html
vendored
15
resource/template/theme-server-status/home.html
vendored
@@ -195,6 +195,12 @@
|
||||
isWindowsPlatform(str) {
|
||||
return str.includes('Windows')
|
||||
},
|
||||
getPlatformName(str){
|
||||
if (str.toLowerCase().includes('opensuse')) {
|
||||
return 'openSUSE';
|
||||
}
|
||||
return str;
|
||||
},
|
||||
getFontLogoClass(str) {
|
||||
if (["almalinux",
|
||||
"alpine",
|
||||
@@ -241,6 +247,9 @@
|
||||
> -1) {
|
||||
return str;
|
||||
}
|
||||
if (str == 'darwin') {
|
||||
return 'apple';
|
||||
}
|
||||
if (['openwrt', 'linux', "immortalwrt"].indexOf(str) > -1) {
|
||||
return 'tux';
|
||||
}
|
||||
@@ -250,6 +259,9 @@
|
||||
if (str == 'arch') {
|
||||
return 'archlinux';
|
||||
}
|
||||
if (str.toLowerCase().includes('opensuse')) {
|
||||
return 'opensuse';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
secondToDate(s) {
|
||||
@@ -276,6 +288,9 @@
|
||||
},
|
||||
formatPercents(live,percent) {
|
||||
//if(!live) { percent = 0; }
|
||||
if (isNaN(percent)) {
|
||||
percent = 0;
|
||||
}
|
||||
if (percent <= 0) {
|
||||
percent = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user