diff --git a/package.json b/package.json index 024a1ae9..ab4e600b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yattie", - "version": "0.9.1", + "version": "0.10.0", "engines": { "npm": ">=8.0.0 <9.0.0", "node": ">=16.0.0 <17.0.0" @@ -58,6 +58,7 @@ "vue-i18n-bridge": "^9.2.0-beta.10", "vue-input-tag": "^2.0.7", "vue-router": "^3.5.1", + "vue-shortkey": "^3.1.7", "vuedraggable": "^2.24.3", "vuetify": "^2.6.0", "vuex": "^3.6.2", diff --git a/src/components/CheckTaskWrapper.vue b/src/components/CheckTaskWrapper.vue index bb0a0227..c29d8812 100644 --- a/src/components/CheckTaskWrapper.vue +++ b/src/components/CheckTaskWrapper.vue @@ -6,7 +6,11 @@ > {{ $tc("caption.checklist", 1) }} -
+
{}, + }, tasks: { type: Array, default: () => [], @@ -45,6 +53,7 @@ export default { data() { return { valid: true, + config: this.configItem, }; }, mounted() { @@ -53,6 +62,12 @@ export default { }); }, computed: { + checklistHotkey() { + return this.$hotkeyHelpers.findBinding( + "sessionPlanning.checklist", + this.config.hotkeys + ); + }, currentTheme() { if (this.$vuetify.theme.dark) { return this.$vuetify.theme.themes.dark; @@ -61,6 +76,11 @@ export default { } }, }, + watch: { + configItem: function (newValue) { + this.config = newValue; + }, + }, methods: { rules(required) { if (required) { @@ -70,10 +90,11 @@ export default { } }, handleValidate() { - const isValid = this.$refs.form.validate(); - if (!isValid) { - const el = document.querySelector(".v-messages__wrapper:first-of-type"); - el.scrollIntoView(); + if (this.$refs.form) { + const isValid = this.$refs.form.validate(); + if (!isValid) { + this.$refs.form.$el.scrollIntoView(); + } } }, }, diff --git a/src/components/ControlPanel.vue b/src/components/ControlPanel.vue index cde81b0c..dd5a2c70 100644 --- a/src/components/ControlPanel.vue +++ b/src/components/ControlPanel.vue @@ -1,7 +1,7 @@