goto(`${AppRoute.ALBUMS}/${album.id}`)}
- on:contextmenu|preventDefault={(e) => showContextMenu({ x: e.x, y: e.y })}
+ onclick={() => goto(`${AppRoute.ALBUMS}/${album.id}`)}
+ {oncontextmenu}
>
{album.albumName}
diff --git a/web/src/lib/components/album-page/albums-table.svelte b/web/src/lib/components/album-page/albums-table.svelte
index d9ffe8595b..bd7c7fd7f5 100644
--- a/web/src/lib/components/album-page/albums-table.svelte
+++ b/web/src/lib/components/album-page/albums-table.svelte
@@ -15,10 +15,13 @@
} from '$lib/utils/album-utils';
import { t } from 'svelte-i18n';
- export let groupedAlbums: AlbumGroup[];
- export let albumGroupOption: string = AlbumGroupBy.None;
- export let onShowContextMenu: ((position: ContextMenuPosition, album: AlbumResponseDto) => unknown) | undefined =
- undefined;
+ interface Props {
+ groupedAlbums: AlbumGroup[];
+ albumGroupOption?: string;
+ onShowContextMenu?: ((position: ContextMenuPosition, album: AlbumResponseDto) => unknown) | undefined;
+ }
+
+ let { groupedAlbums, albumGroupOption = AlbumGroupBy.None, onShowContextMenu }: Props = $props();
@@ -46,7 +49,7 @@
>
toggleAlbumGroupCollapsing(albumGroup.id)}
+ onclick={() => toggleAlbumGroupCollapsing(albumGroup.id)}
aria-expanded={!isCollapsed}
>
diff --git a/web/src/lib/components/album-page/share-info-modal.svelte b/web/src/lib/components/album-page/share-info-modal.svelte
index ee98d5a821..778943af3a 100644
--- a/web/src/lib/components/album-page/share-info-modal.svelte
+++ b/web/src/lib/components/album-page/share-info-modal.svelte
@@ -18,15 +18,19 @@
import { t } from 'svelte-i18n';
import ButtonContextMenu from '$lib/components/shared-components/context-menu/button-context-menu.svelte';
- export let album: AlbumResponseDto;
- export let onClose: () => void;
- export let onRemove: (userId: string) => void;
- export let onRefreshAlbum: () => void;
+ interface Props {
+ album: AlbumResponseDto;
+ onClose: () => void;
+ onRemove: (userId: string) => void;
+ onRefreshAlbum: () => void;
+ }
- let currentUser: UserResponseDto;
- let selectedRemoveUser: UserResponseDto | null = null;
+ let { album, onClose, onRemove, onRefreshAlbum }: Props = $props();
- $: isOwned = currentUser?.id == album.ownerId;
+ let currentUser: UserResponseDto | undefined = $state();
+ let selectedRemoveUser: UserResponseDto | null = $state(null);
+
+ let isOwned = $derived(currentUser?.id == album.ownerId);
onMount(async () => {
try {
@@ -123,7 +127,7 @@
{:else if user.id == currentUser?.id}
diff --git a/web/src/lib/components/album-page/user-selection-modal.svelte b/web/src/lib/components/album-page/user-selection-modal.svelte
index ee0a5c7410..fca244ac75 100644
--- a/web/src/lib/components/album-page/user-selection-modal.svelte
+++ b/web/src/lib/components/album-page/user-selection-modal.svelte
@@ -18,13 +18,17 @@
import UserAvatar from '../shared-components/user-avatar.svelte';
import { t } from 'svelte-i18n';
- export let album: AlbumResponseDto;
- export let onClose: () => void;
- export let onSelect: (selectedUsers: AlbumUserAddDto[]) => void;
- export let onShare: () => void;
+ interface Props {
+ album: AlbumResponseDto;
+ onClose: () => void;
+ onSelect: (selectedUsers: AlbumUserAddDto[]) => void;
+ onShare: () => void;
+ }
- let users: UserResponseDto[] = [];
- let selectedUsers: Record = {};
+ let { album, onClose, onSelect, onShare }: Props = $props();
+
+ let users: UserResponseDto[] = $state([]);
+ let selectedUsers: Record = $state({});
const roleOptions: Array<{ title: string; value: AlbumUserRole | 'none'; icon?: string }> = [
{ title: $t('role_editor'), value: AlbumUserRole.Editor, icon: mdiPencil },
@@ -32,7 +36,7 @@
{ title: $t('remove_user'), value: 'none' },
];
- let sharedLinks: SharedLinkResponseDto[] = [];
+ let sharedLinks: SharedLinkResponseDto[] = $state([]);
onMount(async () => {
await getSharedLinks();
const data = await searchUsers();
@@ -121,11 +125,7 @@
{#each users as user}
{#if !Object.keys(selectedUsers).includes(user.id)}
- | |