-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathmenu.js
More file actions
executable file
·109 lines (108 loc) · 2.79 KB
/
menu.js
File metadata and controls
executable file
·109 lines (108 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
const { app } = require('electron');
const { shell } = require('electron');
const template = [
{
label: app.getName(),
submenu: [
{
label: '关于 Video',
click() {
shell.openExternal('https://github.com/DrawAChicken/Easy-Video');
}
},
{
type: 'separator'
},
{
label: '隐藏 Video',
accelerator: 'CmdOrCtrl+H',
role: 'hide'
},
{
label: '隐藏其他',
accelerator: 'Alt+CmdOrCtrl+H',
role: 'hideothers'
},
{
label: '显示全部',
role: 'unhide'
},
{
type: 'separator'
},
{
role: 'quit',
label: '退出 Video'
}
]
},
{
label: '编辑',
submenu: [
{
label: '撤销',
accelerator: 'CmdOrCtrl+Z',
role: 'copy'
},
{
label: '重做',
accelerator: 'Shift+CmdOrCtrl+Z',
role: 'redo'
},
{
type: 'separator'
},
{
label: '剪切',
accelerator: 'CmdOrCtrl+X',
role: 'cut'
},
{
label: '复制',
accelerator: 'CmdOrCtrl+C',
role: 'copy'
},
{
label: '粘贴',
accelerator: 'CmdOrCtrl+V',
role: 'paste'
},
{
label: '全选',
accelerator: 'CmdOrCtrl+A',
role: 'selectall'
}
]
},
{
label: '窗口',
submenu: [
{
label: '最小化窗口',
accelerator: 'CmdOrCtrl+M',
role: 'minimize'
},
{
label: '关闭窗口',
accelerator: 'CmdOrCtrl+W',
role: 'close'
},
{
label: '切换全屏',
accelerator: (function () {
if (process.platform === 'darwin') {
return 'Ctrl+Command+F'
} else {
return 'F11'
}
})(),
click: function (item, focusedWindow) {
if (focusedWindow) {
focusedWindow.setFullScreen(!focusedWindow.isFullScreen())
}
}
}
]
}
];
module.exports = template;