Fixes for merge conflicts UI.
This commit is contained in:
parent
14a4b17d1c
commit
10321bf862
3 changed files with 6 additions and 5 deletions
|
@ -120,10 +120,10 @@ class window.MergeConflictResolver extends Vue
|
|||
|
||||
if conflict
|
||||
if line.type is 'old'
|
||||
line = { lineType: 'conflict', lineNumber: line.old_line, richText: line.rich_text, section: 'origin', id, isSelected: no, isUnselected: no, isOrigin: yes }
|
||||
line = { lineType: 'conflict', lineNumber: line.old_line, richText: line.rich_text, section: 'head', id, isSelected: no, isUnselected: no, isHead: yes }
|
||||
file.parallelLines.left.push line
|
||||
else if line.type is 'new'
|
||||
line = { lineType: 'conflict', lineNumber: line.new_line, richText: line.rich_text, section: 'head', id, isSelected: no, isUnselected: no, isHead: yes }
|
||||
line = { lineType: 'conflict', lineNumber: line.new_line, richText: line.rich_text, section: 'origin', id, isSelected: no, isUnselected: no, isOrigin: yes }
|
||||
file.parallelLines.right.push line
|
||||
else
|
||||
console.log 'unhandled line type...', line
|
||||
|
@ -155,7 +155,7 @@ class window.MergeConflictResolver extends Vue
|
|||
|
||||
for file in data.files
|
||||
for section in file.sections when section.conflict
|
||||
@$set "resolutionData.#{section.id}", no
|
||||
@$set "resolutionData['#{section.id}']", no
|
||||
|
||||
|
||||
getInitialData: ->
|
||||
|
|
|
@ -16,6 +16,7 @@ $unselected_line: #F8F8F8;
|
|||
|
||||
.diff-wrap-lines .line_content {
|
||||
white-space: normal;
|
||||
min-height: 19px;
|
||||
}
|
||||
|
||||
.head {
|
||||
|
|
|
@ -43,14 +43,14 @@
|
|||
%template{"v-if" => "line.isHeader"}
|
||||
%td.diff-line-num.header
|
||||
%td.line_content.header
|
||||
%strong {{line.text}}
|
||||
%strong {{line.richText}}
|
||||
%button.btn{"@click" => "handleSelected(line.id, line.section)"} Use this
|
||||
|
||||
%template{"v-if" => "!line.isHeader"}
|
||||
%td.diff-line-num.old_line
|
||||
{{line.lineNumber}}
|
||||
%td.line_content
|
||||
{{{line.text}}}
|
||||
{{{line.richText}}}
|
||||
|
||||
.files{"v-if" => "!isParallel"}
|
||||
.diff-file.file-holder.conflict.inline-view{"v-for" => "file in conflictsData.files"}
|
||||
|
|
Loading…
Reference in a new issue