mirror of
https://github.com/nextcloud/server.git
synced 2026-06-06 07:13:23 -04:00
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>
This commit is contained in:
parent
7a3a8cdac4
commit
1ee54e39c6
4 changed files with 16 additions and 5 deletions
|
|
@ -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
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -537,6 +538,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.
|
||||
*/
|
||||
|
|
|
|||
4
dist/files-sidebar.js
vendored
4
dist/files-sidebar.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-sidebar.js.map
vendored
2
dist/files-sidebar.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue