mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 17:25:35 +03:00
chore: more flexible modal manager types (#19123)
* fix: required argument in onClose modal function * chore: more flexible modal manager types
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
const handleSave = async (skipConfirm: boolean) => {
|
||||
const allMethodsDisabled = !config.oauth.enabled && !config.passwordLogin.enabled;
|
||||
if (allMethodsDisabled && !skipConfirm) {
|
||||
const isConfirmed = await modalManager.show(AuthDisableLoginConfirmModal, {});
|
||||
const isConfirmed = await modalManager.show(AuthDisableLoginConfirmModal);
|
||||
if (!isConfirmed) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
if (document.fullscreenElement) {
|
||||
await document.exitFullscreen();
|
||||
}
|
||||
await modalManager.show(SlideshowSettingsModal, {});
|
||||
await modalManager.show(SlideshowSettingsModal);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
const { clearSelect, getOwnedAssets } = getAssetControlContext();
|
||||
|
||||
const handleUpdateDescription = async () => {
|
||||
const description = await modalManager.show(AssetUpdateDecriptionConfirmModal, {});
|
||||
const description = await modalManager.show(AssetUpdateDecriptionConfirmModal);
|
||||
if (description) {
|
||||
const ids = getSelectedAssets(getOwnedAssets(), $user);
|
||||
|
||||
|
||||
@@ -703,7 +703,7 @@
|
||||
}
|
||||
|
||||
isShortcutModalOpen = true;
|
||||
await modalManager.show(ShortcutsModal, {});
|
||||
await modalManager.show(ShortcutsModal);
|
||||
isShortcutModalOpen = false;
|
||||
};
|
||||
|
||||
|
||||
@@ -5,11 +5,10 @@
|
||||
import Thumbnail from '$lib/components/assets/thumbnail/thumbnail.svelte';
|
||||
import { AppRoute, AssetAction } from '$lib/constants';
|
||||
import { modalManager } from '$lib/managers/modal-manager.svelte';
|
||||
import type { TimelineAsset, Viewport } from '$lib/managers/timeline-manager/types';
|
||||
import ShortcutsModal from '$lib/modals/ShortcutsModal.svelte';
|
||||
import type { AssetInteraction } from '$lib/stores/asset-interaction.svelte';
|
||||
import { assetViewingStore } from '$lib/stores/asset-viewing.store';
|
||||
import type { TimelineAsset } from '$lib/managers/timeline-manager/types';
|
||||
import type { Viewport } from '$lib/managers/timeline-manager/types';
|
||||
import { showDeleteModal } from '$lib/stores/preferences.store';
|
||||
import { featureFlags } from '$lib/stores/server-config.store';
|
||||
import { handlePromiseError } from '$lib/utils';
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
shape="round"
|
||||
onclick={async () => {
|
||||
onClose();
|
||||
await modalManager.show(AvatarEditModal, {});
|
||||
await modalManager.show(AvatarEditModal);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
const { isPurchased } = purchaseStore;
|
||||
|
||||
const openPurchaseModal = async () => {
|
||||
await modalManager.show(PurchaseModal, {});
|
||||
await modalManager.show(PurchaseModal);
|
||||
showMessage = false;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user