mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
* feat: add an option to change the date formats * pr feedback * fix: change title * fix: show list supported by the browser * fix: tests * fix: dates * fix: check only if locale is set * fix: better fallback value * fix: fallback * fix: fallback * feat: add default locale option * refactor: shared components * refactor: shared components * prepare for svelte 5 * don't use relative paths * refactor: fallback value Co-authored-by: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> * fix: parsing store * fix: lint * refactor: locales --------- Co-authored-by: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
32 lines
1012 B
Svelte
32 lines
1012 B
Svelte
<script lang="ts">
|
|
import Button from '$lib/components/elements/buttons/button.svelte';
|
|
import type { ResetOptions } from '$lib/utils/dipatch';
|
|
import { createEventDispatcher } from 'svelte';
|
|
|
|
const dispatch = createEventDispatcher<{
|
|
reset: ResetOptions;
|
|
save: void;
|
|
}>();
|
|
|
|
export let showResetToDefault = true;
|
|
export let disabled = false;
|
|
</script>
|
|
|
|
<div class="mt-8 flex justify-between gap-2">
|
|
<div class="left">
|
|
{#if showResetToDefault}
|
|
<button
|
|
on:click={() => dispatch('reset', { 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"
|
|
>
|
|
Reset to default
|
|
</button>
|
|
{/if}
|
|
</div>
|
|
|
|
<div class="right">
|
|
<Button {disabled} size="sm" color="gray" on:click={() => dispatch('reset', { default: false })}>Reset</Button>
|
|
<Button {disabled} size="sm" on:click={() => dispatch('save')}>Save</Button>
|
|
</div>
|
|
</div>
|