2018-12-17 05:52:09 -05:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<transition name="fade">
|
2022-02-19 00:39:14 -05:00
|
|
|
<div v-if="show" class="modal is-active">
|
|
|
|
<div class="modal-background" @click="$emit('close')" />
|
2018-12-17 05:52:09 -05:00
|
|
|
<div class="modal-content fd-modal-card">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-content">
|
|
|
|
<p class="title is-4">
|
2022-02-19 00:39:14 -05:00
|
|
|
<a class="has-text-link" @click="open_artist">{{
|
|
|
|
artist.name
|
|
|
|
}}</a>
|
2018-12-17 05:52:09 -05:00
|
|
|
</p>
|
|
|
|
<div class="content is-small">
|
|
|
|
<p>
|
|
|
|
<span class="heading">Popularity / Followers</span>
|
2022-02-19 00:39:14 -05:00
|
|
|
<span class="title is-6"
|
|
|
|
>{{ artist.popularity }} /
|
|
|
|
{{ artist.followers.total }}</span
|
|
|
|
>
|
2018-12-17 05:52:09 -05:00
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<span class="heading">Genres</span>
|
|
|
|
<span class="title is-6">{{ artist.genres.join(', ') }}</span>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<footer class="card-footer">
|
|
|
|
<a class="card-footer-item has-text-dark" @click="queue_add">
|
2022-02-19 00:39:14 -05:00
|
|
|
<span class="icon"><i class="mdi mdi-playlist-plus" /></span>
|
|
|
|
<span class="is-size-7">Add</span>
|
2018-12-17 05:52:09 -05:00
|
|
|
</a>
|
|
|
|
<a class="card-footer-item has-text-dark" @click="queue_add_next">
|
2022-02-19 00:39:14 -05:00
|
|
|
<span class="icon"><i class="mdi mdi-playlist-play" /></span>
|
|
|
|
<span class="is-size-7">Add Next</span>
|
2018-12-17 05:52:09 -05:00
|
|
|
</a>
|
|
|
|
<a class="card-footer-item has-text-dark" @click="play">
|
2022-02-19 00:39:14 -05:00
|
|
|
<span class="icon"><i class="mdi mdi-play" /></span>
|
|
|
|
<span class="is-size-7">Play</span>
|
2018-12-17 05:52:09 -05:00
|
|
|
</a>
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-02-19 00:39:14 -05:00
|
|
|
<button
|
|
|
|
class="modal-close is-large"
|
|
|
|
aria-label="close"
|
|
|
|
@click="$emit('close')"
|
|
|
|
/>
|
2018-12-17 05:52:09 -05:00
|
|
|
</div>
|
|
|
|
</transition>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import webapi from '@/webapi'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'SpotifyModalDialogArtist',
|
2020-04-11 13:43:53 -04:00
|
|
|
props: ['show', 'artist'],
|
2018-12-17 05:52:09 -05:00
|
|
|
|
|
|
|
methods: {
|
|
|
|
play: function () {
|
|
|
|
this.$emit('close')
|
|
|
|
webapi.player_play_uri(this.artist.uri, false)
|
|
|
|
},
|
|
|
|
|
|
|
|
queue_add: function () {
|
|
|
|
this.$emit('close')
|
2018-12-23 03:54:02 -05:00
|
|
|
webapi.queue_add(this.artist.uri)
|
2018-12-17 05:52:09 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
queue_add_next: function () {
|
|
|
|
this.$emit('close')
|
2018-12-23 03:54:02 -05:00
|
|
|
webapi.queue_add_next(this.artist.uri)
|
2018-12-17 05:52:09 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
open_artist: function () {
|
|
|
|
this.$router.push({ path: '/music/spotify/artists/' + this.artist.id })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2022-02-19 00:39:14 -05:00
|
|
|
<style></style>
|