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
d9209acf
Commit
d9209acf
authored
Feb 18, 2020
by
Dhiraj Bodicherla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use lodash instead of underscore in frequent items
parent
f3a7b371
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue
...ts/frequent_items/components/frequent_items_list_item.vue
+2
-2
app/assets/javascripts/frequent_items/components/frequent_items_search_input.vue
...frequent_items/components/frequent_items_search_input.vue
+2
-2
app/assets/javascripts/frequent_items/utils.js
app/assets/javascripts/frequent_items/utils.js
+2
-2
No files found.
app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue
View file @
d9209acf
<
script
>
/* eslint-disable vue/require-default-prop */
import
_
from
'
underscore
'
;
import
{
isEmpty
,
isString
}
from
'
lodash
'
;
import
Identicon
from
'
~/vue_shared/components/identicon.vue
'
;
import
highlight
from
'
~/lib/utils/highlight
'
;
import
{
truncateNamespace
}
from
'
~/lib/utils/text_utility
'
;
...
...
@@ -39,7 +39,7 @@ export default {
},
computed
:
{
hasAvatar
()
{
return
_
.
isString
(
this
.
avatarUrl
)
&&
!
_
.
isEmpty
(
this
.
avatarUrl
);
return
isString
(
this
.
avatarUrl
)
&&
!
isEmpty
(
this
.
avatarUrl
);
},
truncatedNamespace
()
{
return
truncateNamespace
(
this
.
namespace
);
...
...
app/assets/javascripts/frequent_items/components/frequent_items_search_input.vue
View file @
d9209acf
<
script
>
import
_
from
'
underscore
'
;
import
{
debounce
}
from
'
lodash
'
;
import
{
mapActions
}
from
'
vuex
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
eventHub
from
'
../event_hub
'
;
...
...
@@ -21,7 +21,7 @@ export default {
},
},
watch
:
{
searchQuery
:
_
.
debounce
(
function
debounceSearchQuery
()
{
searchQuery
:
debounce
(
function
debounceSearchQuery
()
{
this
.
setSearchQuery
(
this
.
searchQuery
);
},
500
),
},
...
...
app/assets/javascripts/frequent_items/utils.js
View file @
d9209acf
import
_
from
'
underscore
'
;
import
{
take
}
from
'
lodash
'
;
import
{
GlBreakpointInstance
as
bp
}
from
'
@gitlab/ui/dist/utils
'
;
import
sanitize
from
'
sanitize-html
'
;
import
{
FREQUENT_ITEMS
,
HOUR_IN_MS
}
from
'
./constants
'
;
...
...
@@ -31,7 +31,7 @@ export const getTopFrequentItems = items => {
return
0
;
});
return
_
.
first
(
frequentItems
,
frequentItemsCount
);
return
take
(
frequentItems
,
frequentItemsCount
);
};
export
const
updateExistingFrequentItem
=
(
frequentItem
,
item
)
=>
{
...
...
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