From da26edccdc517575e45d7906d4bfb135e08b5a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Baczy=C5=84ski?= Date: Sat, 10 Jan 2026 15:18:48 +0100 Subject: [PATCH] feat: add direct image open link --- frontend/src/i18n/en.json | 1 + frontend/src/views/files/Preview.vue | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index 3fcdf635..287d9a84 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -42,6 +42,7 @@ "update": "Update", "upload": "Upload", "openFile": "Open file", + "openDirect": "Open direct", "discardChanges": "Discard", "stopSearch": "Stop searching", "saveChanges": "Save changes", diff --git a/frontend/src/views/files/Preview.vue b/frontend/src/views/files/Preview.vue index 09562856..d5f1107c 100644 --- a/frontend/src/views/files/Preview.vue +++ b/frontend/src/views/files/Preview.vue @@ -24,6 +24,13 @@ :label="$t('buttons.rename')" show="rename" /> + fileStore.req ? api.getDownloadURL(fileStore.req, false) : "" ); +const directUrl = computed(() => + fileStore.req ? api.getDownloadURL(fileStore.req, true) : "" +); + const previewUrl = computed(() => { if (!fileStore.req) { return ""; @@ -466,6 +477,7 @@ const close = () => { }; const download = () => window.open(downloadUrl.value); +const openDirect = () => window.open(directUrl.value); const editAsText = () => { router.push({ path: route.path, query: { edit: "true" } });