2018-03-19 16:39:03 +00:00
|
|
|
<template>
|
|
|
|
<button
|
2019-12-26 10:38:26 +00:00
|
|
|
@click.stop="$store.commit('playlists/chooseTrack', track)"
|
2018-03-19 16:39:03 +00:00
|
|
|
v-if="button"
|
2019-02-18 09:01:57 +00:00
|
|
|
:class="['ui', 'icon', 'labeled', 'button']">
|
2018-03-19 16:39:03 +00:00
|
|
|
<i class="list icon"></i>
|
2019-03-08 11:37:02 +00:00
|
|
|
<translate translate-context="Sidebar/Player/Icon.Tooltip/Verb">Add to playlist…</translate>
|
2018-03-19 16:39:03 +00:00
|
|
|
</button>
|
2018-10-21 13:41:31 +00:00
|
|
|
<button
|
2018-03-19 16:39:03 +00:00
|
|
|
v-else
|
2019-12-26 10:38:26 +00:00
|
|
|
@click.stop="$store.commit('playlists/chooseTrack', track)"
|
2018-10-21 13:41:31 +00:00
|
|
|
:class="['ui', 'basic', 'circular', 'icon', 'really', 'button']"
|
|
|
|
:aria-label="labels.addToPlaylist"
|
2018-07-01 19:50:50 +00:00
|
|
|
:title="labels.addToPlaylist">
|
2018-10-21 13:41:31 +00:00
|
|
|
<i :class="['list', 'basic', 'icon']"></i>
|
|
|
|
</button>
|
2018-03-19 16:39:03 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
track: {type: Object},
|
|
|
|
button: {type: Boolean, default: false}
|
|
|
|
},
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
showModal: false
|
|
|
|
}
|
2018-07-01 19:50:50 +00:00
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
labels () {
|
|
|
|
return {
|
2019-02-11 14:58:41 +00:00
|
|
|
addToPlaylist: this.$pgettext('Sidebar/Player/Icon.Tooltip/Verb', 'Add to playlist…')
|
2018-07-01 19:50:50 +00:00
|
|
|
}
|
|
|
|
}
|
2018-03-19 16:39:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
|
|
<style scoped>
|
|
|
|
</style>
|