forked from marktext/marktext
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
46 lines (43 loc) · 1.21 KB
/
index.js
File metadata and controls
46 lines (43 loc) · 1.21 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
import edit from './edit'
import prefEdit from './prefEdit'
import file from './file'
import help from './help'
import marktext from './marktext'
import view from './view'
import window from './window'
import paragraph from './paragraph'
import format from './format'
import theme from './theme'
export dockMenu from './dock'
/**
* Create the setting window menu.
*
* @param {Keybindings} keybindings The keybindings instance
*/
export const configSettingMenu = (keybindings) => {
return [
...(process.platform === 'darwin' ? [marktext(keybindings)] : []),
prefEdit(keybindings),
help()
]
}
/**
* Create the application menu for the editor window.
*
* @param {Keybindings} keybindings The keybindings instance.
* @param {Preference} preferences The preference instance.
* @param {string[]} recentlyUsedFiles The recently used files.
*/
export default function (keybindings, preferences, recentlyUsedFiles) {
return [
...(process.platform === 'darwin' ? [marktext(keybindings)] : []),
file(keybindings, preferences, recentlyUsedFiles),
edit(keybindings),
paragraph(keybindings),
format(keybindings),
window(keybindings),
theme(preferences),
view(keybindings),
help()
]
}