Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(web): move memory lane to photos page #3541

Merged
merged 1 commit into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading