Skip to content

Commit

Permalink
adding key combos for save+restart
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkhill committed Jun 9, 2024
1 parent 3e72d8d commit fc18102
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/components/TheEditor.vue
Original file line number Diff line number Diff line change
@@ -8,8 +8,10 @@
:transition="false"
@close="close"
@keydown.esc="escClose"
@keydown.ctrl.s.prevent="hotkeySave()"
@keydown.meta.s.prevent="hotkeySave()">
@keydown.ctrl.s.prevent="save(null)"
@keydown.meta.s.prevent="save(null)"
@keydown.ctrl.shift.s.prevent="restartServiceNameExists && save(restartServiceName)"
@keydown.meta.shift.s.prevent="restartServiceNameExists && save(restartServiceName)">
<panel
card-class="editor-dialog"
:icon="isWriteable ? mdiFileDocumentEditOutline : mdiFileDocumentOutline"
@@ -335,10 +337,6 @@ export default class TheEditor extends Mixins(BaseMixin) {
})
}
hotkeySave() {
if (this.isWriteable) this.save(null)
}
@Watch('changed')
changedChanged(newVal: boolean) {
if (!this.confirmUnsavedChanges) return

0 comments on commit fc18102

Please sign in to comment.