From 997b8a46ae8c9cbba6984226b6c905212d1a1fbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 24 Feb 2023 10:27:52 +0100 Subject: [PATCH] feat: Add sidebar button to navigation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/components/NavigationNoteItem.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/components/NavigationNoteItem.vue b/src/components/NavigationNoteItem.vue index 4ee74b96b..e222d64cc 100644 --- a/src/components/NavigationNoteItem.vue +++ b/src/components/NavigationNoteItem.vue @@ -15,6 +15,10 @@ {{ actionFavoriteText }} + + + {{ t('notes', 'Details') }} + {{ t('notes', 'Delete note') }} @@ -32,7 +36,9 @@ import { NcActionSeparator, NcAppNavigationItem, } from '@nextcloud/vue' +import SidebarIcon from 'vue-material-design-icons/PageLayoutSidebarRight.vue' import { showError } from '@nextcloud/dialogs' +import store from '../store.js' import { setFavorite, setTitle, fetchNote, deleteNote } from '../NotesService.js' import { categoryLabel, routeIsNewNote } from '../Util.js' @@ -44,6 +50,7 @@ export default { NcActionButton, NcActionSeparator, NcAppNavigationItem, + SidebarIcon, }, props: { @@ -117,6 +124,11 @@ export default { this.$emit('category-selected', this.note.category) }, + onToggleSidebar() { + this.actionsOpen = false + store.commit('setSidebarOpen', !store.state.app.sidebarOpen) + }, + onRename(newTitle) { this.loading.note = true setTitle(this.note.id, newTitle)