[web-src] Show new (unplayed) episodes in podcasts page

This commit is contained in:
chme
2019-01-27 06:36:19 +01:00
parent 8840a65ee6
commit 78ca795814
5 changed files with 81 additions and 12 deletions

View File

@@ -4,7 +4,7 @@
<slot name="icon"></slot>
</figure>
<div class="media-content fd-has-action is-clipped" @click="listeners.click">
<h1 class="title is-6">{{ props.track.title }}</h1>
<h1 class="title is-6" :class="{ 'has-text-grey': props.track.media_kind === 'podcast' && props.track.play_count > 0 }">{{ props.track.title }}</h1>
<h2 class="subtitle is-7 has-text-grey"><b>{{ props.track.artist }}</b></h2>
<h2 class="subtitle is-7 has-text-grey">{{ props.track.album }}</h2>
</div>

View File

@@ -12,6 +12,10 @@
<p class="subtitle">
{{ track.artist }}
</p>
<div class="buttons" v-if="track.media_kind === 'podcast'">
<a class="button is-small" v-if="track.play_count > 0" @click="mark_new">Mark as new</a>
<a class="button is-small" v-if="track.play_count === 0" @click="mark_played">Mark as played</a>
</div>
<div class="content is-small">
<p>
<span class="heading">Album</span>
@@ -125,6 +129,16 @@ export default {
open_artist: function () {
this.$emit('close')
this.$router.push({ path: '/music/artists/' + this.track.album_artist_id })
},
mark_new: function () {
this.$emit('close')
// TODO
},
mark_played: function () {
this.$emit('close')
// TODO
}
}
}