From 02f0f25d9cb2cdf035abf7ab1c03f16277aee7e7 Mon Sep 17 00:00:00 2001 From: naiba Date: Tue, 6 Jul 2021 11:57:53 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20=E4=BF=AE=E5=A4=8D=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/template/theme-daynight/home.html | 2 +- resource/template/theme-default/home.html | 2 +- resource/template/theme-hotaru/home.html | 4 ++++ service/dao/dao.go | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/resource/template/theme-daynight/home.html b/resource/template/theme-daynight/home.html index 0188992..0f3df3a 100644 --- a/resource/template/theme-daynight/home.html +++ b/resource/template/theme-daynight/home.html @@ -246,7 +246,7 @@ }, formatByteSize(bs) { const x = this.readableBytes(bs) - return x != "NaN undefined" ? x : '0 KB' + return x != "NaN undefined" ? x : '0B' } } }) diff --git a/resource/template/theme-default/home.html b/resource/template/theme-default/home.html index 4f06a86..d7261d1 100644 --- a/resource/template/theme-default/home.html +++ b/resource/template/theme-default/home.html @@ -215,7 +215,7 @@ }, formatByteSize(bs) { const x = readableBytes(bs) - return x != "NaN undefined" ? x : '0 KB' + return x != "NaN undefined" ? x : '0B' } } }) diff --git a/resource/template/theme-hotaru/home.html b/resource/template/theme-hotaru/home.html index b0fbf5b..65fa4d3 100644 --- a/resource/template/theme-hotaru/home.html +++ b/resource/template/theme-hotaru/home.html @@ -211,6 +211,10 @@ sizes = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]; 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() { const hour = new Date(Date.now()).getHours() if (hour > 17 || hour < 4) { diff --git a/service/dao/dao.go b/service/dao/dao.go index 26626b1..95cd279 100644 --- a/service/dao/dao.go +++ b/service/dao/dao.go @@ -13,7 +13,7 @@ import ( pb "github.com/naiba/nezha/proto" ) -var Version = "v0.8.5" // !!记得修改 README 中的 badge 版本!! +var Version = "v0.8.6" // !!记得修改 README 中的 badge 版本!! var ( Conf *model.Config