Fix outdated export command (#1627)

* Fix outdated export command

* Fix more commands by focusing editor
This commit is contained in:
Felix Häusler 2019-11-06 18:53:22 +01:00 committed by GitHub
parent be35982985
commit e78e4c6b10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,7 +76,7 @@ const commands = [
description: 'File: Print current Tab',
execute: async () => {
await delay(50)
ipcRenderer.emit('mt::show-export-dialog', null, 'print')
bus.$emit('showExportDialog', 'print')
}
}, {
id: 'file.close-tab',
@ -125,14 +125,14 @@ const commands = [
description: 'HTML',
execute: async () => {
await delay(50)
bus.$emit('export', 'styledHtml')
bus.$emit('showExportDialog', 'styledHtml')
}
}, {
id: 'file.export-file-pdf',
description: 'PDF',
execute: async () => {
await delay(50)
bus.$emit('export', 'pdf')
bus.$emit('showExportDialog', 'pdf')
}
}]
},
@ -144,13 +144,17 @@ const commands = [
id: 'edit.undo',
description: 'Edit: Undo',
execute: async () => {
bus.$emit('undo', 'undo')
focusEditorAndExecute(
() => bus.$emit('undo', 'undo')
)
}
}, {
id: 'edit.redo',
description: 'Edit: Redo',
execute: async () => {
bus.$emit('redo', 'redo')
focusEditorAndExecute(
() => bus.$emit('redo', 'redo')
)
}
}, {
id: 'edit.duplicate',
@ -616,13 +620,17 @@ const commands = [
id: 'view.typewriter-mode',
description: 'View: Toggle Typewriter Mode',
execute: async () => {
bus.$emit('view:toggle-view-entry', 'typewriter')
focusEditorAndExecute(
() => bus.$emit('view:toggle-view-entry', 'typewriter')
)
}
}, {
id: 'view.focus-mode',
description: 'View: Focus Mode',
execute: async () => {
bus.$emit('view:toggle-view-entry', 'focus')
focusEditorAndExecute(
() => bus.$emit('view:toggle-view-entry', 'focus')
)
}
}, {
id: 'view.toggle-sidebar',