refactor(web): shared link key auth (#3855)

This commit is contained in:
Jason Rasmussen
2023-08-25 00:03:28 -04:00
committed by GitHub
parent 10c2bda3a9
commit 9bbef4a97b
21 changed files with 115 additions and 108 deletions

View File

@@ -174,7 +174,7 @@
};
const handleSelectFromComputer = async () => {
await openFileUploadDialog(album.id, '');
await openFileUploadDialog(album.id);
timelineInteractionStore.clearMultiselect();
viewMode = ViewMode.VIEW;
};

View File

@@ -8,7 +8,6 @@
{#if data.asset && data.key}
<AssetViewer
asset={data.asset}
publicSharedKey={data.key}
showNavigation={false}
on:previous={() => null}
on:next={() => null}

View File

@@ -17,11 +17,16 @@
import { loadFeatureFlags } from '$lib/stores/feature-flags.store';
import { handleError } from '$lib/utils/handle-error';
import { dragAndDropFilesStore } from '$lib/stores/drag-and-drop-files.store';
import { api } from '@api';
let showNavigationLoadingBar = false;
export let data: LayoutData;
let albumId: string | undefined;
if ($page.route.id?.startsWith('/(user)/share/[key]')) {
api.setKey($page.params.key);
}
beforeNavigate(() => {
showNavigationLoadingBar = true;
});