From a86e0a3b1070f000c1e4d88898c81aed5bf6e9c1 Mon Sep 17 00:00:00 2001 From: Blaine Jester Date: Fri, 2 Dec 2022 06:27:42 -0800 Subject: [PATCH] [#3845] Disalbing of channel activation submit button while processing --- .../channelEdit/pages/StagingTreePage/index.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/contentcuration/contentcuration/frontend/channelEdit/pages/StagingTreePage/index.vue b/contentcuration/contentcuration/frontend/channelEdit/pages/StagingTreePage/index.vue index 685232138c..21f5fd82b0 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/pages/StagingTreePage/index.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/pages/StagingTreePage/index.vue @@ -204,6 +204,8 @@ data-test="deploy-dialog" :title="$tr('deployChannel')" :submitText="$tr('confirmDeployBtn')" + :submitDisabled="submitDisabled" + :cancelDisabled="submitDisabled" :cancelText="$tr('cancelDeployBtn')" @submit="onDeployChannelClick" @cancel="displayDeployDialog = false" @@ -293,6 +295,7 @@ displayDeployDialog: false, drawer: false, elevated: false, + submitDisabled: false, }; }, computed: { @@ -504,7 +507,13 @@ this.elevated = e.target.scrollTop > 0; }, async onDeployChannelClick() { - await this.deployCurrentChannel(); + this.submitDisabled = true; + try { + await this.deployCurrentChannel(); + } catch (e) { + this.submitDisabled = false; + throw e; + } await this.loadChannel(this.currentChannel.id); this.$router.push(this.rootTreeRoute);