BigW Consortium Gitlab

Commit 912cc7b8 by Fatih Acet

Add file icon and blob link.

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