Skip to content

Commit

Permalink
Fix the log viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanlesage committed Mar 23, 2021
1 parent e19232f commit d5dbec7
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions source/win-log-viewer/log-viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
v-bind:titlebar="true"
v-bind:menubar="false"
v-bind:show-toolbar="true"
v-bind:toolbar-labels="true"
v-bind:toolbar-controls="toolbarControls"
v-on:toolbar-search="filter = $event"
v-on:toolbar-toggle="handleToggle($event)"
Expand Down Expand Up @@ -167,15 +168,16 @@ export default {
const elem = this.$refs['log-viewer']
elem.scrollTop = elem.scrollHeight - elem.getBoundingClientRect().height
},
handleToggle: function (toggleID) {
if (toggleID === 'verboseToggle') {
this.includeVerbose = !this.includeVerbose
} else if (toggleID === 'infoToggle') {
this.includeInfo = !this.includeInfo
} else if (toggleID === 'warningToggle') {
this.includeWarning = !this.includeWarning
} else if (toggleID === 'errorToggle') {
this.includeError = !this.includeError
handleToggle: function (event) {
const { id, state } = event
if (id === 'verboseToggle') {
this.includeVerbose = state
} else if (id === 'infoToggle') {
this.includeInfo = state
} else if (id === 'warningToggle') {
this.includeWarning = state
} else if (id === 'errorToggle') {
this.includeError = state
}
}
}
Expand Down

0 comments on commit d5dbec7

Please sign in to comment.