mirror of
https://github.com/marktext/marktext.git
synced 2025-05-02 11:32:13 +08:00

bugfix: can not save when there is no file edited optimization: Don't show welcome page when init App
70 lines
1.7 KiB
JavaScript
Executable File
70 lines
1.7 KiB
JavaScript
Executable File
import { shell } from 'electron'
|
|
import * as actions from '../actions/help'
|
|
import { checkUpdates } from '../actions/marktext'
|
|
|
|
const notOsx = process.platform !== 'darwin'
|
|
const updateMenuVisibility = process.platform === 'win32' || !!process.env.APPIMAGE
|
|
|
|
export default {
|
|
label: 'Help',
|
|
role: 'help',
|
|
submenu: [{
|
|
label: 'Learn More',
|
|
click () {
|
|
shell.openExternal('https://github.com/marktext/marktext')
|
|
}
|
|
}, {
|
|
label: 'Source Code on GitHub',
|
|
click () {
|
|
shell.openExternal('https://github.com/marktext/marktext')
|
|
}
|
|
}, {
|
|
label: 'Changelog',
|
|
click () {
|
|
shell.openExternal('https://github.com/marktext/marktext/blob/master/.github/CHANGELOG.md')
|
|
}
|
|
}, {
|
|
label: 'Markdown syntax',
|
|
click () {
|
|
shell.openExternal('https://spec.commonmark.org/0.28/')
|
|
}
|
|
}, {
|
|
type: 'separator'
|
|
}, {
|
|
label: 'Feedback via Twitter',
|
|
click (item, win) {
|
|
actions.showTweetDialog(win, 'twitter')
|
|
}
|
|
}, {
|
|
label: 'Report Issue or Feature request',
|
|
click () {
|
|
shell.openExternal('https://github.com/marktext/marktext/issues')
|
|
}
|
|
}, {
|
|
type: 'separator'
|
|
}, {
|
|
label: 'Follow @Jocs on Github',
|
|
click () {
|
|
shell.openExternal('https://github.com/Jocs')
|
|
}
|
|
}, {
|
|
type: 'separator',
|
|
visible: updateMenuVisibility
|
|
}, {
|
|
label: 'Check for updates...',
|
|
visible: updateMenuVisibility,
|
|
click (menuItem, browserWindow) {
|
|
checkUpdates(menuItem, browserWindow)
|
|
}
|
|
}, {
|
|
type: 'separator',
|
|
visible: notOsx
|
|
}, {
|
|
label: 'About Mark Text',
|
|
visible: notOsx,
|
|
click (menuItem, browserWindow) {
|
|
actions.showAboutDialog(browserWindow)
|
|
}
|
|
}]
|
|
}
|