aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-07-11 01:44:00 +0200
committerskjnldsv <skjnldsv@protonmail.com>2024-08-02 14:10:35 +0200
commit3f34ef91154813cd703c65238007380a0dd9260a (patch)
tree3d99256e5edc96325cf1de65e92ec4aa6585f814 /apps
parent1ea1f4ffee79ff67fccc30b8a3bddb269fb3b2d2 (diff)
downloadnextcloud-server-3f34ef91154813cd703c65238007380a0dd9260a.tar.gz
nextcloud-server-3f34ef91154813cd703c65238007380a0dd9260a.zip
fix(files): Close the sidebar on navigation
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps')
-rw-r--r--apps/files/src/views/FilesList.vue3
-rw-r--r--apps/files/src/views/Sidebar.vue2
-rw-r--r--apps/files_sharing/src/files_sharing_tab.js8
3 files changed, 10 insertions, 3 deletions
diff --git a/apps/files/src/views/FilesList.vue b/apps/files/src/views/FilesList.vue
index 825c71c19bd..7121e40c7db 100644
--- a/apps/files/src/views/FilesList.vue
+++ b/apps/files/src/views/FilesList.vue
@@ -434,6 +434,9 @@ export default defineComponent({
// TODO: preserve selection on browsing?
this.selectionStore.reset()
this.resetSearch()
+ if (window.OCA.Files.Sidebar?.close) {
+ window.OCA.Files.Sidebar.close()
+ }
this.fetchContent()
// Scroll to top, force virtual scroller to re-render
diff --git a/apps/files/src/views/Sidebar.vue b/apps/files/src/views/Sidebar.vue
index 9a28930f388..35afbb76432 100644
--- a/apps/files/src/views/Sidebar.vue
+++ b/apps/files/src/views/Sidebar.vue
@@ -110,7 +110,7 @@ import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'
import { File, Folder, formatFileSize } from '@nextcloud/files'
import { encodePath } from '@nextcloud/paths'
import { generateRemoteUrl, generateUrl } from '@nextcloud/router'
-import { Type as ShareTypes } from '@nextcloud/sharing'
+import { ShareTypes } from '@nextcloud/sharing'
import { mdiStar, mdiStarOutline } from '@mdi/js'
import axios from '@nextcloud/axios'
import $ from 'jquery'
diff --git a/apps/files_sharing/src/files_sharing_tab.js b/apps/files_sharing/src/files_sharing_tab.js
index 602992320d1..09bedbc6398 100644
--- a/apps/files_sharing/src/files_sharing_tab.js
+++ b/apps/files_sharing/src/files_sharing_tab.js
@@ -73,12 +73,16 @@ window.addEventListener('DOMContentLoaded', function() {
await TabInstance.update(fileInfo)
TabInstance.$mount(el)
},
+
update(fileInfo) {
TabInstance.update(fileInfo)
},
+
destroy() {
- TabInstance.$destroy()
- TabInstance = null
+ if (TabInstance) {
+ TabInstance.$destroy()
+ TabInstance = null
+ }
},
}))
}