style: add icon to the playback speed setting
This commit is contained in:
parent
ce5408395d
commit
c101588eaf
@ -1,8 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<NcAppNavigationSettings>
|
<NcAppNavigationSettings>
|
||||||
<div class="setting">
|
<div class="setting">
|
||||||
<label id="">{{ t('repod', 'Playback speed') }}</label>
|
<label>
|
||||||
<div class="buttons">
|
<SpeedometerSlow v-if="player.rate < 1" />
|
||||||
|
<SpeedometerMedium v-if="player.rate === 1" />
|
||||||
|
<Speedometer v-if="player.rate > 1" />
|
||||||
|
{{ t('repod', 'Playback speed') }}
|
||||||
|
</label>
|
||||||
|
<div>
|
||||||
<Minus :size="20" @click="changeRate(-.5)" />
|
<Minus :size="20" @click="changeRate(-.5)" />
|
||||||
<NcCounterBubble>x{{ player.rate }}</NcCounterBubble>
|
<NcCounterBubble>x{{ player.rate }}</NcCounterBubble>
|
||||||
<Plus :size="20" @click="changeRate(.5)" />
|
<Plus :size="20" @click="changeRate(.5)" />
|
||||||
@ -15,6 +20,9 @@
|
|||||||
import { NcAppNavigationSettings, NcCounterBubble } from '@nextcloud/vue'
|
import { NcAppNavigationSettings, NcCounterBubble } from '@nextcloud/vue'
|
||||||
import Minus from 'vue-material-design-icons/Minus.vue'
|
import Minus from 'vue-material-design-icons/Minus.vue'
|
||||||
import Plus from 'vue-material-design-icons/Plus.vue'
|
import Plus from 'vue-material-design-icons/Plus.vue'
|
||||||
|
import Speedometer from 'vue-material-design-icons/Speedometer.vue'
|
||||||
|
import SpeedometerMedium from 'vue-material-design-icons/SpeedometerMedium.vue'
|
||||||
|
import SpeedometerSlow from 'vue-material-design-icons/SpeedometerSlow.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Settings',
|
name: 'Settings',
|
||||||
@ -23,6 +31,9 @@ export default {
|
|||||||
NcAppNavigationSettings,
|
NcAppNavigationSettings,
|
||||||
NcCounterBubble,
|
NcCounterBubble,
|
||||||
Plus,
|
Plus,
|
||||||
|
Speedometer,
|
||||||
|
SpeedometerMedium,
|
||||||
|
SpeedometerSlow,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
player() {
|
player() {
|
||||||
@ -31,20 +42,22 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeRate(diff) {
|
changeRate(diff) {
|
||||||
|
if (this.player.rate + diff > 0) {
|
||||||
this.$store.dispatch('player/rate', this.player.rate + diff)
|
this.$store.dispatch('player/rate', this.player.rate + diff)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.buttons {
|
|
||||||
display: flex;
|
|
||||||
gap: .5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.setting {
|
.setting {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.setting > label, .setting > div {
|
||||||
|
display: flex;
|
||||||
|
gap: .5rem;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user