2024-04-08 21:02:09 +00:00
|
|
|
<script lang="ts">
|
|
|
|
|
import ImmichLogo from '$lib/components/shared-components/immich-logo.svelte';
|
|
|
|
|
import Icon from '$lib/components/elements/icon.svelte';
|
|
|
|
|
import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte';
|
|
|
|
|
import { mdiClose } from '@mdi/js';
|
2024-06-04 21:53:00 +02:00
|
|
|
import { t } from 'svelte-i18n';
|
2024-04-08 21:02:09 +00:00
|
|
|
|
2024-11-14 08:43:25 -06:00
|
|
|
interface Props {
|
|
|
|
|
/**
|
|
|
|
|
* Unique identifier for the header text.
|
|
|
|
|
*/
|
|
|
|
|
id: string;
|
|
|
|
|
title: string;
|
|
|
|
|
onClose: () => void;
|
|
|
|
|
/**
|
|
|
|
|
* If true, the logo will be displayed next to the modal title.
|
|
|
|
|
*/
|
|
|
|
|
showLogo?: boolean;
|
|
|
|
|
/**
|
|
|
|
|
* Optional icon to display next to the modal title, if `showLogo` is false.
|
|
|
|
|
*/
|
|
|
|
|
icon?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let { id, title, onClose, showLogo = false, icon = undefined }: Props = $props();
|
2024-04-08 21:02:09 +00:00
|
|
|
</script>
|
|
|
|
|
|
2024-09-09 23:37:53 -04:00
|
|
|
<div class="flex place-items-center justify-between px-5 pb-3">
|
2024-04-08 21:02:09 +00:00
|
|
|
<div class="flex gap-2 place-items-center">
|
|
|
|
|
{#if showLogo}
|
2025-03-24 17:36:36 -04:00
|
|
|
<ImmichLogo noText={true} class="h-[40px]" />
|
2024-04-08 21:02:09 +00:00
|
|
|
{:else if icon}
|
2024-09-10 00:12:26 -04:00
|
|
|
<Icon path={icon} size={24} ariaHidden={true} class="text-immich-primary dark:text-immich-dark-primary" />
|
2024-04-08 21:02:09 +00:00
|
|
|
{/if}
|
|
|
|
|
<h1 {id}>
|
|
|
|
|
{title}
|
|
|
|
|
</h1>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-03-03 14:24:26 +00:00
|
|
|
<CircleIconButton onclick={onClose} icon={mdiClose} size="20" title={$t('close')} />
|
2024-04-08 21:02:09 +00:00
|
|
|
</div>
|