owntone-server/web-src/src/components/PlayerButtonConsume.vue

35 lines
557 B
Vue
Raw Normal View History

<template>
<a :class="{ 'is-warning': is_consume }" @click="toggle_consume_mode">
2022-05-20 07:44:22 -04:00
<mdicon class="icon" name="fire" :size="icon_size" />
</a>
</template>
<script>
import webapi from '@/webapi'
export default {
name: 'PlayerButtonConsume',
props: {
icon_size: {
type: Number,
default: 16
}
},
computed: {
is_consume() {
return this.$store.state.player.consume
}
},
methods: {
toggle_consume_mode: function () {
webapi.player_consume(!this.is_consume)
}
}
}
</script>
<style></style>