2018-08-11 01:47:10 -04:00
|
|
|
<template>
|
2023-06-04 12:25:47 -04:00
|
|
|
<a :class="{ 'is-info': is_consume }" @click="toggle_consume_mode">
|
2023-06-30 15:41:40 -04:00
|
|
|
<mdicon
|
|
|
|
class="icon"
|
|
|
|
name="fire"
|
|
|
|
:size="icon_size"
|
|
|
|
:title="$t('player.button.consume')"
|
|
|
|
/>
|
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: {
|
2022-04-16 04:14:03 -04:00
|
|
|
icon_size: {
|
|
|
|
type: Number,
|
|
|
|
default: 16
|
|
|
|
}
|
2020-04-18 00:57:55 -04:00
|
|
|
},
|
|
|
|
|
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: {
|
2023-06-07 15:25:54 -04:00
|
|
|
toggle_consume_mode() {
|
2018-08-11 01:47:10 -04:00
|
|
|
webapi.player_consume(!this.is_consume)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2022-02-19 00:39:14 -05:00
|
|
|
<style></style>
|