[web-src] Show cover artwork in Spotify album listings

This commit is contained in:
chme
2020-08-02 07:33:17 +02:00
parent 48e766e1ae
commit d0e4153859
4 changed files with 95 additions and 20 deletions

View File

@@ -1,9 +1,14 @@
<template>
<template functional>
<div class="media">
<div class="media-content fd-has-action is-clipped" v-on:click="open_album">
<h1 class="title is-6">{{ album.name }}</h1>
<h2 class="subtitle is-7 has-text-grey"><b>{{ album.artists[0].name }}</b></h2>
<h2 class="subtitle is-7 has-text-grey has-text-weight-normal">({{ album.album_type }}, {{ album.release_date | time('L') }})</h2>
<div class="media-left fd-has-action"
v-if="$slots['artwork']"
@click="listeners.click">
<slot name="artwork"></slot>
</div>
<div class="media-content fd-has-action is-clipped" @click="listeners.click">
<h1 class="title is-6">{{ props.album.name }}</h1>
<h2 class="subtitle is-7 has-text-grey"><b>{{ props.album.artists[0].name }}</b></h2>
<h2 class="subtitle is-7 has-text-grey has-text-weight-normal">({{ props.album.album_type }}, {{ props.album.release_date | time('L') }})</h2>
</div>
<div class="media-right">
<slot name="actions"></slot>
@@ -14,14 +19,7 @@
<script>
export default {
name: 'SpotifyListItemAlbum',
props: ['album'],
methods: {
open_album: function () {
this.$router.push({ path: '/music/spotify/albums/' + this.album.id })
}
}
props: ['album']
}
</script>