mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 18:49:19 +02:00
added shortcuts for play, volume and restore
This commit is contained in:
parent
ee1449bdd0
commit
03f15ada4e
4 changed files with 25 additions and 3 deletions
|
@ -56,10 +56,20 @@
|
|||
<i title="Clear your queue" @click="queue.clean()" :class="['ui', 'trash', 'secondary', {'disabled': queue.tracks.length === 0}, 'icon']" :disabled="queue.tracks.length === 0"></i>
|
||||
</div>
|
||||
</div>
|
||||
<GlobalEvents
|
||||
@keydown.space.prevent="pauseOrPlay"
|
||||
@keydown.ctrl.left.prevent="queue.previous"
|
||||
@keydown.ctrl.right.prevent="queue.next"
|
||||
@keydown.ctrl.down.prevent="queue.incrementVolume(-0.1)"
|
||||
@keydown.ctrl.up.prevent="queue.incrementVolume(0.1)"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import GlobalEvents from 'vue-global-events'
|
||||
|
||||
import queue from '@/audio/queue'
|
||||
import Track from '@/audio/track'
|
||||
import TrackFavoriteIcon from '@/components/favorites/TrackFavoriteIcon'
|
||||
|
@ -68,7 +78,8 @@ import radios from '@/radios'
|
|||
export default {
|
||||
name: 'player',
|
||||
components: {
|
||||
TrackFavoriteIcon
|
||||
TrackFavoriteIcon,
|
||||
GlobalEvents
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue