2015-12-19 16:36:44 +00:00
|
|
|
<template>
|
2016-06-25 16:05:24 +00:00
|
|
|
<article id="albumInfo" :class="mode">
|
|
|
|
<h1 class="name">
|
|
|
|
<span>{{ album.name }}</span>
|
2015-12-19 16:36:44 +00:00
|
|
|
|
2016-06-25 16:05:24 +00:00
|
|
|
<a class="shuffle" @click.prevent="shuffleAll"><i class="fa fa-random"></i></a>
|
|
|
|
</h1>
|
2015-12-19 16:36:44 +00:00
|
|
|
|
2016-06-25 16:05:24 +00:00
|
|
|
<div v-if="album.info">
|
2016-10-31 04:28:12 +00:00
|
|
|
<img v-if="album.info.image" :src="album.info.image" class="cover">
|
2015-12-19 16:36:44 +00:00
|
|
|
|
2016-06-25 16:05:24 +00:00
|
|
|
<div class="wiki" v-if="album.info.wiki && album.info.wiki.summary">
|
2016-10-31 05:00:26 +00:00
|
|
|
<div class="summary" v-show="showSummary" v-html="album.info.wiki.summary"/>
|
|
|
|
<div class="full" v-show="showFull" v-html="album.info.wiki.full"/>
|
2016-06-05 10:46:40 +00:00
|
|
|
|
2016-10-31 05:00:26 +00:00
|
|
|
<button class="more" v-show="showSummary" @click.prevent="showingFullWiki = true">
|
2016-06-25 16:05:24 +00:00
|
|
|
Full Wiki
|
|
|
|
</button>
|
|
|
|
</div>
|
2015-12-19 16:36:44 +00:00
|
|
|
|
2016-06-25 16:05:24 +00:00
|
|
|
<section class="track-listing" v-if="album.info.tracks.length">
|
|
|
|
<h1>Track Listing</h1>
|
|
|
|
<ul class="tracks">
|
|
|
|
<li v-for="(track, idx) in album.info.tracks">
|
|
|
|
<span class="no">{{ idx + 1 }}</span>
|
|
|
|
<span class="title">{{ track.title }}</span>
|
|
|
|
<span class="length">{{ track.fmtLength }}</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
2015-12-19 16:36:44 +00:00
|
|
|
|
2016-06-25 16:05:24 +00:00
|
|
|
<footer>Data © <a target="_blank" :href="album.info.url">Last.fm</a></footer>
|
|
|
|
</div>
|
2015-12-19 16:36:44 +00:00
|
|
|
|
2016-06-25 16:05:24 +00:00
|
|
|
<p class="none" v-else>No album information found.</p>
|
|
|
|
</article>
|
2015-12-19 16:36:44 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2016-11-26 03:25:35 +00:00
|
|
|
import { playback } from '../../../services'
|
2015-12-19 16:36:44 +00:00
|
|
|
|
2016-06-25 16:05:24 +00:00
|
|
|
export default {
|
|
|
|
props: ['album', 'mode'],
|
2015-12-19 16:36:44 +00:00
|
|
|
|
2016-11-26 03:25:35 +00:00
|
|
|
data () {
|
2016-06-25 16:05:24 +00:00
|
|
|
return {
|
2016-11-26 03:25:35 +00:00
|
|
|
showingFullWiki: false
|
|
|
|
}
|
2016-06-25 16:05:24 +00:00
|
|
|
},
|
2015-12-19 16:36:44 +00:00
|
|
|
|
2016-09-23 09:55:20 +00:00
|
|
|
watch: {
|
2016-11-26 03:25:35 +00:00
|
|
|
album () {
|
|
|
|
this.showingFullWiki = false
|
|
|
|
}
|
2016-09-23 09:55:20 +00:00
|
|
|
},
|
2015-12-19 16:36:44 +00:00
|
|
|
|
2016-10-31 08:15:32 +00:00
|
|
|
computed: {
|
2016-11-26 03:25:35 +00:00
|
|
|
showSummary () {
|
|
|
|
return this.mode !== 'full' && !this.showingFullWiki
|
2016-10-31 05:00:26 +00:00
|
|
|
},
|
|
|
|
|
2016-11-26 03:25:35 +00:00
|
|
|
showFull () {
|
|
|
|
return this.mode === 'full' || this.showingFullWiki
|
|
|
|
}
|
2016-10-31 05:00:26 +00:00
|
|
|
},
|
|
|
|
|
2016-09-23 09:55:20 +00:00
|
|
|
methods: {
|
2016-06-25 16:05:24 +00:00
|
|
|
/**
|
|
|
|
* Shuffle all songs in the current album.
|
|
|
|
*/
|
2016-11-26 03:25:35 +00:00
|
|
|
shuffleAll () {
|
|
|
|
playback.playAllInAlbum(this.album)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-12-19 16:36:44 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="sass">
|
2016-06-25 16:05:24 +00:00
|
|
|
@import "../../../../sass/partials/_vars.scss";
|
|
|
|
@import "../../../../sass/partials/_mixins.scss";
|
2015-12-19 16:36:44 +00:00
|
|
|
|
2016-06-25 16:05:24 +00:00
|
|
|
#albumInfo {
|
|
|
|
@include artist-album-info();
|
|
|
|
}
|
2015-12-19 16:36:44 +00:00
|
|
|
</style>
|