forked from marktext/marktext
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenuItems.js
More file actions
71 lines (61 loc) · 1.25 KB
/
menuItems.js
File metadata and controls
71 lines (61 loc) · 1.25 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
import * as contextMenu from './actions'
// NOTE: This are mutable fields that may change at runtime.
export const SEPARATOR = {
type: 'separator'
}
export const NEW_FILE = {
label: 'New File',
id: 'newFileMenuItem',
click (menuItem, browserWindow) {
contextMenu.newFile()
}
}
export const NEW_DIRECTORY = {
label: 'New Directory',
id: 'newDirectoryMenuItem',
click (menuItem, browserWindow) {
contextMenu.newDirectory()
}
}
export const COPY = {
label: 'Copy',
id: 'copyMenuItem',
click (menuItem, browserWindow) {
contextMenu.copy()
}
}
export const CUT = {
label: 'Cut',
id: 'cutMenuItem',
click (menuItem, browserWindow) {
contextMenu.cut()
}
}
export const PASTE = {
label: 'Paste',
id: 'pasteMenuItem',
click (menuItem, browserWindow) {
contextMenu.paste()
}
}
export const RENAME = {
label: 'Rename',
id: 'renameMenuItem',
click (menuItem, browserWindow) {
contextMenu.rename()
}
}
export const DELETE = {
label: 'Move To Trash',
id: 'deleteMenuItem',
click (menuItem, browserWindow) {
contextMenu.remove()
}
}
export const SHOW_IN_FOLDER = {
label: 'Show In Folder',
id: 'showInFolderMenuItem',
click (menuItem, browserWindow) {
contextMenu.showInFolder()
}
}