From b997c7de108ea6c90f6ef359c773c1586286a7e8 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Mon, 16 Oct 2023 21:04:53 -0700 Subject: [PATCH] sidebar: allow turning off tags view by default With #37065, there is no way to hide the tags from the sidebar by default when they are not relevant or redundant (e.g. the tab may already show the file's tags). This can be annyoing especially when the file has many tags. This patch adds an option to hide the tags from the sidebar by default (the user can still open the tags tab manually). This also reduces one request when opening the sidebar when the tags are turned off, since all tags don't need to be fetched anymore. Signed-off-by: Varun Patil Signed-off-by: nextcloud-command [skip ci] --- apps/files/src/sidebar.js | 1 + 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 c8bfc2ca4db3c..ceec547846653 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 d0c6b90b49d36..7b958aca31295 100644 --- a/apps/files/src/views/Sidebar.vue +++ b/apps/files/src/views/Sidebar.vue @@ -36,7 +36,7 @@