feat: use new variant type
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -203,9 +203,13 @@ export function useDocumentManager(options: UseDocumentManagerOptions) {
|
||||
return `${TRANSFER_BASE_URL}/download/entity/${encodeURIComponent(currentProviderId())}/${encodeURIComponent(currentServiceId())}/${encodeURIComponent(collection)}/${encodeURIComponent(entityId)}`
|
||||
}
|
||||
|
||||
const getEntityPreviewUrl = (entityId: string, collectionId?: string | null): string => {
|
||||
const getEntityPreviewUrl = (
|
||||
entityId: string,
|
||||
collectionId?: string | null,
|
||||
variant: 'thumbnail' | 'inline' | 'fullscreen' = 'inline',
|
||||
): string => {
|
||||
const collection = collectionId ?? currentLocation.value
|
||||
return `${TRANSFER_BASE_URL}/preview/entity/${encodeURIComponent(currentProviderId())}/${encodeURIComponent(currentServiceId())}/${encodeURIComponent(collection)}/${encodeURIComponent(entityId)}?variant=popover`
|
||||
return `${TRANSFER_BASE_URL}/preview/entity/${encodeURIComponent(currentProviderId())}/${encodeURIComponent(currentServiceId())}/${encodeURIComponent(collection)}/${encodeURIComponent(entityId)}?variant=${variant}`
|
||||
}
|
||||
|
||||
// Download a single file
|
||||
|
||||
Reference in New Issue
Block a user