diff --git a/app.go b/app.go index 9ddea31..0c50da8 100644 --- a/app.go +++ b/app.go @@ -96,7 +96,7 @@ func getFileCountAndSize(dir string) (int, int64, error) { func (a *App) GetDownloads() string { cnt, size, err := getFileCountAndSize("C:\\Users\\admin\\Downloads") checkError("getDownloads", err) - info := fmt.Sprintf("%d(%d Mb)", cnt, size/1024/1024) + info := fmt.Sprintf("%d (%d Mb)", cnt, size/1024/1024) return info } @@ -216,5 +216,5 @@ func getCountReady(ctx context.Context, dir string) int { func (a *App) GetStatus() string { pics := getCountPics("d:\\pics") ready := getCountReady(a.ctx, "d:\\pics-move") - return fmt.Sprintf("%d/%d", pics, ready) + return fmt.Sprintf("%d / %d", pics, ready) } diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index a27a38f..be9d86f 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -27,8 +27,9 @@ function get_disks() { console.log("get disks") GetDisks().then((result) => { console.log("получена информация о дисках:", result) - disks = result; - normal = (disks[0].Free > 10) && (disks[1].Free > 50); + disks = result + disks[0].normal = disks[0].Free > 20; + disks[1].normal = disks[1].Free > 50; }) } @@ -101,7 +102,7 @@ get_status(); {#each disks as disk}