mirror of
https://github.com/immich-app/immich.git
synced 2025-11-28 13:59:45 +09:00
chore(web): unique ID generation (#9932)
* chore(web): automatically generate unique IDs * fix: revert changes to Slider * chore: add test for id store
This commit is contained in:
@@ -3,13 +3,9 @@
|
||||
import { fade } from 'svelte/transition';
|
||||
import FocusTrap from '$lib/components/shared-components/focus-trap.svelte';
|
||||
import ModalHeader from '$lib/components/shared-components/modal-header.svelte';
|
||||
import { uniqueIdStore } from '$lib/stores/unique-id.store';
|
||||
|
||||
export let onClose: () => void;
|
||||
|
||||
/**
|
||||
* Unique identifier for the modal.
|
||||
*/
|
||||
export let id: string;
|
||||
export let title: string;
|
||||
/**
|
||||
* If true, the logo will be displayed next to the modal title.
|
||||
@@ -28,6 +24,11 @@
|
||||
*/
|
||||
export let width: 'wide' | 'narrow' | 'auto' = 'narrow';
|
||||
|
||||
/**
|
||||
* Unique identifier for the modal.
|
||||
*/
|
||||
let id: string = uniqueIdStore.generateId();
|
||||
|
||||
$: titleId = `${id}-title`;
|
||||
$: isStickyBottom = !!$$slots['sticky-bottom'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user