1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-15 03:30:33 +02:00

Add ablum feature to web (#352)

* Added album page

* Refactor sidebar

* Added album assets count info

* Added album viewer page

* Refactor album sorting

* Fixed incorrectly showing selected asset in album selection

* Improve fetching speed with prefetch

* Refactor to use ImmichThubmnail component for all

* Update to the latest version of Svelte

* Implement fixed app bar in album viewer

* Added shared user avatar

* Correctly get all owned albums, including shared
This commit is contained in:
Alex
2022-07-15 23:18:17 -05:00
committed by GitHub
parent 1887b5a860
commit 7134f93eb8
62 changed files with 2572 additions and 991 deletions

View File

@ -5,13 +5,12 @@
import { flattenAssetGroupByDate } from '$lib/stores/assets';
import ChevronRight from 'svelte-material-icons/ChevronRight.svelte';
import ChevronLeft from 'svelte-material-icons/ChevronLeft.svelte';
import { AssetType } from '../../models/immich-asset';
import PhotoViewer from './photo-viewer.svelte';
import DetailPanel from './detail-panel.svelte';
import { session } from '$app/stores';
import { downloadAssets } from '$lib/stores/download';
import VideoViewer from './video-viewer.svelte';
import { api, AssetResponseDto } from '@api';
import { api, AssetResponseDto, AssetTypeEnum } from '@api';
const dispatch = createEventDispatcher();
@ -191,7 +190,7 @@
<div class="row-start-1 row-span-full col-start-1 col-span-4">
{#key selectedIndex}
{#if viewAssetId && viewDeviceId}
{#if selectedAsset.type == AssetType.IMAGE}
{#if selectedAsset.type == AssetTypeEnum.Image}
<PhotoViewer assetId={viewAssetId} deviceId={viewDeviceId} on:close={closeViewer} />
{:else}
<VideoViewer assetId={viewAssetId} on:close={closeViewer} />