Skip to content

Commit

Permalink
refactor(web): move memory lane to photos page (immich-app#3541)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasm91 authored Aug 4, 2023
1 parent 88e9233 commit e5bdf67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 1 addition & 6 deletions web/src/lib/components/photos-page/asset-grid.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import Portal from '../shared-components/portal/portal.svelte';
import Scrollbar from '../shared-components/scrollbar/scrollbar.svelte';
import AssetDateGroup from './asset-date-group.svelte';
import MemoryLane from './memory-lane.svelte';
import { browser } from '$app/environment';
import { goto } from '$app/navigation';
Expand All @@ -21,8 +20,6 @@
import ShowShortcuts from '../shared-components/show-shortcuts.svelte';
export let isAlbumSelectionMode = false;
export let showMemoryLane = false;
export let assetStore: AssetStore;
export let assetInteractionStore: AssetInteractionStore;
Expand Down Expand Up @@ -284,9 +281,7 @@
on:scroll={handleTimelineScroll}
>
{#if element}
{#if showMemoryLane}
<MemoryLane />
{/if}
<slot />
<section id="virtual-timeline" style:height={$assetStore.timelineHeight + 'px'}>
{#each $assetStore.buckets as bucket, bucketIndex (bucketIndex)}
<IntersectionObserver
Expand Down
7 changes: 5 additions & 2 deletions web/src/routes/(user)/photos/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
import AssetGrid from '$lib/components/photos-page/asset-grid.svelte';
import AssetSelectContextMenu from '$lib/components/photos-page/asset-select-context-menu.svelte';
import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte';
import MemoryLane from '$lib/components/photos-page/memory-lane.svelte';
import EmptyPlaceholder from '$lib/components/shared-components/empty-placeholder.svelte';
import { AssetStore } from '$lib/stores/assets.store';
import { createAssetInteractionStore } from '$lib/stores/asset-interaction.store';
import { AssetStore } from '$lib/stores/assets.store';
import { openFileUploadDialog } from '$lib/utils/file-uploader';
import { TimeGroupEnum, api } from '@api';
import { onDestroy, onMount } from 'svelte';
Expand Down Expand Up @@ -64,7 +65,9 @@
</svelte:fragment>
<svelte:fragment slot="content">
{#if assetCount}
<AssetGrid {assetStore} {assetInteractionStore} showMemoryLane />
<AssetGrid {assetStore} {assetInteractionStore}>
<MemoryLane />
</AssetGrid>
{:else}
<EmptyPlaceholder text="CLICK TO UPLOAD YOUR FIRST PHOTO" actionHandler={handleUpload} />
{/if}
Expand Down

0 comments on commit e5bdf67

Please sign in to comment.