💄 修复主题错误

This commit is contained in:
naiba 2021-07-06 11:57:53 +08:00
parent 557cccd770
commit 02f0f25d9c
4 changed files with 7 additions and 3 deletions

View File

@ -246,7 +246,7 @@
}, },
formatByteSize(bs) { formatByteSize(bs) {
const x = this.readableBytes(bs) const x = this.readableBytes(bs)
return x != "NaN undefined" ? x : '0 KB' return x != "NaN undefined" ? x : '0B'
} }
} }
}) })

View File

@ -215,7 +215,7 @@
}, },
formatByteSize(bs) { formatByteSize(bs) {
const x = readableBytes(bs) const x = readableBytes(bs)
return x != "NaN undefined" ? x : '0 KB' return x != "NaN undefined" ? x : '0B'
} }
} }
}) })

View File

@ -211,6 +211,10 @@
sizes = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]; sizes = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
return parseFloat((bytes / Math.pow(1024, i)).toFixed(2)) + sizes[i]; return parseFloat((bytes / Math.pow(1024, i)).toFixed(2)) + sizes[i];
}, },
formatByteSize(bs) {
const x = this.readableBytes(bs)
return x != "NaN undefined" ? x : '0B'
},
troggleDarkMode() { troggleDarkMode() {
const hour = new Date(Date.now()).getHours() const hour = new Date(Date.now()).getHours()
if (hour > 17 || hour < 4) { if (hour > 17 || hour < 4) {

View File

@ -13,7 +13,7 @@ import (
pb "github.com/naiba/nezha/proto" pb "github.com/naiba/nezha/proto"
) )
var Version = "v0.8.5" // !!记得修改 README 中的 badge 版本!! var Version = "v0.8.6" // !!记得修改 README 中的 badge 版本!!
var ( var (
Conf *model.Config Conf *model.Config