优化default和server status主题 (#363)

This commit is contained in:
nap0o
2024-06-14 06:02:55 -04:00
committed by GitHub
parent a9da084711
commit c3fa4cbbee
10 changed files with 636 additions and 557 deletions

View File

@@ -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;
}