mirror of
https://github.com/immich-app/immich.git
synced 2025-12-03 17:19:52 +09:00
* chore(web): another missing translations * unused removed * more keys * lint fix * test fixed * dynamic translation fix * fixes * people search translation * params fixed * keep filter setting fix * lint fix * $t fixes * Update web/src/lib/i18n/en.json Co-authored-by: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> * another missing * activity translation * link sharing translations * expiration dropdown fix - didn't work localized * notification title * device logout * search results * reset to default * unsaved change * select from computer * selected * select-2 * select-3 * unmerge * pluralize, force icu message * Update web/src/lib/components/asset-viewer/asset-viewer.svelte Co-authored-by: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> * review fixes * remove user * plural fixes * ffmpeg settings * fixes * error title * plural fixes * onboarding * change password * more more * console log fix * another * api key desc * map marker * format fix * key fix * asset-utils * utils * misc --------- Co-authored-by: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com>
46 lines
1.3 KiB
Svelte
46 lines
1.3 KiB
Svelte
<script lang="ts">
|
|
import { quintOut } from 'svelte/easing';
|
|
import { fly } from 'svelte/transition';
|
|
import Combobox, { type ComboBoxOption } from '$lib/components/shared-components/combobox.svelte';
|
|
import { t } from 'svelte-i18n';
|
|
|
|
export let title: string;
|
|
export let comboboxPlaceholder: string;
|
|
export let subtitle = '';
|
|
export let isEdited = false;
|
|
export let options: ComboBoxOption[];
|
|
export let selectedOption: ComboBoxOption;
|
|
export let onSelect: (combobox: ComboBoxOption | undefined) => void;
|
|
</script>
|
|
|
|
<div class="grid grid-cols-2">
|
|
<div>
|
|
<div class="flex h-[26px] place-items-center gap-1">
|
|
<label class="font-medium text-immich-primary dark:text-immich-dark-primary text-sm" for={title}>
|
|
{title}
|
|
</label>
|
|
{#if isEdited}
|
|
<div
|
|
transition:fly={{ x: 10, duration: 200, easing: quintOut }}
|
|
class="rounded-full bg-orange-100 px-2 text-[10px] text-orange-900"
|
|
>
|
|
{$t('unsaved_change')}
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
|
|
<p class="text-sm dark:text-immich-dark-fg">{subtitle}</p>
|
|
</div>
|
|
<div class="flex items-center">
|
|
<Combobox
|
|
label={title}
|
|
hideLabel={true}
|
|
{selectedOption}
|
|
{options}
|
|
placeholder={comboboxPlaceholder}
|
|
on:select={({ detail }) => onSelect(detail)}
|
|
/>
|
|
<slot />
|
|
</div>
|
|
</div>
|