aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>2024-07-05 09:16:19 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-07-09 19:30:50 +0200
commit1ee54e39c600cb2bfb9f3f8dd49de0b0ea237ed4 (patch)
treea623e9097443af04cae0bdb93ed158d5ba89984b /apps/files
parent7a3a8cdac47c74841dbf44727c8964978fa6cefb (diff)
downloadnextcloud-server-1ee54e39c600cb2bfb9f3f8dd49de0b0ea237ed4.tar.gz
nextcloud-server-1ee54e39c600cb2bfb9f3f8dd49de0b0ea237ed4.zip
sidebar: allow turning off tags view by default
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> sidebar: allow turning off tags view by default Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/src/sidebar.js1
-rw-r--r--apps/files/src/views/Sidebar.vue14
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 16c7fed24f5..e727f35a787 100644
--- a/apps/files/src/views/Sidebar.vue
+++ b/apps/files/src/views/Sidebar.vue
@@ -45,7 +45,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" />
@@ -158,6 +158,7 @@ export default {
// reactive state
Sidebar: OCA.Files.Sidebar.state,
showTags: false,
+ showTagsDefault: true,
error: null,
loading: true,
fileInfo: null,
@@ -445,7 +446,7 @@ export default {
* Toggle the tags selector
*/
toggleTags() {
- this.showTags = !this.showTags
+ this.showTagsDefault = this.showTags = !this.showTags
},
/**
@@ -538,6 +539,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() {