Merge da26edccdc into 037e29a708
This commit is contained in:
commit
c1c81f7394
@ -42,6 +42,7 @@
|
|||||||
"update": "Update",
|
"update": "Update",
|
||||||
"upload": "Upload",
|
"upload": "Upload",
|
||||||
"openFile": "Open file",
|
"openFile": "Open file",
|
||||||
|
"openDirect": "Open direct",
|
||||||
"discardChanges": "Discard",
|
"discardChanges": "Discard",
|
||||||
"stopSearch": "Stop searching",
|
"stopSearch": "Stop searching",
|
||||||
"saveChanges": "Save changes",
|
"saveChanges": "Save changes",
|
||||||
|
|||||||
@ -24,6 +24,13 @@
|
|||||||
:label="$t('buttons.rename')"
|
:label="$t('buttons.rename')"
|
||||||
show="rename"
|
show="rename"
|
||||||
/>
|
/>
|
||||||
|
<action
|
||||||
|
:disabled="layoutStore.loading"
|
||||||
|
v-if="fileStore.req?.type === 'image' && authStore.user?.perm.download"
|
||||||
|
icon="open_in_new"
|
||||||
|
:label="t('buttons.openDirect')"
|
||||||
|
@action="openDirect"
|
||||||
|
/>
|
||||||
<action
|
<action
|
||||||
:disabled="layoutStore.loading"
|
:disabled="layoutStore.loading"
|
||||||
v-if="isCsv && authStore.user?.perm.modify"
|
v-if="isCsv && authStore.user?.perm.modify"
|
||||||
@ -277,6 +284,10 @@ const downloadUrl = computed(() =>
|
|||||||
fileStore.req ? api.getDownloadURL(fileStore.req, false) : ""
|
fileStore.req ? api.getDownloadURL(fileStore.req, false) : ""
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const directUrl = computed(() =>
|
||||||
|
fileStore.req ? api.getDownloadURL(fileStore.req, true) : ""
|
||||||
|
);
|
||||||
|
|
||||||
const previewUrl = computed(() => {
|
const previewUrl = computed(() => {
|
||||||
if (!fileStore.req) {
|
if (!fileStore.req) {
|
||||||
return "";
|
return "";
|
||||||
@ -466,6 +477,7 @@ const close = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const download = () => window.open(downloadUrl.value);
|
const download = () => window.open(downloadUrl.value);
|
||||||
|
const openDirect = () => window.open(directUrl.value);
|
||||||
|
|
||||||
const editAsText = () => {
|
const editAsText = () => {
|
||||||
router.push({ path: route.path, query: { edit: "true" } });
|
router.push({ path: route.path, query: { edit: "true" } });
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user