Added hotkeys
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-06-13 17:52:45 +02:00
parent e10e00f222
commit e49dfa52c7
4 changed files with 27 additions and 0 deletions

View File

@ -3,6 +3,7 @@
<b-card
:title="cardTitle"
class="m-2"
v-hotkey.prevent="keymap"
>
<b-card-text>
Could not read device data!
@ -31,6 +32,13 @@ export default {
computed: {
cardTitle() {
return `Device: ${this.device_id}`
},
keymap() {
return {
"up": this.bringOnline,
"down": this.bringOffline,
"right": this.doManualAlert
}
}
},
methods: {

View File

@ -7,9 +7,12 @@ import axios from 'axios'
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
import VueHotkey from 'v-hotkey'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
Vue.use(VueHotkey)
Vue.use(BootstrapVue)
Vue.use(IconsPlugin)