Commit a1d0b039 authored by Fatih Acet's avatar Fatih Acet

Remove commit button loader and update title while committing.

parent 1eaad45e
......@@ -239,6 +239,13 @@ class MergeConflictDataProvider {
isAllResolved() {
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 {
conflictsCount() { return dp.getConflictsCount() },
resolvedCount() { return dp.getResolvedCount() },
allResolved() { return dp.isAllResolved() }
readyToCommit() { return dp.isReadyToCommit() },
commitButtonText() { return dp.getCommitButtonText() }
}
}
......
......@@ -10,7 +10,7 @@
{{{conflictsData.commitMessage}}}
%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}"}
%span {{commitButtonText}}
= link_to "Cancel", namespace_project_merge_request_path(@merge_request.project.namespace, @merge_request.project, @merge_request), class: "btn btn-cancel"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment