mirror of
https://github.com/immich-app/immich.git
synced 2025-12-22 01:11:20 +03:00
* fix(web): missing svelte translations * fixes * format fix * translation keys fix * "merge" key fix * Update web/src/lib/components/shared-components/side-bar/more-information-albums.svelte Co-authored-by: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> * Update web/src/lib/i18n/en.json Co-authored-by: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> * suggestion fix * trash pluralization * video+photo count fix * format fix * unused removal * translation key fix * duplicate key removal * format fix --------- Co-authored-by: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com>
24 lines
618 B
Svelte
24 lines
618 B
Svelte
<script lang="ts">
|
|
import { type AlbumCountResponseDto, getAlbumCount } from '@immich/sdk';
|
|
import LoadingSpinner from '$lib/components/shared-components/loading-spinner.svelte';
|
|
import { t } from 'svelte-i18n';
|
|
|
|
export let albumCountType: keyof AlbumCountResponseDto;
|
|
|
|
const handleAlbumCount = async () => {
|
|
try {
|
|
return await getAlbumCount();
|
|
} catch {
|
|
return { owned: 0, shared: 0, notShared: 0 };
|
|
}
|
|
};
|
|
</script>
|
|
|
|
{#await handleAlbumCount()}
|
|
<LoadingSpinner />
|
|
{:then data}
|
|
<div>
|
|
<p>{$t('albums_count', { values: { count: data[albumCountType] } })}</p>
|
|
</div>
|
|
{/await}
|