From 66007a748603a1615ba50f1c8b134a1a5db8841a Mon Sep 17 00:00:00 2001 From: "sbs20@omicron.sbs20.com" Date: Tue, 22 Sep 2020 11:33:25 +0100 Subject: [PATCH] Device update toasts --- client/components/Scanserv.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/components/Scanserv.vue b/client/components/Scanserv.vue index 2687220d..5e211426 100644 --- a/client/components/Scanserv.vue +++ b/client/components/Scanserv.vue @@ -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: { @@ -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;