BigW Consortium Gitlab

Commit 912cc7b8 by Fatih Acet

Add file icon and blob link.

parent ad0b5ffb
...@@ -52,7 +52,9 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider { ...@@ -52,7 +52,9 @@ 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.iconClass = `fa-${file.blob_icon}`;
file.blobPath = file.blob_path;
file.filePath = this.getFilePath(file);
file.inlineLines = [] file.inlineLines = []
file.filePath = this.getFilePath(file);
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