Skip to content

Commit

Permalink
Device update toasts
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Sep 22, 2020
1 parent 795297f commit 66007a7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions client/components/Scanserv.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,13 @@ export default {
},
mounted() {
this.$refs.toastr.defaultPosition = 'toast-bottom-right';
this.$refs.toastr.defaultTimeout = 5000;
this.readContext().then(() => {
this.readPreview();
});
this.fileList();
this.$refs.toastr.defaultPosition = 'toast-bottom-right';
this.$refs.toastr.defaultTimeout = 5000;
},
watch: {
Expand Down Expand Up @@ -352,9 +352,12 @@ export default {
readContext(force) {
this.mask(1);
const url = 'context' + (force ? '/force' : '');
this.$refs.toastr.i('Finding devices...');
return this._fetch(url).then(context => {
this.context = context;
this.device = context.devices[0];
this.$refs.toastr.i(`Found device ${this.device.id}`);
this.request = this.readRequest();
for (let test of context.diagnostics) {
const toast = test.success ? this.$refs.toastr.s : this.$refs.toastr.e;
Expand Down

0 comments on commit 66007a7

Please sign in to comment.