File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 5
5
6
6
<template >
7
7
<Fragment >
8
+ <NcButton @click =" onToggleNotesList" >
9
+ {{ t('notes', 'Toggle Notes List') }}
10
+ </NcButton >
8
11
<NcAppNavigationItem
9
12
:name =" t('notes', 'All notes')"
10
13
:class =" { active: selectedCategory === null }"
@@ -47,6 +50,7 @@ import {
47
50
NcAppNavigationItem ,
48
51
NcAppNavigationCaption ,
49
52
NcCounterBubble ,
53
+ NcButton ,
50
54
} from ' @nextcloud/vue'
51
55
import { Fragment } from ' vue-frag'
52
56
@@ -65,6 +69,7 @@ export default {
65
69
Fragment,
66
70
NcAppNavigationItem,
67
71
NcAppNavigationCaption,
72
+ NcButton,
68
73
NcCounterBubble,
69
74
FolderIcon,
70
75
FolderOutlineIcon,
@@ -83,9 +88,16 @@ export default {
83
88
selectedCategory () {
84
89
return store .getters .getSelectedCategory ()
85
90
},
91
+ toggleNotesList () {
92
+ return store .getters .getToggleNotesList ()
93
+ },
86
94
},
87
95
88
96
methods: {
97
+ onToggleNotesList () {
98
+ store .commit (' setToggleNotesList' , ! this .toggleNotesList )
99
+ },
100
+
89
101
categoryTitle (category ) {
90
102
return categoryLabel (category)
91
103
},
Original file line number Diff line number Diff line change 6
6
<template >
7
7
<NcAppContent pane-config-key =" note" :show-details =" showNote" @update:showDetails =" hideNote" >
8
8
<template slot="list">
9
- <NcAppContentList class =" content-list" >
9
+ <NcAppContentList v-if = " !showNotesList " class =" content-list" >
10
10
<div class =" content-list__search" >
11
11
<NcTextField
12
12
:value.sync =" searchText"
59
59
</template >
60
60
61
61
<script >
62
-
63
62
import {
64
63
NcAppContent ,
65
64
NcAppContentList ,
@@ -131,6 +130,9 @@ export default {
131
130
return this .filteredNotes
132
131
}
133
132
},
133
+ showNotesList () {
134
+ return store .state .app .toggleNotesList
135
+ },
134
136
135
137
// group notes by time ("All notes") or by category (if category chosen)
136
138
groupedNotes () {
Original file line number Diff line number Diff line change @@ -11,9 +11,13 @@ const state = {
11
11
isManualSave : false ,
12
12
documentTitle : null ,
13
13
searchText : '' ,
14
+ toggleNotesList : false ,
14
15
}
15
16
16
17
const getters = {
18
+ getToggleNotesList : ( state ) => ( ) => {
19
+ return state . toggleNotesList
20
+ } ,
17
21
}
18
22
19
23
const mutations = {
@@ -40,6 +44,10 @@ const mutations = {
40
44
updateSearchText ( state , searchText ) {
41
45
state . searchText = searchText
42
46
} ,
47
+
48
+ setToggleNotesList ( state , value ) {
49
+ state . toggleNotesList = value
50
+ } ,
43
51
}
44
52
45
53
const actions = {
You can’t perform that action at this time.
0 commit comments