File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { app , Tray } from 'electron'
2
+ const Menu = require ( 'electron' ) . Menu
2
3
import { menubar } from 'menubar'
3
4
import path from 'path'
4
5
@@ -25,14 +26,55 @@ app.on('ready', () => {
25
26
const tray = new Tray ( iconPath )
26
27
27
28
const mb = menubar ( {
28
- browserWindow : { width : 400 , height : 400 , webPreferences : { devTools : false } } ,
29
+ browserWindow : { width : 400 , height : 400 } ,
29
30
index : winURL ,
30
31
tray
31
32
} )
32
33
33
34
mb . on ( 'ready' , ( ) => {
34
35
console . log ( 'PassWall app is ready.' )
35
36
} )
37
+
38
+ const edit = {
39
+ label : 'Edit' ,
40
+ submenu : [
41
+ {
42
+ label : 'Undo' ,
43
+ accelerator : 'CmdOrCtrl+Z' ,
44
+ selector : 'undo:'
45
+ } ,
46
+ {
47
+ label : 'Redo' ,
48
+ accelerator : 'Shift+CmdOrCtrl+Z' ,
49
+ selector : 'redo:'
50
+ } ,
51
+ {
52
+ type : 'separator'
53
+ } ,
54
+ {
55
+ label : 'Cut' ,
56
+ accelerator : 'CmdOrCtrl+X' ,
57
+ selector : 'cut:'
58
+ } ,
59
+ {
60
+ label : 'Copy' ,
61
+ accelerator : 'CmdOrCtrl+C' ,
62
+ selector : 'copy:'
63
+ } ,
64
+ {
65
+ label : 'Paste' ,
66
+ accelerator : 'CmdOrCtrl+V' ,
67
+ selector : 'paste:'
68
+ } ,
69
+ {
70
+ label : 'Select All' ,
71
+ accelerator : 'CmdOrCtrl+A' ,
72
+ selector : 'selectAll:'
73
+ }
74
+ ]
75
+ }
76
+
77
+ Menu . setApplicationMenu ( Menu . buildFromTemplate ( [ edit ] ) )
36
78
} )
37
79
38
80
app . on ( 'window-all-closed' , ( ) => {
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ export default {
114
114
e .preventDefault ()
115
115
this .form .validateFields (async (err , values ) => {
116
116
if (! err) {
117
+ console .log (values)
117
118
try {
118
119
const { data } = await this .$http .post (' /logins/' , values)
119
120
this .$router .push ({ name: ' Home' })
You can’t perform that action at this time.
0 commit comments