From ad1aec3085aa4d9da6470a89bc73b8406894afa9 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Wed, 8 Jan 2020 09:17:07 +0100 Subject: Only show tag selector if tags are set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl Signed-off-by: npmbuildbot[bot] --- apps/files/src/views/Sidebar.vue | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'apps/files/src') diff --git a/apps/files/src/views/Sidebar.vue b/apps/files/src/views/Sidebar.vue index 4bee3c67759..9c2bab960c4 100644 --- a/apps/files/src/views/Sidebar.vue +++ b/apps/files/src/views/Sidebar.vue @@ -25,6 +25,7 @@ v-if="file" ref="sidebar" v-bind="appSidebar" + :force-menu="true" @close="onClose" @update:active="setActiveTab" @update:starred="toggleStarred" @@ -37,6 +38,15 @@ :file-info="fileInfo" /> + + +
@@ -60,6 +70,7 @@ import $ from 'jquery' import axios from '@nextcloud/axios' import AppSidebar from 'nextcloud-vue/dist/Components/AppSidebar' +import ActionButton from 'nextcloud-vue/dist/Components/ActionButton' import FileInfo from '../services/FileInfo' import LegacyTab from '../components/LegacyTab' import LegacyView from '../components/LegacyView' @@ -69,6 +80,7 @@ export default { name: 'Sidebar', components: { + ActionButton, AppSidebar, LegacyView, }, @@ -218,6 +230,10 @@ export default { defaultActionListener() { return this.defaultAction ? 'figure-click' : null }, + + isSystemTagsEnabled() { + return OCA && 'SystemTags' in OCA + } }, watch: { @@ -377,6 +393,15 @@ export default { }) } }, + + /** + * Toggle the tags selector + */ + toggleTags() { + if (OCA.SystemTags && OCA.SystemTags.View) { + OCA.SystemTags.View.toggle() + } + } }, } -- cgit v1.2.3