This commit is contained in:
parent
e10e00f222
commit
e49dfa52c7
15
package-lock.json
generated
15
package-lock.json
generated
@ -11665,6 +11665,21 @@
|
||||
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
|
||||
"dev": true
|
||||
},
|
||||
"v-hotkey": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/v-hotkey/-/v-hotkey-0.9.0.tgz",
|
||||
"integrity": "sha512-PVbU9cw5oyoOr6y5q0nN9xmndzpCsLDhXRgVP80WRMvM1Eqkai3ViuJs/D+qFhRht6u5LyM10eBEZ5hq+3qLTg==",
|
||||
"requires": {
|
||||
"core-js": "^2.6.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": {
|
||||
"version": "2.6.12",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
|
||||
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"v8-compile-cache": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
|
||||
|
@ -12,6 +12,7 @@
|
||||
"bootstrap": "^4.5.2",
|
||||
"bootstrap-vue": "^2.16.0",
|
||||
"core-js": "^3.6.5",
|
||||
"v-hotkey": "^0.9.0",
|
||||
"vue": "^2.6.11",
|
||||
"vue-router": "^3.2.0",
|
||||
"vuex": "^3.4.0"
|
||||
|
@ -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: {
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user