feat: implement preview mechanism

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-08-29 12:29:15 -04:00
parent f80e3679b6
commit 33a06c6509
3 changed files with 105 additions and 15 deletions
+6
View File
@@ -203,6 +203,11 @@ 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 collection = collectionId ?? currentLocation.value
return `${TRANSFER_BASE_URL}/preview/entity/${encodeURIComponent(currentProviderId())}/${encodeURIComponent(currentServiceId())}/${encodeURIComponent(collection)}/${encodeURIComponent(entityId)}?variant=popover`
}
// Download a single file
const downloadEntity = (entityId: string, collectionId?: string | null): void => {
const collection = collectionId ?? currentLocation.value
@@ -280,6 +285,7 @@ export function useDocumentManager(options: UseDocumentManagerOptions) {
readFile,
writeFile,
getEntityUrl,
getEntityPreviewUrl,
downloadEntity,
downloadCollection,
downloadArchive,