2018-12-15 03:56: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-15 03:56:09 -05:00
|
|
|
<div class="modal-content fd-modal-card">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-content">
|
|
|
|
<p class="title is-4">
|
2022-05-29 12:49:00 -04:00
|
|
|
<a
|
|
|
|
class="has-text-link"
|
|
|
|
@click="open_playlist"
|
|
|
|
v-text="playlist.name"
|
|
|
|
/>
|
2018-12-15 03:56:09 -05:00
|
|
|
</p>
|
|
|
|
<div class="content is-small">
|
|
|
|
<p>
|
2023-06-10 07:48:58 -04:00
|
|
|
<span class="heading" v-text="$t('dialog.playlist.path')" />
|
2022-05-20 07:44:22 -04:00
|
|
|
<span class="title is-6" v-text="playlist.path" />
|
2018-12-15 03:56:09 -05:00
|
|
|
</p>
|
2020-03-08 06:56:19 -04:00
|
|
|
<p>
|
2022-05-20 07:44:22 -04:00
|
|
|
<span class="heading" v-text="$t('dialog.playlist.type')" />
|
2023-06-10 07:48:58 -04:00
|
|
|
<span
|
|
|
|
class="title is-6"
|
|
|
|
v-text="$t('playlist.type.' + playlist.type)"
|
|
|
|
/>
|
2020-03-08 06:56:19 -04:00
|
|
|
</p>
|
2022-04-16 14:21:26 -04:00
|
|
|
<p v-if="!playlist.folder">
|
2022-05-29 12:49:00 -04:00
|
|
|
<span
|
|
|
|
class="heading"
|
|
|
|
v-text="$t('dialog.playlist.track-count')"
|
|
|
|
/>
|
2022-05-20 07:44:22 -04:00
|
|
|
<span class="title is-6" v-text="playlist.item_count" />
|
2022-04-16 14:21:26 -04:00
|
|
|
</p>
|
2018-12-15 03:56:09 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-02-19 00:39:14 -05:00
|
|
|
<footer v-if="!playlist.folder" class="card-footer">
|
2018-12-15 03:56:09 -05:00
|
|
|
<a class="card-footer-item has-text-dark" @click="queue_add">
|
2023-06-30 15:41:40 -04:00
|
|
|
<mdicon class="icon" name="playlist-plus" size="16" />
|
2022-05-20 07:44:22 -04:00
|
|
|
<span class="is-size-7" v-text="$t('dialog.playlist.add')" />
|
2018-12-15 03:56:09 -05:00
|
|
|
</a>
|
|
|
|
<a class="card-footer-item has-text-dark" @click="queue_add_next">
|
2023-06-30 15:41:40 -04:00
|
|
|
<mdicon class="icon" name="playlist-play" size="16" />
|
2022-05-29 12:49:00 -04:00
|
|
|
<span
|
|
|
|
class="is-size-7"
|
|
|
|
v-text="$t('dialog.playlist.add-next')"
|
|
|
|
/>
|
2018-12-15 03:56:09 -05:00
|
|
|
</a>
|
|
|
|
<a class="card-footer-item has-text-dark" @click="play">
|
2023-06-30 15:41:40 -04:00
|
|
|
<mdicon class="icon" name="play" size="16" />
|
2022-05-20 07:44:22 -04:00
|
|
|
<span class="is-size-7" v-text="$t('dialog.playlist.play')" />
|
2018-12-15 03:56:09 -05:00
|
|
|
</a>
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-05-29 12:49:00 -04:00
|
|
|
<button
|
|
|
|
class="modal-close is-large"
|
|
|
|
aria-label="close"
|
|
|
|
@click="$emit('close')"
|
|
|
|
/>
|
2018-12-15 03:56:09 -05:00
|
|
|
</div>
|
|
|
|
</transition>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import webapi from '@/webapi'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'ModalDialogPlaylist',
|
2020-10-26 07:05:26 -04:00
|
|
|
props: ['show', 'playlist', 'uris'],
|
2022-02-19 01:05:59 -05:00
|
|
|
emits: ['close'],
|
2018-12-15 03:56:09 -05:00
|
|
|
|
|
|
|
methods: {
|
2023-06-07 15:25:54 -04:00
|
|
|
play() {
|
2018-12-15 03:56:09 -05:00
|
|
|
this.$emit('close')
|
2020-10-26 07:05:26 -04:00
|
|
|
webapi.player_play_uri(this.uris ? this.uris : this.playlist.uri, false)
|
2018-12-15 03:56:09 -05:00
|
|
|
},
|
|
|
|
|
2023-06-07 15:25:54 -04:00
|
|
|
queue_add() {
|
2018-12-15 03:56:09 -05:00
|
|
|
this.$emit('close')
|
2020-10-26 07:05:26 -04:00
|
|
|
webapi.queue_add(this.uris ? this.uris : this.playlist.uri)
|
2018-12-15 03:56:09 -05:00
|
|
|
},
|
|
|
|
|
2023-06-07 15:25:54 -04:00
|
|
|
queue_add_next() {
|
2018-12-15 03:56:09 -05:00
|
|
|
this.$emit('close')
|
2020-10-26 07:05:26 -04:00
|
|
|
webapi.queue_add_next(this.uris ? this.uris : this.playlist.uri)
|
2018-12-15 03:56:09 -05:00
|
|
|
},
|
|
|
|
|
2023-06-07 15:25:54 -04:00
|
|
|
open_playlist() {
|
2018-12-15 03:56:09 -05:00
|
|
|
this.$emit('close')
|
2023-07-10 09:37:40 -04:00
|
|
|
this.$router.push({
|
2023-07-18 08:08:52 -04:00
|
|
|
name: 'playlist',
|
2023-07-10 09:37:40 -04:00
|
|
|
params: { id: this.playlist.id }
|
|
|
|
})
|
2018-12-15 03:56:09 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2022-02-19 00:39:14 -05:00
|
|
|
<style></style>
|