mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(web): Localize dates and numbers (#1056)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
import Dns from 'svelte-material-icons/Dns.svelte';
|
||||
import LoadingSpinner from './loading-spinner.svelte';
|
||||
import { api, ServerInfoResponseDto } from '@api';
|
||||
import { asByteUnitString } from '../../utils/byte-units';
|
||||
|
||||
let isServerOk = true;
|
||||
let serverVersion = '';
|
||||
@@ -61,7 +62,7 @@
|
||||
style={`width: ${getStorageUsagePercentage()}%`}
|
||||
/>
|
||||
</div>
|
||||
<p class="text-xs">{serverInfo?.diskUse} of {serverInfo?.diskSize} used</p>
|
||||
<p class="text-xs">{asByteUnitString(serverInfo?.diskUseRaw)} of {asByteUnitString(serverInfo?.diskSizeRaw)} used</p>
|
||||
{:else}
|
||||
<div class="mt-2">
|
||||
<LoadingSpinner />
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import WindowMinimize from 'svelte-material-icons/WindowMinimize.svelte';
|
||||
import type { UploadAsset } from '$lib/models/upload-asset';
|
||||
import { notificationController, NotificationType } from './notification/notification';
|
||||
import { getHumanReadableBytes } from '../../utils/byte-units';
|
||||
import { getBytesWithUnit } from '../../utils/byte-units';
|
||||
|
||||
let showDetail = true;
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
<input
|
||||
disabled
|
||||
class="bg-gray-100 border w-full p-1 rounded-md text-[10px] px-2"
|
||||
value={`[${getHumanReadableBytes(uploadAsset.file.size)}] ${
|
||||
value={`[${getBytesWithUnit(uploadAsset.file.size)}] ${
|
||||
uploadAsset.file.name
|
||||
}`}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user