refactor: app init event (#17937)

This commit is contained in:
Jason Rasmussen
2025-04-28 14:48:33 -04:00
committed by GitHub
parent 895b2bf5cd
commit 7f69abbf0d
19 changed files with 81 additions and 75 deletions
@@ -1,10 +1,11 @@
<script lang="ts">
import StarRating from '$lib/components/shared-components/star-rating.svelte';
import { authManager } from '$lib/managers/auth-manager.svelte';
import { preferences } from '$lib/stores/user.store';
import { handlePromiseError } from '$lib/utils';
import { handleError } from '$lib/utils/handle-error';
import { updateAsset, type AssetResponseDto } from '@immich/sdk';
import { t } from 'svelte-i18n';
import StarRating from '$lib/components/shared-components/star-rating.svelte';
import { handlePromiseError, isSharedLink } from '$lib/utils';
import { preferences } from '$lib/stores/user.store';
interface Props {
asset: AssetResponseDto;
@@ -24,7 +25,7 @@
};
</script>
{#if !isSharedLink() && $preferences?.ratings.enabled}
{#if !authManager.key && $preferences?.ratings.enabled}
<section class="px-4 pt-2">
<StarRating {rating} readOnly={!isOwner} onRating={(rating) => handlePromiseError(handleChangeRating(rating))} />
</section>