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
d4d084c2
Commit
d4d084c2
authored
Dec 16, 2020
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a constant for string comparisons
parent
400b0094
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
app/assets/javascripts/diffs/components/diff_row.vue
app/assets/javascripts/diffs/components/diff_row.vue
+6
-4
No files found.
app/assets/javascripts/diffs/components/diff_row.vue
View file @
d4d084c2
...
...
@@ -8,6 +8,7 @@ import {
CONFLICT_MARKER_THEIR
,
CONFLICT_OUR
,
CONFLICT_THEIR
,
CONFLICT_MARKER
,
}
from
'
../constants
'
;
import
DiffGutterAvatars
from
'
./diff_gutter_avatars.vue
'
;
import
*
as
utils
from
'
./diff_row_utils
'
;
...
...
@@ -79,10 +80,10 @@ export default {
return
utils
.
addCommentTooltip
(
this
.
line
.
right
);
},
emptyCellRightClassMap
()
{
return
{
conflict_their
:
this
.
line
.
left
?.
type
===
'
conflict_our
'
};
return
{
conflict_their
:
this
.
line
.
left
?.
type
===
CONFLICT_OUR
};
},
emptyCellLeftClassMap
()
{
return
{
conflict_our
:
this
.
line
.
right
?.
type
===
'
conflict_their
'
};
return
{
conflict_our
:
this
.
line
.
right
?.
type
===
CONFLICT_THEIR
};
},
shouldRenderCommentButton
()
{
return
(
...
...
@@ -131,6 +132,7 @@ export default {
},
OUR_CHANGES
:
'
HEAD//our changes
'
,
THEIR_CHANGES
:
'
origin//their changes
'
,
CONFLICT_MARKER
,
CONFLICT_MARKER_THEIR
,
CONFLICT_OUR
,
CONFLICT_THEIR
,
...
...
@@ -140,7 +142,7 @@ export default {
<
template
>
<div
:class=
"classNameMap"
class=
"diff-grid-row diff-tr line_holder"
>
<div
class=
"diff-grid-left left-side"
>
<template
v-if=
"line.left && line.left.type !==
'conflict_marker'
"
>
<template
v-if=
"line.left && line.left.type !==
$options.CONFLICT_MARKER
"
>
<div
:class=
"classNameMapCellLeft"
data-testid=
"leftLineNumber"
...
...
@@ -207,7 +209,7 @@ export default {
<span
v-else
v-safe-html=
"line.left.rich_text"
></span>
</div>
</template>
<
template
v-else-if=
"!inline || (line.left && line.left.type ===
'conflict_marker'
)"
>
<
template
v-else-if=
"!inline || (line.left && line.left.type ===
$options.CONFLICT_MARKER
)"
>
<div
data-testid=
"leftEmptyCell"
class=
"diff-td diff-line-num old_line empty-cell"
...
...
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