Commit cebad0fb authored by Alfredo Sumaran's avatar Alfredo Sumaran

Do not show Diff view switcher if all files are can be only resolved with an editor

parent 197ac5eb
......@@ -425,6 +425,18 @@
setSubmitState(state) {
this.state.isSubmitting = state;
},
fileTextTypePresent() {
let found = false;
this.state.conflictsData.files.find((f) => {
if (f.type === CONFLICT_TYPES.TEXT) {
return found = true;
}
});
return found;
}
};
......
......@@ -21,7 +21,8 @@ $(() => {
computed: {
conflictsCountText() { return mergeConflictsStore.getConflictsCountText() },
readyToCommit() { return mergeConflictsStore.isReadyToCommit() },
commitButtonText() { return mergeConflictsStore.getCommitButtonText() }
commitButtonText() { return mergeConflictsStore.getCommitButtonText() },
showDiffViewTypeSwitcher() { return mergeConflictsStore.fileTextTypePresent() }
},
created() {
mergeConflictsService
......
.content-block.oneline-block.files-changed{"v-if" => "!isLoading && !hasError"}
.inline-parallel-buttons
.inline-parallel-buttons{"v-if" => "showDiffViewTypeSwitcher"}
.btn-group
%a.btn{ |
":class" => "{'active': !isParallel}", |
......
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