From 3e10f3b0fe6a119fc3af615184a655960c1cb170 Mon Sep 17 00:00:00 2001 From: Diogo Castro Date: Wed, 19 Oct 2022 12:43:02 +0200 Subject: [PATCH 1/2] FUTURE PR? Single file share view --- .../src/views/spaces/GenericSpace.vue | 33 ++++++++++-- .../src/views/spaces/SingleSharedFile.vue | 50 +++++++++++++++++++ 2 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 packages/web-app-files/src/views/spaces/SingleSharedFile.vue diff --git a/packages/web-app-files/src/views/spaces/GenericSpace.vue b/packages/web-app-files/src/views/spaces/GenericSpace.vue index 9c0d976b2bb..316603909e7 100644 --- a/packages/web-app-files/src/views/spaces/GenericSpace.vue +++ b/packages/web-app-files/src/views/spaces/GenericSpace.vue @@ -5,9 +5,11 @@ @@ -44,6 +46,9 @@ +
+ +
+
+ + + +
+ + + + + From ce6f5157a9a2d1783dbb2c4c1762c85f93ada93e Mon Sep 17 00:00:00 2001 From: elizavetaRa Date: Thu, 19 Jan 2023 20:07:13 +0100 Subject: [PATCH 2/2] CERNONLY: automatically open single file share --- .../web-app-files/src/views/spaces/GenericSpace.vue | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/web-app-files/src/views/spaces/GenericSpace.vue b/packages/web-app-files/src/views/spaces/GenericSpace.vue index 316603909e7..1b425bf0a3c 100644 --- a/packages/web-app-files/src/views/spaces/GenericSpace.vue +++ b/packages/web-app-files/src/views/spaces/GenericSpace.vue @@ -429,6 +429,19 @@ export default defineComponent({ paginatedResources: function () { if (this.isSingleFile) { this.SET_FILE_SELECTION(this.paginatedResources) + + const defaultAction = this.$_fileActions_getDefaultAction({ + space: this.space, + resources: this.paginatedResources + }).label() + + if (!this.$route.query.scrollTo && defaultAction !== 'Download') { + this.$_fileActions_triggerDefaultAction({ + space: this.space, + resources: this.paginatedResources, + sameTab: true + }) + } } } },