2018-08-11 01:47:10 -04:00
|
|
|
<template>
|
2022-02-19 00:39:14 -05:00
|
|
|
<a :class="{ 'is-warning': is_consume }" @click="toggle_consume_mode">
|
|
|
|
<span class="icon"><i class="mdi mdi-fire" :class="icon_style" /></span>
|
2018-08-11 01:47:10 -04:00
|
|
|
</a>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import webapi from '@/webapi'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'PlayerButtonConsume',
|
|
|
|
|
2020-04-18 00:57:55 -04:00
|
|
|
props: {
|
|
|
|
icon_style: String
|
|
|
|
},
|
|
|
|
|
2018-08-11 01:47:10 -04:00
|
|
|
computed: {
|
2022-02-19 00:39:14 -05:00
|
|
|
is_consume() {
|
2018-08-11 01:47:10 -04:00
|
|
|
return this.$store.state.player.consume
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
toggle_consume_mode: function () {
|
|
|
|
webapi.player_consume(!this.is_consume)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2022-02-19 00:39:14 -05:00
|
|
|
<style></style>
|