[web] Provide similar style between podcast, audiobook, and album pages
The podcast page is now similar to the audiobook or album pages. Thus, making the UI a bit more coherent.
This commit is contained in:
parent
c20c80b757
commit
60015e1da2
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
v-if="width > 0"
|
v-if="width > 0"
|
||||||
class="progress-bar mt-2"
|
class="progress-bar"
|
||||||
:style="{ width: width_percent }"
|
:style="{ width: width_percent }"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
.progress-bar {
|
.progress-bar {
|
||||||
background-color: $info;
|
background-color: $info;
|
||||||
border-radius: 9999px;
|
border-radius: 2px;
|
||||||
height: 4px;
|
height: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.media.with-progress {
|
.media.with-progress {
|
||||||
margin-top: 0px;
|
margin-top: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.navbar-item {
|
a.navbar-item {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
class="button is-small is-light is-rounded"
|
class="button is-small is-light is-rounded"
|
||||||
@click="show_album_details_modal = true"
|
@click="show_details_modal = true"
|
||||||
>
|
>
|
||||||
<mdicon class="icon" name="dots-horizontal" size="16" />
|
<mdicon class="icon" name="dots-horizontal" size="16" />
|
||||||
</a>
|
</a>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
:artist="album.artist"
|
:artist="album.artist"
|
||||||
:album="album.name"
|
:album="album.name"
|
||||||
class="is-clickable fd-has-shadow fd-cover fd-cover-medium-image"
|
class="is-clickable fd-has-shadow fd-cover fd-cover-medium-image"
|
||||||
@click="show_album_details_modal = true"
|
@click="show_details_modal = true"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
|
@ -35,9 +35,9 @@
|
||||||
/>
|
/>
|
||||||
<list-tracks :tracks="tracks" :uris="album.uri" />
|
<list-tracks :tracks="tracks" :uris="album.uri" />
|
||||||
<modal-dialog-album
|
<modal-dialog-album
|
||||||
:show="show_album_details_modal"
|
:show="show_details_modal"
|
||||||
:album="album"
|
:album="album"
|
||||||
@close="show_album_details_modal = false"
|
@close="show_details_modal = false"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</content-with-hero>
|
</content-with-hero>
|
||||||
|
@ -68,7 +68,7 @@ const dataObject = {
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PageAlbum',
|
name: 'PageAlbum',
|
||||||
components: { ContentWithHero, ListTracks, ModalDialogAlbum, CoverArtwork },
|
components: { ContentWithHero, CoverArtwork, ListTracks, ModalDialogAlbum },
|
||||||
|
|
||||||
beforeRouteEnter(to, from, next) {
|
beforeRouteEnter(to, from, next) {
|
||||||
dataObject.load(to).then((response) => {
|
dataObject.load(to).then((response) => {
|
||||||
|
@ -86,8 +86,8 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
album: {},
|
album: {},
|
||||||
tracks: new GroupByList(),
|
show_details_modal: false,
|
||||||
show_album_details_modal: false
|
tracks: new GroupByList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -99,7 +99,6 @@ export default {
|
||||||
params: { id: this.album.artist_id }
|
params: { id: this.album.artist_id }
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
play() {
|
play() {
|
||||||
webapi.player_play_uri(this.album.uri, true)
|
webapi.player_play_uri(this.album.uri, true)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,34 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="fd-page">
|
<div class="fd-page">
|
||||||
<content-with-heading>
|
<content-with-hero>
|
||||||
<template #heading-left>
|
<template #heading-left>
|
||||||
<div class="title is-4" v-text="album.name" />
|
<h1 class="title is-5" v-text="album.name" />
|
||||||
</template>
|
<h2 class="subtitle is-6 has-text-weight-normal"> </h2>
|
||||||
<template #heading-right>
|
<div class="buttons fd-is-centered-mobile mt-5">
|
||||||
<div class="buttons is-centered">
|
<a class="button is-small is-dark is-rounded" @click="play">
|
||||||
|
<mdicon class="icon" name="play" size="16" />
|
||||||
|
<span v-text="$t('page.podcast.play')" />
|
||||||
|
</a>
|
||||||
<a
|
<a
|
||||||
class="button is-small is-light is-rounded"
|
class="button is-small is-light is-rounded"
|
||||||
@click="show_details_modal = true"
|
@click="show_details_modal = true"
|
||||||
>
|
>
|
||||||
<mdicon class="icon" name="dots-horizontal" size="16" />
|
<mdicon class="icon" name="dots-horizontal" size="16" />
|
||||||
</a>
|
</a>
|
||||||
<a class="button is-small is-dark is-rounded" @click="play">
|
|
||||||
<mdicon class="icon" name="play" size="16" />
|
|
||||||
<span v-text="$t('page.podcast.play')" />
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<template #heading-right>
|
||||||
|
<cover-artwork
|
||||||
|
:artwork_url="album.artwork_url"
|
||||||
|
:artist="album.artist"
|
||||||
|
:album="album.name"
|
||||||
|
class="is-clickable fd-has-shadow fd-cover fd-cover-medium-image"
|
||||||
|
@click="show_details_modal = true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<p
|
<p
|
||||||
class="heading has-text-centered-mobile"
|
class="heading is-7 has-text-centered-mobile mt-5"
|
||||||
v-text="$t('page.podcast.track-count', { count: album.track_count })"
|
v-text="$t('page.podcast.track-count', { count: album.track_count })"
|
||||||
/>
|
/>
|
||||||
<list-tracks
|
<list-tracks
|
||||||
|
@ -53,12 +61,13 @@
|
||||||
</template>
|
</template>
|
||||||
</modal-dialog>
|
</modal-dialog>
|
||||||
</template>
|
</template>
|
||||||
</content-with-heading>
|
</content-with-hero>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ContentWithHeading from '@/templates/ContentWithHeading.vue'
|
import ContentWithHero from '@/templates/ContentWithHero.vue'
|
||||||
|
import CoverArtwork from '@/components/CoverArtwork.vue'
|
||||||
import { GroupByList } from '@/lib/GroupByList'
|
import { GroupByList } from '@/lib/GroupByList'
|
||||||
import ListTracks from '@/components/ListTracks.vue'
|
import ListTracks from '@/components/ListTracks.vue'
|
||||||
import ModalDialog from '@/components/ModalDialog.vue'
|
import ModalDialog from '@/components/ModalDialog.vue'
|
||||||
|
@ -82,7 +91,8 @@ const dataObject = {
|
||||||
export default {
|
export default {
|
||||||
name: 'PagePodcast',
|
name: 'PagePodcast',
|
||||||
components: {
|
components: {
|
||||||
ContentWithHeading,
|
ContentWithHero,
|
||||||
|
CoverArtwork,
|
||||||
ListTracks,
|
ListTracks,
|
||||||
ModalDialog,
|
ModalDialog,
|
||||||
ModalDialogAlbum
|
ModalDialogAlbum
|
||||||
|
@ -104,10 +114,10 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
album: {},
|
album: {},
|
||||||
tracks: new GroupByList(),
|
rss_playlist_to_remove: {},
|
||||||
show_details_modal: false,
|
show_details_modal: false,
|
||||||
show_remove_podcast_modal: false,
|
show_remove_podcast_modal: false,
|
||||||
rss_playlist_to_remove: {}
|
tracks: new GroupByList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -118,22 +128,25 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
play() {
|
|
||||||
webapi.player_play_uri(this.album.uri, false)
|
|
||||||
},
|
|
||||||
|
|
||||||
open_remove_podcast_dialog() {
|
open_remove_podcast_dialog() {
|
||||||
webapi
|
webapi
|
||||||
.library_track_playlists(this.tracks.items[0].id)
|
.library_track_playlists(this.tracks.items[0].id)
|
||||||
.then(({ data }) => {
|
.then(({ data }) => {
|
||||||
this.rss_playlist_to_remove = data.items.filter(
|
;[this.rss_playlist_to_remove] = data.items.filter(
|
||||||
(pl) => pl.type === 'rss'
|
(pl) => pl.type === 'rss'
|
||||||
)[0]
|
)
|
||||||
this.show_remove_podcast_modal = true
|
this.show_remove_podcast_modal = true
|
||||||
this.show_details_modal = false
|
this.show_details_modal = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
play() {
|
||||||
|
webapi.player_play_uri(this.album.uri, false)
|
||||||
|
},
|
||||||
|
reload_tracks() {
|
||||||
|
webapi.library_podcast_episodes(this.album.id).then(({ data }) => {
|
||||||
|
this.tracks = new GroupByList(data.tracks)
|
||||||
|
})
|
||||||
|
},
|
||||||
remove_podcast() {
|
remove_podcast() {
|
||||||
this.show_remove_podcast_modal = false
|
this.show_remove_podcast_modal = false
|
||||||
webapi
|
webapi
|
||||||
|
@ -141,12 +154,6 @@ export default {
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$router.replace({ name: 'podcasts' })
|
this.$router.replace({ name: 'podcasts' })
|
||||||
})
|
})
|
||||||
},
|
|
||||||
|
|
||||||
reload_tracks() {
|
|
||||||
webapi.library_podcast_episodes(this.album.id).then(({ data }) => {
|
|
||||||
this.tracks = new GroupByList(data.tracks)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue