mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-20 02:37:26 -04:00
35 lines
610 B
Vue
35 lines
610 B
Vue
<template>
|
|
<a :disabled="disabled" @click="playPrevious">
|
|
<mdicon
|
|
class="icon"
|
|
name="skip-backward"
|
|
:title="$t('player.button.skip-backward')"
|
|
/>
|
|
</a>
|
|
</template>
|
|
|
|
<script>
|
|
import { useQueueStore } from '@/stores/queue'
|
|
import webapi from '@/webapi'
|
|
|
|
export default {
|
|
name: 'ControlPlayerPrevious',
|
|
setup() {
|
|
return { queueStore: useQueueStore() }
|
|
},
|
|
computed: {
|
|
disabled() {
|
|
return this.queueStore.count <= 0
|
|
}
|
|
},
|
|
methods: {
|
|
playPrevious() {
|
|
if (this.disabled) {
|
|
return
|
|
}
|
|
webapi.player_previous()
|
|
}
|
|
}
|
|
}
|
|
</script>
|