feat: change rate to .1 steps and fix floating (close #40)
This commit is contained in:
parent
9f9fdf4cf0
commit
ff23be4f91
@ -8,11 +8,11 @@
|
||||
</template>
|
||||
<template #extra>
|
||||
<div class="extra">
|
||||
<Minus class="pointer" :size="20" @click="changeRate(-.5)" />
|
||||
<Minus class="pointer" :size="20" @click="changeRate(-.1)" />
|
||||
<NcCounterBubble class="counter">
|
||||
x{{ player.rate }}
|
||||
</NcCounterBubble>
|
||||
<Plus class="pointer" :size="20" @click="changeRate(.5)" />
|
||||
<Plus class="pointer" :size="20" @click="changeRate(.1)" />
|
||||
</div>
|
||||
</template>
|
||||
</NcAppNavigationItem>
|
||||
@ -92,9 +92,8 @@ export default {
|
||||
methods: {
|
||||
generateUrl,
|
||||
changeRate(diff) {
|
||||
if (this.player.rate + diff > 0) {
|
||||
this.$store.dispatch('player/rate', this.player.rate + diff)
|
||||
}
|
||||
const newRate = (this.player.rate + diff).toPrecision(2)
|
||||
this.$store.dispatch('player/rate', newRate > 0 ? newRate : this.player.rate)
|
||||
},
|
||||
async importOpml(event) {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user