feat(web): Map in albums & shared albums ()

* add btn, map and marker

* Fix bug in navigation assetviewer

* Correct bug on main Viewer

* Add to user album the map of his pictures

* change icon to outline

* lint & format

* with manager instead of variable

* remove duplicate

* chore: minor styling change

* formatting

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
David 2025-05-05 04:58:44 +02:00 committed by GitHub
parent 8f7baf8336
commit 7d61ed7ce4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 203 additions and 24 deletions
web/src/lib/components/photos-page

View file

@ -27,6 +27,7 @@
import type { AssetInteraction } from '$lib/stores/asset-interaction.svelte';
import { mobileDevice } from '$lib/stores/mobile-device.svelte';
import { focusNext } from '$lib/utils/focus-util';
import { albumMapViewManager } from '$lib/managers/album-view-map.manager.svelte';
interface Props {
isSelectionMode?: boolean;
@ -382,7 +383,6 @@
const handleNext = async () => {
const nextAsset = await assetStore.getNextAsset($viewingAsset);
if (nextAsset) {
const preloadAsset = await assetStore.getNextAsset(nextAsset);
assetViewingStore.setAsset(nextAsset, preloadAsset ? [preloadAsset] : []);
@ -802,26 +802,28 @@
</section>
</section>
<Portal target="body">
{#if $showAssetViewer}
{#await import('../asset-viewer/asset-viewer.svelte') then { default: AssetViewer }}
<AssetViewer
{withStacked}
asset={$viewingAsset}
preloadAssets={$preloadAssets}
{isShared}
{album}
{person}
preAction={handlePreAction}
onAction={handleAction}
onPrevious={handlePrevious}
onNext={handleNext}
onRandom={handleRandom}
onClose={handleClose}
/>
{/await}
{/if}
</Portal>
{#if !albumMapViewManager.isInMapView}
<Portal target="body">
{#if $showAssetViewer}
{#await import('../asset-viewer/asset-viewer.svelte') then { default: AssetViewer }}
<AssetViewer
{withStacked}
asset={$viewingAsset}
preloadAssets={$preloadAssets}
{isShared}
{album}
{person}
preAction={handlePreAction}
onAction={handleAction}
onPrevious={handlePrevious}
onNext={handleNext}
onRandom={handleRandom}
onClose={handleClose}
/>
{/await}
{/if}
</Portal>
{/if}
<style>
#asset-grid {