mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix(web): handle deletion from asset viewer on map page (#25393)
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
import { assetViewerManager } from '$lib/managers/asset-viewer-manager.svelte';
|
import { assetViewerManager } from '$lib/managers/asset-viewer-manager.svelte';
|
||||||
import { authManager } from '$lib/managers/auth-manager.svelte';
|
import { authManager } from '$lib/managers/auth-manager.svelte';
|
||||||
import { editManager, EditToolType } from '$lib/managers/edit/edit-manager.svelte';
|
import { editManager, EditToolType } from '$lib/managers/edit/edit-manager.svelte';
|
||||||
|
import { eventManager } from '$lib/managers/event-manager.svelte';
|
||||||
import { preloadManager } from '$lib/managers/PreloadManager.svelte';
|
import { preloadManager } from '$lib/managers/PreloadManager.svelte';
|
||||||
import { Route } from '$lib/route';
|
import { Route } from '$lib/route';
|
||||||
import { assetViewingStore } from '$lib/stores/asset-viewing.store';
|
import { assetViewingStore } from '$lib/stores/asset-viewing.store';
|
||||||
@@ -321,6 +322,11 @@
|
|||||||
await handleGetAllAlbums();
|
await handleGetAllAlbums();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case AssetAction.DELETE:
|
||||||
|
case AssetAction.TRASH: {
|
||||||
|
eventManager.emit('AssetsDelete', [asset.id]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case AssetAction.REMOVE_ASSET_FROM_STACK: {
|
case AssetAction.REMOVE_ASSET_FROM_STACK: {
|
||||||
stack = action.stack;
|
stack = action.stack;
|
||||||
if (stack) {
|
if (stack) {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { afterNavigate } from '$app/navigation';
|
import { afterNavigate } from '$app/navigation';
|
||||||
|
import OnEvents from '$lib/components/OnEvents.svelte';
|
||||||
import { Theme } from '$lib/constants';
|
import { Theme } from '$lib/constants';
|
||||||
import { serverConfigManager } from '$lib/managers/server-config-manager.svelte';
|
import { serverConfigManager } from '$lib/managers/server-config-manager.svelte';
|
||||||
import { themeManager } from '$lib/managers/theme-manager.svelte';
|
import { themeManager } from '$lib/managers/theme-manager.svelte';
|
||||||
@@ -292,8 +293,14 @@
|
|||||||
|
|
||||||
untrack(() => map?.jumpTo({ center, zoom }));
|
untrack(() => map?.jumpTo({ center, zoom }));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const onAssetsDelete = async () => {
|
||||||
|
mapMarkers = await loadMapMarkers();
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<OnEvents {onAssetsDelete} />
|
||||||
|
|
||||||
<!-- We handle style loading ourselves so we set style blank here -->
|
<!-- We handle style loading ourselves so we set style blank here -->
|
||||||
<MapLibre
|
<MapLibre
|
||||||
{hash}
|
{hash}
|
||||||
|
|||||||
Reference in New Issue
Block a user