2018-08-11 01:47:10 -04:00
|
|
|
<template>
|
|
|
|
<div class="media">
|
2022-02-19 00:39:14 -05:00
|
|
|
<div class="media-content fd-has-action is-clipped" @click="play">
|
|
|
|
<h1
|
|
|
|
class="title is-6"
|
|
|
|
:class="{ 'has-text-grey-light': track.is_playable === false }"
|
|
|
|
>
|
|
|
|
{{ track.name }}
|
|
|
|
</h1>
|
|
|
|
<h2
|
|
|
|
class="subtitle is-7"
|
|
|
|
:class="{
|
|
|
|
'has-text-grey': track.is_playable,
|
|
|
|
'has-text-grey-light': track.is_playable === false
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
<b>{{ track.artists[0].name }}</b>
|
|
|
|
</h2>
|
|
|
|
<h2 v-if="track.is_playable === false" class="subtitle is-7">
|
|
|
|
(Track is not playable<span
|
|
|
|
v-if="track.restrictions && track.restrictions.reason"
|
|
|
|
>, restriction reason: {{ track.restrictions.reason }}</span
|
|
|
|
>)
|
2021-12-26 13:49:23 -05:00
|
|
|
</h2>
|
2018-08-11 01:47:10 -04:00
|
|
|
</div>
|
|
|
|
<div class="media-right">
|
2022-02-19 00:39:14 -05:00
|
|
|
<slot name="actions" />
|
2018-08-11 01:47:10 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import webapi from '@/webapi'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'SpotifyListItemTrack',
|
|
|
|
|
|
|
|
props: ['track', 'position', 'album', 'context_uri'],
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
play: function () {
|
2018-11-06 15:44:01 -05:00
|
|
|
webapi.player_play_uri(this.context_uri, false, this.position)
|
2018-08-11 01:47:10 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2022-02-19 00:39:14 -05:00
|
|
|
<style></style>
|