Skip to content

Commit

Permalink
[learningequality#3845] Disalbing of channel activation submit button…
Browse files Browse the repository at this point in the history
… while processing
  • Loading branch information
bjester committed Dec 2, 2022
1 parent f16e24f commit a86e0a3
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -293,6 +295,7 @@
displayDeployDialog: false,
drawer: false,
elevated: false,
submitDisabled: false,
};
},
computed: {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit a86e0a3

Please sign in to comment.