Skip to content

Commit

Permalink
fix(ui): show debug feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Mar 2, 2021
1 parent c6b29dd commit 714702c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/components/Debug.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<v-container grid-list-md>
<v-row>
<v-col cols="12">
<v-btn color="green darken-1" text @click="debugActive = true"
<v-btn color="green darken-1" text @click="toggleDebug(true)"
>Start</v-btn
>
<v-btn color="red darken-1" text @click="debugActive = false"
<v-btn color="red darken-1" text @click="toggleDebug(false)"
>Stop</v-btn
>
<v-btn color="blue darken-1" text @click="debug = []">Clear</v-btn>
Expand All @@ -26,6 +26,7 @@
import { socketEvents } from '@/plugins/socket'
import AnsiUp from 'ansi_up'
import { mapMutations } from 'vuex'
const ansiUp = new AnsiUp()
Expand All @@ -44,7 +45,13 @@ export default {
debugActive: false
}
},
methods: {},
methods: {
...mapMutations(['showSnackbar']),
toggleDebug (v) {
this.debugActive = v
this.showSnackbar('Debug ' + (v ? 'activated' : 'disabled'))
}
},
mounted () {
// init socket events
const self = this
Expand Down

0 comments on commit 714702c

Please sign in to comment.