Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
petitminion
funkwhale
Commits
5f5cb283
Verified
Commit
5f5cb283
authored
Jun 05, 2018
by
Eliot Berriot
Browse files
Fix #278: Broken search bar on library home
parent
a16bd2a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
changes/changelog.d/278.bugfix
0 → 100644
View file @
5f5cb283
Broken search bar on library home (#278)
front/src/components/audio/Search.vue
View file @
5f5cb283
...
...
@@ -29,9 +29,9 @@
</template>
<
script
>
import
_
from
'
lodash
'
import
axios
from
'
axios
'
import
logger
from
'
@/logging
'
import
backend
from
'
@/audio/backend
'
import
AlbumCard
from
'
@/components/audio/album/Card
'
import
ArtistCard
from
'
@/components/audio/artist/Card
'
...
...
@@ -50,7 +50,6 @@ export default {
albums
:
[],
artists
:
[]
},
backend
:
backend
,
isLoading
:
false
}
},
...
...
@@ -61,7 +60,7 @@ export default {
this
.
search
()
},
methods
:
{
search
()
{
search
:
_
.
debounce
(
function
()
{
if
(
this
.
query
.
length
<
1
)
{
return
}
...
...
@@ -77,15 +76,11 @@ export default {
self
.
results
=
self
.
castResults
(
response
.
data
)
self
.
isLoading
=
false
})
},
},
500
),
castResults
(
results
)
{
return
{
albums
:
results
.
albums
.
map
((
album
)
=>
{
return
backend
.
Album
.
clean
(
album
)
}),
artists
:
results
.
artists
.
map
((
artist
)
=>
{
return
backend
.
Artist
.
clean
(
artist
)
})
albums
:
results
.
albums
,
artists
:
results
.
artists
}
}
},
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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