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:
Alex
2022-07-18 00:22:39 -05:00
committed by GitHub
parent c129023821
commit c028c7db4e
15 changed files with 170 additions and 75 deletions

View File

@@ -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;

View 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>