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
775adc27
Commit
775adc27
authored
Feb 06, 2020
by
Paul Gascou-Vaillancourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace underscore with lodash in notes
parent
789ca265
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
app/assets/javascripts/notes/components/comment_form.vue
app/assets/javascripts/notes/components/comment_form.vue
+2
-2
app/assets/javascripts/notes/components/diff_discussion_header.vue
...s/javascripts/notes/components/diff_discussion_header.vue
+2
-2
app/assets/javascripts/notes/components/noteable_note.vue
app/assets/javascripts/notes/components/noteable_note.vue
+1
-1
app/assets/javascripts/notes/components/toggle_replies_widget.vue
...ts/javascripts/notes/components/toggle_replies_widget.vue
+2
-2
app/assets/javascripts/notes/stores/getters.js
app/assets/javascripts/notes/stores/getters.js
+2
-2
No files found.
app/assets/javascripts/notes/components/comment_form.vue
View file @
775adc27
<
script
>
import
$
from
'
jquery
'
;
import
{
mapActions
,
mapGetters
,
mapState
}
from
'
vuex
'
;
import
_
from
'
underscore
'
;
import
{
isEmpty
}
from
'
lodash
'
;
import
Autosize
from
'
autosize
'
;
import
{
__
,
sprintf
}
from
'
~/locale
'
;
import
TimelineEntryItem
from
'
~/vue_shared/components/notes/timeline_entry_item.vue
'
;
...
...
@@ -161,7 +161,7 @@ export default {
'
toggleStateButtonLoading
'
,
]),
setIsSubmitButtonDisabled
(
note
,
isSubmitting
)
{
if
(
!
_
.
isEmpty
(
note
)
&&
!
isSubmitting
)
{
if
(
!
isEmpty
(
note
)
&&
!
isSubmitting
)
{
this
.
isSubmitButtonDisabled
=
false
;
}
else
{
this
.
isSubmitButtonDisabled
=
true
;
...
...
app/assets/javascripts/notes/components/diff_discussion_header.vue
View file @
775adc27
<
script
>
import
{
mapActions
}
from
'
vuex
'
;
import
_
from
'
underscore
'
;
import
{
escape
}
from
'
lodash
'
;
import
{
s__
,
__
,
sprintf
}
from
'
~/locale
'
;
import
{
truncateSha
}
from
'
~/lib/utils/text_utility
'
;
...
...
@@ -45,7 +45,7 @@ export default {
return
this
.
notes
.
length
>
1
?
this
.
lastNote
.
created_at
:
null
;
},
headerText
()
{
const
linkStart
=
`<a href="
${
_
.
escape
(
this
.
discussion
.
discussion_path
)}
">`
;
const
linkStart
=
`<a href="
${
escape
(
this
.
discussion
.
discussion_path
)}
">`
;
const
linkEnd
=
'
</a>
'
;
const
{
commit_id
:
commitId
}
=
this
.
discussion
;
...
...
app/assets/javascripts/notes/components/noteable_note.vue
View file @
775adc27
<
script
>
import
$
from
'
jquery
'
;
import
{
mapGetters
,
mapActions
}
from
'
vuex
'
;
import
{
escape
}
from
'
underscore
'
;
import
{
escape
}
from
'
lodash
'
;
import
draftMixin
from
'
ee_else_ce/notes/mixins/draft
'
;
import
{
truncateSha
}
from
'
~/lib/utils/text_utility
'
;
import
TimelineEntryItem
from
'
~/vue_shared/components/notes/timeline_entry_item.vue
'
;
...
...
app/assets/javascripts/notes/components/toggle_replies_widget.vue
View file @
775adc27
<
script
>
import
_
from
'
underscore
'
;
import
{
uniqBy
}
from
'
lodash
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
UserAvatarLink
from
'
~/vue_shared/components/user_avatar/user_avatar_link.vue
'
;
import
TimeAgoTooltip
from
'
~/vue_shared/components/time_ago_tooltip.vue
'
;
...
...
@@ -27,7 +27,7 @@ export default {
uniqueAuthors
()
{
const
authors
=
this
.
replies
.
map
(
reply
=>
reply
.
author
||
{});
return
_
.
uniq
(
authors
,
author
=>
author
.
username
);
return
uniqBy
(
authors
,
author
=>
author
.
username
);
},
className
()
{
return
this
.
collapsed
?
'
collapsed
'
:
'
expanded
'
;
...
...
app/assets/javascripts/notes/stores/getters.js
View file @
775adc27
import
_
from
'
underscore
'
;
import
{
flattenDeep
}
from
'
lodash
'
;
import
*
as
constants
from
'
../constants
'
;
import
{
collapseSystemNotes
}
from
'
./collapse_utils
'
;
...
...
@@ -50,7 +50,7 @@ const isLastNote = (note, state) =>
!
note
.
system
&&
state
.
userData
&&
note
.
author
&&
note
.
author
.
id
===
state
.
userData
.
id
;
export
const
getCurrentUserLastNote
=
state
=>
_
.
flatten
(
reverseNotes
(
state
.
discussions
).
map
(
note
=>
reverseNotes
(
note
.
notes
))).
find
(
el
=>
flattenDeep
(
reverseNotes
(
state
.
discussions
).
map
(
note
=>
reverseNotes
(
note
.
notes
))).
find
(
el
=>
isLastNote
(
el
,
state
),
);
...
...
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