mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
Merge branch 'master' into fix-autocomplete-codeblock
This commit is contained in:
107
lib/main-menu.js
107
lib/main-menu.js
@@ -85,39 +85,24 @@ const file = {
|
||||
},
|
||||
{
|
||||
label: 'Focus Note',
|
||||
accelerator: 'Control+E',
|
||||
accelerator: macOS ? 'Command+E' : 'Control+E',
|
||||
click () {
|
||||
mainWindow.webContents.send('detail:focus')
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
label: 'Delete Note',
|
||||
accelerator: macOS ? 'Command+Shift+Backspace' : 'Control+Shift+Backspace',
|
||||
click () {
|
||||
mainWindow.webContents.send('detail:delete')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Export as',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Plain Text (.txt)',
|
||||
click () {
|
||||
mainWindow.webContents.send('list:isMarkdownNote')
|
||||
mainWindow.webContents.send('export:save-text')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'MarkDown (.md)',
|
||||
click () {
|
||||
mainWindow.webContents.send('list:isMarkdownNote')
|
||||
mainWindow.webContents.send('export:save-md')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'HTML (.html)',
|
||||
click () {
|
||||
mainWindow.webContents.send('list:isMarkdownNote')
|
||||
mainWindow.webContents.send('export:save-html')
|
||||
}
|
||||
}
|
||||
]
|
||||
label: 'Clone Note',
|
||||
accelerator: macOS ? 'Command+D' : 'Control+D',
|
||||
click () {
|
||||
mainWindow.webContents.send('list:clone')
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
@@ -134,13 +119,30 @@ const file = {
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Format Table',
|
||||
click () {
|
||||
mainWindow.webContents.send('code:format-table')
|
||||
}
|
||||
label: 'Export as',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Plain Text (.txt)',
|
||||
click () {
|
||||
mainWindow.webContents.send('list:isMarkdownNote', 'export-txt')
|
||||
mainWindow.webContents.send('export:save-text')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'MarkDown (.md)',
|
||||
click () {
|
||||
mainWindow.webContents.send('list:isMarkdownNote', 'export-md')
|
||||
mainWindow.webContents.send('export:save-md')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'HTML (.html)',
|
||||
click () {
|
||||
mainWindow.webContents.send('list:isMarkdownNote', 'export-html')
|
||||
mainWindow.webContents.send('export:save-html')
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
@@ -153,24 +155,20 @@ const file = {
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Print',
|
||||
accelerator: 'CommandOrControl+P',
|
||||
label: 'Format Table',
|
||||
click () {
|
||||
mainWindow.webContents.send('list:isMarkdownNote')
|
||||
mainWindow.webContents.send('print')
|
||||
mainWindow.webContents.send('code:format-table')
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Delete Note',
|
||||
accelerator: macOS ? 'Control+Backspace' : 'Control+Delete',
|
||||
label: 'Print',
|
||||
accelerator: 'CommandOrControl+P',
|
||||
click () {
|
||||
mainWindow.webContents.send('detail:delete')
|
||||
mainWindow.webContents.send('list:isMarkdownNote', 'print')
|
||||
mainWindow.webContents.send('print')
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -296,9 +294,6 @@ const view = {
|
||||
mainWindow.setFullScreen(!mainWindow.isFullScreen())
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Toggle Side Bar',
|
||||
accelerator: 'CommandOrControl+B',
|
||||
@@ -310,11 +305,25 @@ const view = {
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
role: 'zoomin',
|
||||
accelerator: macOS ? 'CommandOrControl+Plus' : 'Control+='
|
||||
label: 'Actual Size',
|
||||
accelerator: macOS ? 'CommandOrControl+0' : 'Control+0',
|
||||
click () {
|
||||
mainWindow.webContents.send('status:zoomreset')
|
||||
}
|
||||
},
|
||||
{
|
||||
role: 'zoomout'
|
||||
label: 'Zoom In',
|
||||
accelerator: macOS ? 'CommandOrControl+=' : 'Control+=',
|
||||
click () {
|
||||
mainWindow.webContents.send('status:zoomin')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Zoom Out',
|
||||
accelerator: macOS ? 'CommandOrControl+-' : 'Control+-',
|
||||
click () {
|
||||
mainWindow.webContents.send('status:zoomout')
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
<script src="../node_modules/codemirror/keymap/vim.js"></script>
|
||||
<script src="../node_modules/codemirror/keymap/emacs.js"></script>
|
||||
<script src="../node_modules/codemirror/addon/runmode/runmode.js"></script>
|
||||
<script src="../node_modules/codemirror/addon/display/panel.js"></script>
|
||||
<script src="../node_modules/codemirror/mode/xml/xml.js"></script>
|
||||
<script src="../node_modules/codemirror/mode/markdown/markdown.js"></script>
|
||||
<script src="../node_modules/codemirror/mode/gfm/gfm.js"></script>
|
||||
@@ -116,6 +117,7 @@
|
||||
<script src="../node_modules/codemirror/addon/search/jump-to-line.js"></script>
|
||||
|
||||
<script src="../node_modules/codemirror/addon/fold/brace-fold.js"></script>
|
||||
<script src="../node_modules/codemirror/addon/fold/markdown-fold.js"></script>
|
||||
<script src="../node_modules/codemirror/addon/fold/foldgutter.js"></script>
|
||||
<script src="../node_modules/codemirror/addon/fold/foldcode.js"></script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user