diff options
author | Louis <louis@chmn.me> | 2023-11-28 13:43:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-28 13:43:50 +0100 |
commit | a61ec60dc30ad3155aa3d6ae8b86428feb7e2945 (patch) | |
tree | 3e245a4d401a7500534f453f8c6b93eacce25d57 /apps/files | |
parent | 394cd75322bc6fc0c1c4613162c330a995ae5ded (diff) | |
parent | c581024540b2d8fe0db49906f90ef14a54ec0fa1 (diff) | |
download | nextcloud-server-a61ec60dc30ad3155aa3d6ae8b86428feb7e2945.tar.gz nextcloud-server-a61ec60dc30ad3155aa3d6ae8b86428feb7e2945.zip |
Merge pull request #40939 from nextcloud/pulsejet/sidebar-tags
sidebar: allow turning off tags view by default
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/src/sidebar.js | 1 | ||||
-rw-r--r-- | apps/files/src/views/Sidebar.vue | 14 |
2 files changed, 13 insertions, 2 deletions
diff --git a/apps/files/src/sidebar.js b/apps/files/src/sidebar.js index c8bfc2ca4db..ceec5478466 100644 --- a/apps/files/src/sidebar.js +++ b/apps/files/src/sidebar.js @@ -59,4 +59,5 @@ window.addEventListener('DOMContentLoaded', function() { window.OCA.Files.Sidebar.open = AppSidebar.open window.OCA.Files.Sidebar.close = AppSidebar.close window.OCA.Files.Sidebar.setFullScreenMode = AppSidebar.setFullScreenMode + window.OCA.Files.Sidebar.setShowTagsDefault = AppSidebar.setShowTagsDefault }) diff --git a/apps/files/src/views/Sidebar.vue b/apps/files/src/views/Sidebar.vue index d0c6b90b49d..7b958aca312 100644 --- a/apps/files/src/views/Sidebar.vue +++ b/apps/files/src/views/Sidebar.vue @@ -36,7 +36,7 @@ <!-- TODO: create a standard to allow multiple elements here? --> <template v-if="fileInfo" #description> <div class="sidebar__description"> - <SystemTags v-if="isSystemTagsEnabled" + <SystemTags v-if="isSystemTagsEnabled && showTagsDefault" v-show="showTags" :file-id="fileInfo.id" @has-tags="value => showTags = value" /> @@ -138,6 +138,7 @@ export default { // reactive state Sidebar: OCA.Files.Sidebar.state, showTags: false, + showTagsDefault: true, error: null, loading: true, fileInfo: null, @@ -455,7 +456,7 @@ export default { * Toggle the tags selector */ toggleTags() { - this.showTags = !this.showTags + this.showTagsDefault = this.showTags = !this.showTags }, /** @@ -530,6 +531,15 @@ export default { }, /** + * Allow to set whether tags should be shown by default from OCA.Files.Sidebar + * + * @param {boolean} showTagsDefault - Whether or not to show the tags by default. + */ + setShowTagsDefault(showTagsDefault) { + this.showTagsDefault = showTagsDefault + }, + + /** * Emit SideBar events. */ handleOpening() { |