Commit 912cc7b8 authored by Fatih Acet's avatar Fatih Acet

Add file icon and blob link.

parent ad0b5ffb
...@@ -53,6 +53,8 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider { ...@@ -53,6 +53,8 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider {
setParallelLines(data) { setParallelLines(data) {
data.files.forEach( (file) => { data.files.forEach( (file) => {
file.filePath = this.getFilePath(file); file.filePath = this.getFilePath(file);
file.iconClass = `fa-${file.blob_icon}`;
file.blobPath = file.blob_path;
file.parallelLines = []; file.parallelLines = [];
const linesObj = { left: [], right: [] }; const linesObj = { left: [], right: [] };
...@@ -120,8 +122,10 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider { ...@@ -120,8 +122,10 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider {
setInlineLines(data) { setInlineLines(data) {
data.files.forEach( (file) => { data.files.forEach( (file) => {
file.inlineLines = [] file.iconClass = `fa-${file.blob_icon}`;
file.blobPath = file.blob_path;
file.filePath = this.getFilePath(file); file.filePath = this.getFilePath(file);
file.inlineLines = []
file.sections.forEach( (section) => { file.sections.forEach( (section) => {
let currentLineType = 'new'; let currentLineType = 'new';
...@@ -309,7 +313,7 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider { ...@@ -309,7 +313,7 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider {
getFilePath(file) { getFilePath(file) {
const { old_path, new_path } = file; const { old_path, new_path } = file;
return old_path === new_path ? new_path : `${old_path} → ${new_path}`; return old_path === new_path ? new_path : `${old_path} ${new_path}`;
} }
} }
...@@ -39,9 +39,10 @@ ...@@ -39,9 +39,10 @@
.files{"v-if" => "isParallel"} .files{"v-if" => "isParallel"}
.diff-file.file-holder.conflict.parallel-view{"v-for" => "file in conflictsData.files"} .diff-file.file-holder.conflict.parallel-view{"v-for" => "file in conflictsData.files"}
.file-title .file-title
%span {{{file.filePath}}} %i.fa.fa-fw.fa{":class" => "file.iconClass"}
%strong {{file.filePath}}
.file-actions .file-actions
%a.btn.view-file.btn-file-option{":href" => "file.blobLink"} %a.btn.view-file.btn-file-option{":href" => "file.blobPath"}
View file @{{conflictsData.shortCommitSha}} View file @{{conflictsData.shortCommitSha}}
.diff-content.diff-wrap-lines .diff-content.diff-wrap-lines
.diff-wrap-lines.code.file-content.js-syntax-highlight.white .diff-wrap-lines.code.file-content.js-syntax-highlight.white
...@@ -82,9 +83,10 @@ ...@@ -82,9 +83,10 @@
.files{"v-if" => "!isParallel"} .files{"v-if" => "!isParallel"}
.diff-file.file-holder.conflict.inline-view{"v-for" => "file in conflictsData.files"} .diff-file.file-holder.conflict.inline-view{"v-for" => "file in conflictsData.files"}
.file-title .file-title
%span {{{file.filePath}}} %i.fa.fa-fw{":class" => "file.iconClass"}
%strong {{file.filePath}}
.file-actions .file-actions
%a.btn.view-file.btn-file-option{":href" => "file.blobLink"} %a.btn.view-file.btn-file-option{":href" => "file.blobPath"}
View file @{{conflictsData.shortCommitSha}} View file @{{conflictsData.shortCommitSha}}
.diff-content.diff-wrap-lines .diff-content.diff-wrap-lines
......
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