Remove commit button loader and update title while committing.
This commit is contained in:
parent
1eaad45e71
commit
a1d0b0398b
3 changed files with 11 additions and 3 deletions
|
@ -239,6 +239,13 @@ class MergeConflictDataProvider {
|
||||||
|
|
||||||
isAllResolved() {
|
isAllResolved() {
|
||||||
return !this.vueInstance.isSubmitting && this.getConflictsCount() === this.getResolvedCount();
|
return !this.vueInstance.isSubmitting && this.getConflictsCount() === this.getResolvedCount();
|
||||||
|
|
||||||
|
getCommitButtonText() {
|
||||||
|
const initial = 'Commit conflict resolution';
|
||||||
|
const inProgress = 'Committing...';
|
||||||
|
const vue = this.vueInstance;
|
||||||
|
|
||||||
|
return vue ? vue.isSubmitting ? inProgress : initial : initial;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,8 @@ class MergeConflictResolver {
|
||||||
return {
|
return {
|
||||||
conflictsCount() { return dp.getConflictsCount() },
|
conflictsCount() { return dp.getConflictsCount() },
|
||||||
resolvedCount() { return dp.getResolvedCount() },
|
resolvedCount() { return dp.getResolvedCount() },
|
||||||
allResolved() { return dp.isAllResolved() }
|
readyToCommit() { return dp.isReadyToCommit() },
|
||||||
|
commitButtonText() { return dp.getCommitButtonText() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
{{{conflictsData.commitMessage}}}
|
{{{conflictsData.commitMessage}}}
|
||||||
|
|
||||||
%button{type: "button", class: "btn btn-success js-submit-button", ":disabled" => "!allResolved", "@click" => "commit()"}
|
%button{type: "button", class: "btn btn-success js-submit-button", ":disabled" => "!allResolved", "@click" => "commit()"}
|
||||||
%span Commit conflict resolution
|
|
||||||
%a.fa.fa-spin.fa-spinner{":class" => "{'hidden': !isSubmitting}"}
|
%a.fa.fa-spin.fa-spinner{":class" => "{'hidden': !isSubmitting}"}
|
||||||
|
%span {{commitButtonText}}
|
||||||
|
|
||||||
= link_to "Cancel", namespace_project_merge_request_path(@merge_request.project.namespace, @merge_request.project, @merge_request), class: "btn btn-cancel"
|
= link_to "Cancel", namespace_project_merge_request_path(@merge_request.project.namespace, @merge_request.project, @merge_request), class: "btn btn-cancel"
|
||||||
|
|
Loading…
Reference in a new issue