refactor: dialog controller (#18235)
This commit is contained in:
@@ -7,13 +7,13 @@
|
||||
import SelectAllAssets from '$lib/components/photos-page/actions/select-all-assets.svelte';
|
||||
import AssetGrid from '$lib/components/photos-page/asset-grid.svelte';
|
||||
import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte';
|
||||
import { dialogController } from '$lib/components/shared-components/dialog/dialog';
|
||||
import EmptyPlaceholder from '$lib/components/shared-components/empty-placeholder.svelte';
|
||||
import {
|
||||
NotificationType,
|
||||
notificationController,
|
||||
} from '$lib/components/shared-components/notification/notification';
|
||||
import { AppRoute } from '$lib/constants';
|
||||
import { modalManager } from '$lib/managers/modal-manager.svelte';
|
||||
import { AssetInteraction } from '$lib/stores/asset-interaction.svelte';
|
||||
import { AssetStore } from '$lib/stores/assets-store.svelte';
|
||||
import { featureFlags, serverConfig } from '$lib/stores/server-config.store';
|
||||
@@ -43,10 +43,7 @@
|
||||
const assetInteraction = new AssetInteraction();
|
||||
|
||||
const handleEmptyTrash = async () => {
|
||||
const isConfirmed = await dialogController.show({
|
||||
prompt: $t('empty_trash_confirmation'),
|
||||
});
|
||||
|
||||
const isConfirmed = await modalManager.showDialog({ prompt: $t('empty_trash_confirmation') });
|
||||
if (!isConfirmed) {
|
||||
return;
|
||||
}
|
||||
@@ -64,10 +61,7 @@
|
||||
};
|
||||
|
||||
const handleRestoreTrash = async () => {
|
||||
const isConfirmed = await dialogController.show({
|
||||
prompt: $t('assets_restore_confirmation'),
|
||||
});
|
||||
|
||||
const isConfirmed = await modalManager.showDialog({ prompt: $t('assets_restore_confirmation') });
|
||||
if (!isConfirmed) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user