mirror of
https://github.com/immich-app/immich.git
synced 2025-12-19 01:11:07 +03:00
34 lines
1.1 KiB
Svelte
34 lines
1.1 KiB
Svelte
<script lang="ts">
|
|
import Button from '$lib/components/elements/buttons/button.svelte';
|
|
import type { ResetOptions } from '$lib/utils/dipatch';
|
|
import { t } from 'svelte-i18n';
|
|
|
|
interface Props {
|
|
showResetToDefault?: boolean;
|
|
disabled?: boolean;
|
|
onReset: (options: ResetOptions) => void;
|
|
onSave: () => void;
|
|
}
|
|
|
|
let { showResetToDefault = true, disabled = false, onReset, onSave }: Props = $props();
|
|
</script>
|
|
|
|
<div class="mt-8 flex justify-between gap-2">
|
|
<div class="left">
|
|
{#if showResetToDefault}
|
|
<button
|
|
type="button"
|
|
onclick={() => onReset({ default: true })}
|
|
class="bg-none text-sm font-medium text-immich-primary hover:text-immich-primary/75 dark:text-immich-dark-primary hover:dark:text-immich-dark-primary/75"
|
|
>
|
|
{$t('reset_to_default')}
|
|
</button>
|
|
{/if}
|
|
</div>
|
|
|
|
<div class="right">
|
|
<Button {disabled} size="sm" color="gray" onclick={() => onReset({ default: false })}>{$t('reset')}</Button>
|
|
<Button type="submit" {disabled} size="sm" onclick={() => onSave()}>{$t('save')}</Button>
|
|
</div>
|
|
</div>
|