feat(web) Individual assets shared mechanism (#1317)

* Create shared link modal for individual asset

* Added API to create asset shared link

* Added viewer for individual shared link

* Added multiselection app bar

* Refactor gallery viewer to its own component

* Refactor

* Refactor

* Add and remove asset from shared link

* Fixed test

* Fixed notification card doesn't wrap

* Add check asset access when created asset shared link

* pr feedback
This commit is contained in:
Alex
2023-01-14 23:49:47 -06:00
committed by GitHub
parent b9b2b559a1
commit e9fda40b2b
66 changed files with 2085 additions and 242 deletions
+5 -2
View File
@@ -5,7 +5,9 @@ import { getThumbnailUrl } from '$lib/utils/asset-utils';
import { serverApi, ThumbnailFormat } from '@api';
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async ({ params }) => {
export const load: PageServerLoad = async ({ params, parent }) => {
const { user } = await parent();
const { key } = params;
try {
@@ -22,7 +24,8 @@ export const load: PageServerLoad = async ({ params }) => {
imageUrl: assetId
? getThumbnailUrl(assetId, ThumbnailFormat.Webp, sharedLink.key)
: 'feature-panel.png'
}
},
user
};
} catch (e) {
throw error(404, {