Skip to content

Commit 2e74826

Browse files
replace switch with if-else; improve disabled tooltip message
Co-authored-by: David López <46503462+davelopez@users.noreply.github.com>
1 parent a4cd1e9 commit 2e74826

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

client/src/components/Tool/ToolForm.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,16 @@ export default {
225225
return this.uuid || this.formConfig.uuid;
226226
},
227227
tooltip() {
228-
switch (true) {
229-
case !this.canMutateHistory:
230-
return this.immutableHistoryMessage;
231-
case this.hasConfigOrValErrors:
232-
return "Please correct errors before running the tool.";
233-
case this.showExecuting:
234-
return "Tool is being executed...";
235-
default:
236-
return `Run tool: ${this.formConfig.name} (${this.formConfig.version})`;
228+
if (!this.canMutateHistory) {
229+
return this.immutableHistoryMessage;
237230
}
231+
if (this.hasConfigOrValErrors) {
232+
return "Please resolve highlighted issues before running the tool.";
233+
}
234+
if (this.showExecuting) {
235+
return "Tool is being executed...";
236+
}
237+
return `Run tool: ${this.formConfig.name} (${this.formConfig.version})`;
238238
},
239239
errorContentPretty() {
240240
return JSON.stringify(this.errorContent, null, 4);

0 commit comments

Comments
 (0)