feat(web): more localized number formatting (#11401)

This commit is contained in:
Michel Heusschen 2024-07-29 16:38:27 +02:00 committed by GitHub
parent 2e059bfbfd
commit 0237f9baa3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 44 additions and 19 deletions

View file

@ -108,7 +108,10 @@
{/if}
<span class="text-immich-primary dark:text-immich-dark-primary">
{#if user.quotaSizeInBytes}
({((user.usage / user.quotaSizeInBytes) * 100).toFixed(0)}%)
({(user.usage / user.quotaSizeInBytes).toLocaleString($locale, {
style: 'percent',
maximumFractionDigits: 0,
})})
{:else}
({$t('unlimited')})
{/if}