mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00: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:
parent
4e16e2520d
commit
01f52c9021
52 changed files with 83 additions and 150 deletions
|
|
@ -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'];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue