mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-27 15:07:45 +00:00
fix(web): handle deletion from asset viewer on map page (#25393)
This commit is contained in:
parent
0b4a96140e
commit
8970566865
2 changed files with 13 additions and 0 deletions
|
|
@ -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}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue