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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
82548650
Commit
82548650
authored
Jan 11, 2021
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix line classes and unified diff components
Removes parallel class when not in parallel mode
parent
a61bd329
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
app/assets/javascripts/diffs/components/diff_row.vue
app/assets/javascripts/diffs/components/diff_row.vue
+11
-11
app/assets/javascripts/diffs/components/diff_row_utils.js
app/assets/javascripts/diffs/components/diff_row_utils.js
+2
-0
No files found.
app/assets/javascripts/diffs/components/diff_row.vue
View file @
82548650
...
...
@@ -58,7 +58,7 @@ export default {
classNameMap
()
{
return
{
[
CONTEXT_LINE_CLASS_NAME
]:
this
.
line
.
isContextLineLeft
,
[
PARALLEL_DIFF_VIEW_TYPE
]:
tru
e
,
[
PARALLEL_DIFF_VIEW_TYPE
]:
!
this
.
inlin
e
,
};
},
parallelViewLeftLineType
()
{
...
...
@@ -148,7 +148,7 @@ export default {
<div
:class=
"classNameMapCellLeft"
data-testid=
"leftLineNumber"
class=
"diff-td diff-line-num
old_line
"
class=
"diff-td diff-line-num"
>
<template
v-if=
"!isLeftConflictMarker"
>
<span
...
...
@@ -189,7 +189,7 @@ export default {
"
/>
</div>
<div
v-if=
"inline"
:class=
"classNameMapCellLeft"
class=
"diff-td diff-line-num
old_line
"
>
<div
v-if=
"inline"
:class=
"classNameMapCellLeft"
class=
"diff-td diff-line-num"
>
<a
v-if=
"line.left.new_line && line.left.type !== $options.CONFLICT_OUR"
:data-linenumber=
"line.left.new_line"
...
...
@@ -202,8 +202,8 @@ export default {
<div
:id=
"line.left.line_code"
:key=
"line.left.line_code"
:class=
"
parallelViewLeftLineType
"
class=
"diff-td line_content with-coverage
parallel
left-side"
:class=
"
[parallelViewLeftLineType, { parallel: !inline }]
"
class=
"diff-td line_content with-coverage left-side"
data-testid=
"leftContent"
@
mousedown=
"handleParallelLineMouseDown"
>
...
...
@@ -229,8 +229,8 @@ export default {
:class=
"emptyCellLeftClassMap"
></div>
<div
class=
"diff-td line_content with-coverage
parallel
left-side empty-cell"
:class=
"
emptyCellLeftClassMap
"
class=
"diff-td line_content with-coverage left-side empty-cell"
:class=
"
[emptyCellLeftClassMap,
{ parallel: !inline }]
"
>
</div>
</
template
>
</div>
...
...
@@ -285,8 +285,8 @@ export default {
<div
:id=
"line.right.line_code"
:key=
"line.right.rich_text"
:class=
"[line.right.type, { hll: isHighlighted }]"
class=
"diff-td line_content with-coverage
parallel
right-side"
:class=
"[line.right.type, { hll: isHighlighted
, parallel: !inline
}]"
class=
"diff-td line_content with-coverage right-side"
@
mousedown=
"handleParallelLineMouseDown"
>
<strong
v-if=
"line.right.type === $options.CONFLICT_MARKER_THEIR"
>
{{
...
...
@@ -311,8 +311,8 @@ export default {
:class=
"emptyCellRightClassMap"
></div>
<div
class=
"diff-td line_content with-coverage
parallel
right-side empty-cell"
:class=
"
emptyCellRightClassMap
"
class=
"diff-td line_content with-coverage right-side empty-cell"
:class=
"
[emptyCellRightClassMap,
{ parallel: !inline }]
"
>
</div>
</
template
>
</div>
...
...
app/assets/javascripts/diffs/components/diff_row_utils.js
View file @
82548650
...
...
@@ -44,6 +44,8 @@ export const classNameMapCell = (line, hll, isLoggedIn, isHover) => {
{
hll,
[LINE_HOVER_CLASS_NAME]: isLoggedIn && isHover && !isContextLine(type) && !isMetaLine(type),
old_line: line.type === 'old',
new_line: line.type === 'new',
},
];
};
...
...
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