Skip to content

Commit eec23ed

Browse files
committed
Fix copy paste issue
1 parent 80c7066 commit eec23ed

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

src/main/index.js

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { app, Tray } from 'electron'
2+
const Menu = require('electron').Menu
23
import { menubar } from 'menubar'
34
import path from 'path'
45

@@ -25,14 +26,55 @@ app.on('ready', () => {
2526
const tray = new Tray(iconPath)
2627

2728
const mb = menubar({
28-
browserWindow: { width: 400, height: 400, webPreferences: { devTools: false } },
29+
browserWindow: { width: 400, height: 400 },
2930
index: winURL,
3031
tray
3132
})
3233

3334
mb.on('ready', () => {
3435
console.log('PassWall app is ready.')
3536
})
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]))
3678
})
3779

3880
app.on('window-all-closed', () => {

src/renderer/views/NewPass.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ export default {
114114
e.preventDefault()
115115
this.form.validateFields(async (err, values) => {
116116
if (!err) {
117+
console.log(values)
117118
try {
118119
const { data } = await this.$http.post('/logins/', values)
119120
this.$router.push({ name: 'Home' })

0 commit comments

Comments
 (0)