Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
6dbca364
Commit
6dbca364
authored
Nov 09, 2016
by
Alfredo Sumaran
Committed by
Fatih Acet
Nov 10, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Merge Conflicts app to make it work with Vue 2
parent
e9c66be1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
27 deletions
+17
-27
app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js.es6
...merge_conflicts/components/parallel_conflict_lines.js.es6
+16
-1
app/views/projects/merge_requests/conflicts.html.haml
app/views/projects/merge_requests/conflicts.html.haml
+1
-4
app/views/projects/merge_requests/conflicts/components/_parallel_conflict_line.html.haml
...ts/conflicts/components/_parallel_conflict_line.html.haml
+0
-9
app/views/projects/merge_requests/conflicts/components/_parallel_conflict_lines.html.haml
...s/conflicts/components/_parallel_conflict_lines.html.haml
+0
-13
No files found.
app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js.es6
View file @
6dbca364
...
...
@@ -7,7 +7,22 @@
props: {
file: Object
},
mixins: [global.mergeConflicts.utils, global.mergeConflicts.actions]
mixins: [global.mergeConflicts.utils, global.mergeConflicts.actions],
template: `
<table>
<tr class="line_holder parallel" v-for="section in file.parallelLines">
<template v-for="line in section">
<td class="diff-line-num header" :class="lineCssClass(line)" v-if="line.isHeader"></td>
<td class="line_content header" :class="lineCssClass(line)" v-if="line.isHeader">
<strong>{{line.richText}}</strong>
<button class="btn" @click="handleSelected(file, line.id, line.section)">{{line.buttonTitle}}</button>
</td>
<td class="diff-line-num old_line" :class="lineCssClass(line)" v-if="!line.isHeader">{{line.lineNumber}}</td>
<td class="line_content parallel" :class="lineCssClass(line)" v-if="!line.isHeader" v-html="line.richText"></td>
</template>
</tr>
</table>
`,
});
})(window.gl || (window.gl = {}));
app/views/projects/merge_requests/conflicts.html.haml
View file @
6dbca364
...
...
@@ -30,11 +30,8 @@
.diff-wrap-lines.code.file-content.js-syntax-highlight
{
"v-show"
=>
"!isParallel && file.resolveMode === 'interactive' && file.type === 'text'"
}
=
render
partial:
"projects/merge_requests/conflicts/components/inline_conflict_lines"
.diff-wrap-lines.code.file-content.js-syntax-highlight
{
"v-show"
=>
"isParallel && file.resolveMode === 'interactive' && file.type === 'text'"
}
=
render
partial:
"projects/merge_requests/conflicts/components/parallel_conflict_lines"
%parallel-conflict-lines
{
":file"
=>
"file"
}
%div
{
"v-show"
=>
"file.resolveMode === 'edit' || file.type === 'text-editor'"
}
=
render
partial:
"projects/merge_requests/conflicts/components/diff_file_editor"
=
render
partial:
"projects/merge_requests/conflicts/submit_form"
-# Components
=
render
partial:
'projects/merge_requests/conflicts/components/parallel_conflict_line'
app/views/projects/merge_requests/conflicts/components/_parallel_conflict_line.html.haml
deleted
100644 → 0
View file @
e9c66be1
%script
{
"id"
=>
'parallel-conflict-line'
,
"type"
=>
"text/x-template"
}
%td
.diff-line-num.header
{
":class"
=>
"lineCssClass(line)"
,
"v-if"
=>
"line.isHeader"
}
%td
.line_content.header
{
":class"
=>
"lineCssClass(line)"
,
"v-if"
=>
"line.isHeader"
}
%strong
{{line.richText}}
%button
.btn
{
"@click"
=>
"handleSelected(file, line.id, line.section)"
}
{{line.buttonTitle}}
%td
.diff-line-num.old_line
{
":class"
=>
"lineCssClass(line)"
,
"v-if"
=>
"!line.isHeader"
}
{{line.lineNumber}}
%td
.line_content.parallel
{
":class"
=>
"lineCssClass(line)"
,
"v-if"
=>
"!line.isHeader"
,
"v-html"
=>
"line.richText"
}
app/views/projects/merge_requests/conflicts/components/_parallel_conflict_lines.html.haml
deleted
100644 → 0
View file @
e9c66be1
%parallel-conflict-lines
{
"inline-template"
=>
"true"
,
":file"
=>
"file"
}
%table
%tr
.line_holder.parallel
{
"v-for"
=>
"section in file.parallelLines"
}
%template
{
"is"
=>
"parallel-conflict-line"
,
"v-for"
=>
"line in section"
,
":line"
=>
"line"
,
":file"
=>
"file"
}
%td
.diff-line-num.header
{
":class"
=>
"lineCssClass(line)"
,
"v-if"
=>
"line.isHeader"
}
%td
.line_content.header
{
":class"
=>
"lineCssClass(line)"
,
"v-if"
=>
"line.isHeader"
}
%strong
{{line.richText}}
%button
.btn
{
"@click"
=>
"handleSelected(file, line.id, line.section)"
}
{{line.buttonTitle}}
%td
.diff-line-num.old_line
{
":class"
=>
"lineCssClass(line)"
,
"v-if"
=>
"!line.isHeader"
}
{{line.lineNumber}}
%td
.line_content.parallel
{
":class"
=>
"lineCssClass(line)"
,
"v-if"
=>
"!line.isHeader"
,
"v-html"
=>
"line.richText"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment