File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
packages/desktop/electron/lib Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -150,3 +150,41 @@ const buildTemplate = () => {
150150 } )
151151 return template
152152}
153+
154+ /**
155+ * Creates context menu
156+ * @returns {Menu } Context menu
157+ */
158+ export const contextMenu = ( ) =>
159+ Menu . buildFromTemplate ( [
160+ {
161+ label : state . strings . undo ,
162+ role : 'undo' ,
163+ } ,
164+ {
165+ label : state . strings . redo ,
166+ role : 'redo' ,
167+ } ,
168+ {
169+ type : 'separator' ,
170+ } ,
171+ {
172+ label : state . strings . cut ,
173+ role : 'cut' ,
174+ } ,
175+ {
176+ label : state . strings . copy ,
177+ role : 'copy' ,
178+ } ,
179+ {
180+ label : state . strings . paste ,
181+ role : 'paste' ,
182+ } ,
183+ {
184+ type : 'separator' ,
185+ } ,
186+ {
187+ label : state . strings . selectAll ,
188+ role : 'selectAll' ,
189+ } ,
190+ ] )
You can’t perform that action at this time.
0 commit comments