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