mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: confirm modal (#18238)
This commit is contained in:
parent
93ee6ee0a5
commit
7280331b76
13 changed files with 45 additions and 44 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import ConfirmDialog from '$lib/components/shared-components/dialog/confirm-dialog.svelte';
|
||||
import ConfirmModal from '$lib/modals/ConfirmModal.svelte';
|
||||
import { mount, unmount, type Component, type ComponentProps } from 'svelte';
|
||||
|
||||
type OnCloseData<T> = T extends { onClose: (data?: infer R) => void } ? R : never;
|
||||
|
|
@ -34,8 +34,8 @@ class ModalManager {
|
|||
};
|
||||
}
|
||||
|
||||
showDialog(options: Omit<ComponentProps<typeof ConfirmDialog>, 'onClose'>) {
|
||||
return this.show(ConfirmDialog, options);
|
||||
showDialog(options: Omit<ComponentProps<typeof ConfirmModal>, 'onClose'>) {
|
||||
return this.show(ConfirmModal, options);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue