mirror of
https://github.com/KevinMidboe/immich.git
synced 2026-01-07 09:45:50 +00:00
dev/add detail viewer to album (#358)
* Rename asset viewer folder * Refactor AssetViewer to be able to user with different component * Refactor AssetViewer to be able to user with different component * Added viewer for album and sharing
This commit is contained in:
@@ -35,8 +35,6 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { goto } from '$app/navigation';
|
||||
|
||||
import AlbumViewer from '$lib/components/album-page/album-viewer.svelte';
|
||||
|
||||
export let album: AlbumResponseDto;
|
||||
27
web/src/routes/albums/[albumId]/photos/[assetId].svelte
Normal file
27
web/src/routes/albums/[albumId]/photos/[assetId].svelte
Normal file
@@ -0,0 +1,27 @@
|
||||
<script context="module" lang="ts">
|
||||
export const prerender = false;
|
||||
|
||||
import type { Load } from '@sveltejs/kit';
|
||||
|
||||
export const load: Load = async ({ session, params }) => {
|
||||
if (!session.user) {
|
||||
return {
|
||||
status: 302,
|
||||
redirect: '/auth/login'
|
||||
};
|
||||
}
|
||||
const albumId = params['albumId'];
|
||||
|
||||
if (albumId) {
|
||||
return {
|
||||
status: 302,
|
||||
redirect: `/albums/${albumId}`
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
status: 302,
|
||||
redirect: `/photos`
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user