From c896fe393fcea0ec7b7849709efd6c05d04cc462 Mon Sep 17 00:00:00 2001 From: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com> Date: Fri, 14 Jun 2024 19:27:46 +0200 Subject: [PATCH] refactor(web): byte unit utils (#10332) refactor byte unit utils --- .../server-stats/server-stats-panel.svelte | 6 +- .../admin-page/server-stats/stats-card.svelte | 5 +- .../asset-viewer/detail-panel.svelte | 4 +- .../asset-viewer/download-panel.svelte | 4 +- .../components/forms/create-user-form.svelte | 4 +- .../components/forms/edit-user-form.svelte | 10 ++-- .../shared-components/status-box.svelte | 8 +-- .../upload-asset-preview.svelte | 6 +- .../download-settings.svelte | 6 +- web/src/lib/utils/asset-utils.ts | 4 +- web/src/lib/utils/byte-converter.ts | 37 ------------ web/src/lib/utils/byte-units.spec.ts | 25 ++++++++ web/src/lib/utils/byte-units.ts | 59 +++++++++++++------ .../admin/library-management/+page.svelte | 4 +- .../routes/admin/user-management/+page.svelte | 4 +- 15 files changed, 99 insertions(+), 87 deletions(-) delete mode 100644 web/src/lib/utils/byte-converter.ts create mode 100644 web/src/lib/utils/byte-units.spec.ts diff --git a/web/src/lib/components/admin-page/server-stats/server-stats-panel.svelte b/web/src/lib/components/admin-page/server-stats/server-stats-panel.svelte index 6842387df7..401622f63e 100644 --- a/web/src/lib/components/admin-page/server-stats/server-stats-panel.svelte +++ b/web/src/lib/components/admin-page/server-stats/server-stats-panel.svelte @@ -1,7 +1,7 @@