Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
funkwhale
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mélanie Chauvel
funkwhale
Commits
ef2dc038
Commit
ef2dc038
authored
6 years ago
by
Auri
Committed by
Eliot Berriot
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "UI for multi-disc albums"
parent
2b24f19d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
changes/changelog.d/631.enhacement
+1
-0
1 addition, 0 deletions
changes/changelog.d/631.enhacement
front/src/App.vue
+8
-0
8 additions, 0 deletions
front/src/App.vue
front/src/components/library/Album.vue
+35
-7
35 additions, 7 deletions
front/src/components/library/Album.vue
with
44 additions
and
7 deletions
changes/changelog.d/631.enhacement
0 → 100644
+
1
−
0
View file @
ef2dc038
Add UI elements for multi-disc albums (#631)
This diff is collapsed.
Click to expand it.
front/src/App.vue
+
8
−
0
View file @
ef2dc038
...
...
@@ -392,4 +392,12 @@ button.reset {
[role="
button
"] {
cursor: pointer;
}
.left.floated {
float: left;
}
.right.floated {
float: right;
}
</
style
>
This diff is collapsed.
Click to expand it.
front/src/components/library/Album.vue
+
35
−
7
View file @
ef2dc038
...
...
@@ -39,12 +39,27 @@
</a>
</div>
</section>
<section
class=
"ui vertical stripe segment"
>
<h2>
<translate>
Tracks
</translate>
</h2>
<track-table
v-if=
"album"
:artist=
"album.artist"
:display-position=
"true"
:tracks=
"album.tracks"
></track-table>
</section>
<template
v-if=
"discs && discs.length > 1"
>
<section
v-for=
"(tracks, disc_number) in discs"
class=
"ui vertical stripe segment"
>
<translate
tag=
"h2"
class=
"left floated"
:translate-params=
"
{number: disc_number + 1}"
>Volume %{ number }
</translate>
<play-button
class=
"right floated orange"
:tracks=
"tracks"
>
<translate>
Play all
</translate>
</play-button>
<track-table
:artist=
"album.artist"
:display-position=
"true"
:tracks=
"tracks"
></track-table>
</section>
</
template
>
<
template
v-else
>
<section
class=
"ui vertical stripe segment"
>
<h2>
<translate>
Tracks
</translate>
</h2>
<track-table
v-if=
"album"
:artist=
"album.artist"
:display-position=
"true"
:tracks=
"album.tracks"
></track-table>
</section>
</
template
>
<section
class=
"ui vertical stripe segment"
>
<h2>
<translate>
User libraries
</translate>
...
...
@@ -67,6 +82,17 @@ import LibraryWidget from "@/components/federation/LibraryWidget"
const
FETCH_URL
=
"
albums/
"
function
groupByDisc
(
acc
,
track
)
{
var
dn
=
track
.
disc_number
-
1
if
(
dn
<
0
)
dn
=
0
if
(
acc
[
dn
]
==
undefined
)
{
acc
.
push
([
track
])
}
else
{
acc
[
dn
].
push
(
track
)
}
return
acc
}
export
default
{
props
:
[
"
id
"
],
components
:
{
...
...
@@ -77,7 +103,8 @@ export default {
data
()
{
return
{
isLoading
:
true
,
album
:
null
album
:
null
,
discs
:
[]
}
},
created
()
{
...
...
@@ -91,6 +118,7 @@ export default {
logger
.
default
.
debug
(
'
Fetching album "
'
+
this
.
id
+
'
"
'
)
axios
.
get
(
url
).
then
(
response
=>
{
self
.
album
=
backend
.
Album
.
clean
(
response
.
data
)
self
.
discs
=
self
.
album
.
tracks
.
reduce
(
groupByDisc
,
[])
self
.
isLoading
=
false
})
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment