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:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user