2018-08-11 01:47:10 -04:00
|
|
|
<template>
|
2020-04-18 00:57:55 -04:00
|
|
|
<a @click="toggle_shuffle_mode" :class="{ 'is-warning': is_shuffle }">
|
|
|
|
<span class="icon"><i class="mdi" :class="[icon_style, { 'mdi-shuffle': is_shuffle, 'mdi-shuffle-disabled': !is_shuffle }]"></i></span>
|
2018-08-11 01:47:10 -04:00
|
|
|
</a>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import webapi from '@/webapi'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'PlayerButtonShuffle',
|
|
|
|
|
2020-04-18 00:57:55 -04:00
|
|
|
props: {
|
|
|
|
icon_style: String
|
|
|
|
},
|
|
|
|
|
2018-08-11 01:47:10 -04:00
|
|
|
computed: {
|
|
|
|
is_shuffle () {
|
|
|
|
return this.$store.state.player.shuffle
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
toggle_shuffle_mode: function () {
|
|
|
|
webapi.player_shuffle(!this.is_shuffle)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
</style>
|