1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-29 05:21:38 +02:00

refactor(web): byte unit utils (#10332)

refactor byte unit utils
This commit is contained in:
Daniel Dietzler
2024-06-14 19:27:46 +02:00
committed by GitHub
parent b4b654b53f
commit c896fe393f
15 changed files with 99 additions and 87 deletions

View File

@ -32,7 +32,7 @@
import { DateTime } from 'luxon';
import { createEventDispatcher, onMount } from 'svelte';
import { slide } from 'svelte/transition';
import { asByteUnitString } from '$lib/utils/byte-units';
import { getByteUnitString } from '$lib/utils/byte-units';
import { handleError } from '$lib/utils/handle-error';
import ImageThumbnail from '../assets/thumbnail/image-thumbnail.svelte';
import CircleIconButton from '../elements/buttons/circle-icon-button.svelte';
@ -372,7 +372,7 @@
{@const { width, height } = getDimensions(asset.exifInfo)}
<p>{width} x {height}</p>
{/if}
<p>{asByteUnitString(asset.exifInfo.fileSizeInByte, $locale)}</p>
<p>{getByteUnitString(asset.exifInfo.fileSizeInByte, $locale)}</p>
</div>
{#if showAssetPath}
<p class="text-xs opacity-50 break-all" transition:slide={{ duration: 250 }}>