mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore(web): migration svelte 5 syntax (#13883)
This commit is contained in:
parent
9203a61709
commit
0b3742cf13
310 changed files with 6435 additions and 4176 deletions
|
|
@ -4,12 +4,16 @@
|
|||
import { mdiArrowUpLeft, mdiChevronRight } from '@mdi/js';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
export let pathSegments: string[] = [];
|
||||
export let getLink: (path: string) => string;
|
||||
export let title: string;
|
||||
export let icon: string;
|
||||
interface Props {
|
||||
pathSegments?: string[];
|
||||
getLink: (path: string) => string;
|
||||
title: string;
|
||||
icon: string;
|
||||
}
|
||||
|
||||
$: isRoot = pathSegments.length === 0;
|
||||
let { pathSegments = [], getLink, title, icon }: Props = $props();
|
||||
|
||||
let isRoot = $derived(pathSegments.length === 0);
|
||||
</script>
|
||||
|
||||
<nav class="flex items-center py-2">
|
||||
|
|
@ -21,6 +25,7 @@
|
|||
href={getLink(pathSegments.slice(0, -1).join('/'))}
|
||||
class="mr-2"
|
||||
padding="2"
|
||||
onclick={() => {}}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
|
|
@ -37,6 +42,7 @@
|
|||
size="1.25em"
|
||||
padding="2"
|
||||
aria-current={isRoot ? 'page' : undefined}
|
||||
onclick={() => {}}
|
||||
/>
|
||||
</li>
|
||||
{#each pathSegments as segment, index}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue