From 7598fef137840dc20a9ec2714cef454d07a371fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C5=BEe=20Fortun?= Date: Thu, 29 Aug 2024 16:06:03 +0200 Subject: [PATCH] Add based 300ms timeouts to block spinners --- .../compose/src/components/PageBlocks/AutomationBase.vue | 4 +++- .../web/compose/src/components/PageBlocks/CommentBase.vue | 4 +++- .../compose/src/components/PageBlocks/GeometryBase.vue | 4 +++- .../web/compose/src/components/PageBlocks/MetricBase.vue | 8 ++++---- .../compose/src/components/PageBlocks/ProgressBase.vue | 4 +++- .../src/components/PageBlocks/RecordOrganizerBase.vue | 4 +++- .../src/components/PageBlocks/RecordRevisionsBase.vue | 4 +++- 7 files changed, 22 insertions(+), 10 deletions(-) diff --git a/client/web/compose/src/components/PageBlocks/AutomationBase.vue b/client/web/compose/src/components/PageBlocks/AutomationBase.vue index 75e104bdc..8864dc3c8 100644 --- a/client/web/compose/src/components/PageBlocks/AutomationBase.vue +++ b/client/web/compose/src/components/PageBlocks/AutomationBase.vue @@ -78,7 +78,9 @@ export default { this.automationScripts = set }) .finally(() => { - this.processing = false + setTimeout(() => { + this.processing = false + }, 300) }) }, diff --git a/client/web/compose/src/components/PageBlocks/CommentBase.vue b/client/web/compose/src/components/PageBlocks/CommentBase.vue index bd9f0050a..1c3d857b9 100644 --- a/client/web/compose/src/components/PageBlocks/CommentBase.vue +++ b/client/web/compose/src/components/PageBlocks/CommentBase.vue @@ -293,7 +293,9 @@ export default { console.error(e) }) .finally(() => { - this.processing = false + setTimeout(() => { + this.processing = false + }, 300) }) } }, diff --git a/client/web/compose/src/components/PageBlocks/GeometryBase.vue b/client/web/compose/src/components/PageBlocks/GeometryBase.vue index e8fb1ee8b..cf8fc93ef 100644 --- a/client/web/compose/src/components/PageBlocks/GeometryBase.vue +++ b/client/web/compose/src/components/PageBlocks/GeometryBase.vue @@ -236,7 +236,9 @@ export default { }) }) })).finally(() => { - this.processing = false + setTimeout(() => { + this.processing = false + }, 300) }) }, diff --git a/client/web/compose/src/components/PageBlocks/MetricBase.vue b/client/web/compose/src/components/PageBlocks/MetricBase.vue index 9f906f152..7bf915a6f 100644 --- a/client/web/compose/src/components/PageBlocks/MetricBase.vue +++ b/client/web/compose/src/components/PageBlocks/MetricBase.vue @@ -192,13 +192,13 @@ export default { } this.reports = rtr - this.$nextTick(() => { + setTimeout(() => { this.processing = false - }) + }, 300) } catch { - this.$nextTick(() => { + setTimeout(() => { this.processing = false - }) + }, 300) } }, /** diff --git a/client/web/compose/src/components/PageBlocks/ProgressBase.vue b/client/web/compose/src/components/PageBlocks/ProgressBase.vue index dc0892a78..26cd1a497 100644 --- a/client/web/compose/src/components/PageBlocks/ProgressBase.vue +++ b/client/web/compose/src/components/PageBlocks/ProgressBase.vue @@ -145,7 +145,9 @@ export default { this.value = value }).catch(this.toastErrorHandler(this.$t('progress.fetch-failed'))) .finally(() => { - this.processing = false + setTimeout(() => { + this.processing = false + }, 300) }) }, diff --git a/client/web/compose/src/components/PageBlocks/RecordOrganizerBase.vue b/client/web/compose/src/components/PageBlocks/RecordOrganizerBase.vue index 7a53350ca..57d9656b9 100644 --- a/client/web/compose/src/components/PageBlocks/RecordOrganizerBase.vue +++ b/client/web/compose/src/components/PageBlocks/RecordOrganizerBase.vue @@ -487,7 +487,9 @@ export default { console.error(e) } }).finally(() => { - this.processing = false + setTimeout(() => { + this.processing = false + }, 300) }) }, diff --git a/client/web/compose/src/components/PageBlocks/RecordRevisionsBase.vue b/client/web/compose/src/components/PageBlocks/RecordRevisionsBase.vue index f062947fb..06dfc4da4 100644 --- a/client/web/compose/src/components/PageBlocks/RecordRevisionsBase.vue +++ b/client/web/compose/src/components/PageBlocks/RecordRevisionsBase.vue @@ -253,7 +253,9 @@ export default { }) .then(() => this.block.expandReferences({ $ComposeAPI, $SystemAPI }, this.module, this.revisions)) .finally(() => { - this.processing = false + setTimeout(() => { + this.processing = false + }, 300) }) },