File tree Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 195
195
"section" : {
196
196
"open-section" : " Open Section" ,
197
197
"edit-section" : " Edit" ,
198
+ "expand-collapse" : " Expand / Collapse" ,
198
199
"move-section" : " Move To" ,
199
200
"remove-section" : " Remove"
200
201
}
Original file line number Diff line number Diff line change 94
94
v-click-outside =" closeContextMenu"
95
95
@openEditSection =" openEditSection"
96
96
@navigateToSection =" navigateToSection"
97
+ @expandCollapseSection =" expandCollapseSection"
97
98
@removeSection =" removeSection"
98
99
/>
99
100
</Collapsable >
@@ -250,6 +251,12 @@ export default {
250
251
router .push ({ path: ` /home/${ sectionIdentifier} ` });
251
252
this .closeContextMenu ();
252
253
},
254
+ /* Toggle sections collapse state */
255
+ expandCollapseSection () {
256
+ const secElem = this .$refs [this .sectionRef ];
257
+ if (secElem) secElem .toggle ();
258
+ this .closeContextMenu ();
259
+ },
253
260
/* Open the Section Edit Menu */
254
261
openEditSection () {
255
262
this .editMenuOpen = true ;
Original file line number Diff line number Diff line change 12
12
<EditIcon />
13
13
<span >{{ $t('context-menus.section.edit-section') }}</span >
14
14
</li >
15
+ <li @click =" expandCollapseSection" >
16
+ <ExpandCollapseIcon />
17
+ <span >{{ $t('context-menus.section.expand-collapse') }}</span >
18
+ </li >
15
19
<li v-if =" isEditMode" @click =" removeSection" >
16
20
<BinIcon />
17
21
<span >{{ $t('context-menus.section.remove-section') }}</span >
26
30
import EditIcon from ' @/assets/interface-icons/config-edit-json.svg' ;
27
31
import BinIcon from ' @/assets/interface-icons/interactive-editor-remove.svg' ;
28
32
import SameTabOpenIcon from ' @/assets/interface-icons/open-current-tab.svg' ;
33
+ import ExpandCollapseIcon from ' @/assets/interface-icons/section-expand-collapse.svg' ;
29
34
30
35
export default {
31
36
name: ' ContextMenu' ,
32
37
components: {
33
38
EditIcon,
34
39
BinIcon,
35
40
SameTabOpenIcon,
41
+ ExpandCollapseIcon,
36
42
},
37
43
props: {
38
44
posX: Number , // The X coordinate for positioning
@@ -56,6 +62,9 @@ export default {
56
62
openEditSectionMenu () {
57
63
this .$emit (' openEditSection' );
58
64
},
65
+ expandCollapseSection () {
66
+ this .$emit (' expandCollapseSection' );
67
+ },
59
68
removeSection () {
60
69
this .$emit (' removeSection' );
61
70
},
You can’t perform that action at this time.
0 commit comments