mirror of
https://git.crystalyx.net/Xefir/repod.git
synced 2024-12-28 01:32:49 +01:00
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>
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<div class="extra">
|
<div class="extra">
|
||||||
<Minus class="pointer" :size="20" @click="changeRate(-.5)" />
|
<Minus class="pointer" :size="20" @click="changeRate(-.1)" />
|
||||||
<NcCounterBubble class="counter">
|
<NcCounterBubble class="counter">
|
||||||
x{{ player.rate }}
|
x{{ player.rate }}
|
||||||
</NcCounterBubble>
|
</NcCounterBubble>
|
||||||
<Plus class="pointer" :size="20" @click="changeRate(.5)" />
|
<Plus class="pointer" :size="20" @click="changeRate(.1)" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</NcAppNavigationItem>
|
</NcAppNavigationItem>
|
||||||
@ -92,9 +92,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
generateUrl,
|
generateUrl,
|
||||||
changeRate(diff) {
|
changeRate(diff) {
|
||||||
if (this.player.rate + diff > 0) {
|
const newRate = (this.player.rate + diff).toPrecision(2)
|
||||||
this.$store.dispatch('player/rate', this.player.rate + diff)
|
this.$store.dispatch('player/rate', newRate > 0 ? newRate : this.player.rate)
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async importOpml(event) {
|
async importOpml(event) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user