File tree 2 files changed +30
-13
lines changed
2 files changed +30
-13
lines changed Original file line number Diff line number Diff line change @@ -12,5 +12,6 @@ const get = (key) => {
12
12
module . exports = {
13
13
get,
14
14
set,
15
+ edit : ( ) => store . openInEditor ( ) ,
15
16
plugins,
16
17
} ;
Original file line number Diff line number Diff line change @@ -7,20 +7,29 @@ const config = require("./config");
7
7
const mainMenuTemplate = ( win ) => [
8
8
{
9
9
label : "Plugins" ,
10
- submenu : getAllPlugins ( ) . map ( ( plugin ) => {
11
- return {
12
- label : plugin ,
13
- type : "checkbox" ,
14
- checked : config . plugins . isEnabled ( plugin ) ,
15
- click : ( item ) => {
16
- if ( item . checked ) {
17
- config . plugins . enable ( plugin ) ;
18
- } else {
19
- config . plugins . disable ( plugin ) ;
20
- }
10
+ submenu : [
11
+ ...getAllPlugins ( ) . map ( ( plugin ) => {
12
+ return {
13
+ label : plugin ,
14
+ type : "checkbox" ,
15
+ checked : config . plugins . isEnabled ( plugin ) ,
16
+ click : ( item ) => {
17
+ if ( item . checked ) {
18
+ config . plugins . enable ( plugin ) ;
19
+ } else {
20
+ config . plugins . disable ( plugin ) ;
21
+ }
22
+ } ,
23
+ } ;
24
+ } ) ,
25
+ { type : "separator" } ,
26
+ {
27
+ label : "Advanced options" ,
28
+ click : ( ) => {
29
+ config . edit ( ) ;
21
30
} ,
22
- } ;
23
- } ) ,
31
+ } ,
32
+ ] ,
24
33
} ,
25
34
{
26
35
label : "Options" ,
@@ -101,6 +110,7 @@ const mainMenuTemplate = (win) => [
101
110
} ,
102
111
] ,
103
112
} ,
113
+ { type : "separator" } ,
104
114
{
105
115
label : "Toggle DevTools" ,
106
116
// Cannot use "toggleDevTools" role in MacOS
@@ -114,6 +124,12 @@ const mainMenuTemplate = (win) => [
114
124
}
115
125
} ,
116
126
} ,
127
+ {
128
+ label : "Advanced options" ,
129
+ click : ( ) => {
130
+ config . edit ( ) ;
131
+ } ,
132
+ } ,
117
133
] ,
118
134
} ,
119
135
] ;
You can’t perform that action at this time.
0 commit comments