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
baa1d40c
Commit
baa1d40c
authored
Aug 14, 2018
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added compute property to diff file + changed a for loop
parent
b6a2e655
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
app/assets/javascripts/diffs/components/diff_file.vue
app/assets/javascripts/diffs/components/diff_file.vue
+4
-1
app/assets/javascripts/diffs/store/mutations.js
app/assets/javascripts/diffs/store/mutations.js
+1
-1
No files found.
app/assets/javascripts/diffs/components/diff_file.vue
View file @
baa1d40c
...
@@ -46,6 +46,9 @@ export default {
...
@@ -46,6 +46,9 @@ export default {
showExpandMessage
()
{
showExpandMessage
()
{
return
this
.
isCollapsed
&&
!
this
.
isLoadingCollapsedDiff
&&
!
this
.
file
.
tooLarge
;
return
this
.
isCollapsed
&&
!
this
.
isLoadingCollapsedDiff
&&
!
this
.
file
.
tooLarge
;
},
},
showLoadingIcon
()
{
return
this
.
isLoadingCollapsedDiff
||
(
!
this
.
file
.
renderIt
&&
!
this
.
isCollapsed
);
},
},
},
methods
:
{
methods
:
{
...
mapActions
(
'
diffs
'
,
[
'
loadCollapsedDiff
'
]),
...
mapActions
(
'
diffs
'
,
[
'
loadCollapsedDiff
'
]),
...
@@ -133,7 +136,7 @@ export default {
...
@@ -133,7 +136,7 @@ export default {
:diff-file="file"
:diff-file="file"
/>
/>
<loading-icon
<loading-icon
v-
if=
"isLoadingCollapsedDiff || (!file.renderIt && !isCollapsed)
"
v-
else-if=
"showLoadingIcon
"
class=
"diff-content loading"
class=
"diff-content loading"
/>
/>
<div
<div
...
...
app/assets/javascripts/diffs/store/mutations.js
View file @
baa1d40c
...
@@ -34,7 +34,7 @@ export default {
...
@@ -34,7 +34,7 @@ export default {
if
(
file
.
highlightedDiffLines
)
{
if
(
file
.
highlightedDiffLines
)
{
const
linesLength
=
file
.
highlightedDiffLines
.
length
;
const
linesLength
=
file
.
highlightedDiffLines
.
length
;
let
u
=
0
;
let
u
;
for
(
u
=
0
;
u
<
linesLength
;
u
+=
1
)
{
for
(
u
=
0
;
u
<
linesLength
;
u
+=
1
)
{
const
line
=
file
.
highlightedDiffLines
[
u
];
const
line
=
file
.
highlightedDiffLines
[
u
];
delete
line
.
text
;
delete
line
.
text
;
...
...
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