2023-09-20 13:16:33 +02:00
|
|
|
<script lang="ts">
|
2024-02-14 06:38:57 -08:00
|
|
|
import type { LibraryResponseDto } from '@immich/sdk';
|
2023-09-20 13:16:33 +02:00
|
|
|
import Button from '../elements/buttons/button.svelte';
|
2024-06-04 21:53:00 +02:00
|
|
|
import { t } from 'svelte-i18n';
|
2023-09-20 13:16:33 +02:00
|
|
|
|
|
|
|
|
export let library: Partial<LibraryResponseDto>;
|
2024-09-20 23:02:58 +02:00
|
|
|
export let onCancel: () => void;
|
|
|
|
|
export let onSubmit: (library: Partial<LibraryResponseDto>) => void;
|
2023-09-20 13:16:33 +02:00
|
|
|
</script>
|
|
|
|
|
|
2024-09-20 23:02:58 +02:00
|
|
|
<form on:submit|preventDefault={() => onSubmit({ ...library })} autocomplete="off" class="m-4 flex flex-col gap-2">
|
2023-09-20 13:16:33 +02:00
|
|
|
<div class="flex flex-col gap-2">
|
2024-06-04 21:53:00 +02:00
|
|
|
<label class="immich-form-label" for="path">{$t('name')}</label>
|
2023-09-20 13:16:33 +02:00
|
|
|
<input class="immich-form-input" id="name" name="name" type="text" bind:value={library.name} />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex w-full justify-end gap-2 pt-2">
|
2024-09-20 23:02:58 +02:00
|
|
|
<Button size="sm" color="gray" on:click={onCancel}>{$t('cancel')}</Button>
|
2024-06-04 21:53:00 +02:00
|
|
|
<Button size="sm" type="submit">{$t('save')}</Button>
|
2023-09-20 13:16:33 +02:00
|
|
|
</div>
|
|
|
|
|
</form>
|