mirror of
https://github.com/AzuraCast/AzuraCast.git
synced 2024-06-23 09:27:06 +00:00
Make right-clicking WebDJ sliders reset them to defaults.
This commit is contained in:
parent
d4fe37f009
commit
7693215e48
|
@ -14,7 +14,8 @@
|
|||
</div>
|
||||
<div class="flex-fill px-2">
|
||||
<input type="range" min="0" max="1" step="0.01" class="custom-range slider"
|
||||
v-model="position" style="width: 200px; height: 10px;">
|
||||
v-model="position" @click.right.prevent="position = 0.5"
|
||||
style="width: 200px; height: 10px;">
|
||||
</div>
|
||||
<div class="flex-shrink-0">
|
||||
<translate key="lang_playlist_2">Playlist 2</translate>
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
<icon icon="volume_mute"></icon>
|
||||
</div>
|
||||
<div class="flex-fill px-2">
|
||||
<input type="range" min="0" max="150" value="100" class="custom-range slider"
|
||||
v-model.number="volume" style="height: 10px; width: 100px;">
|
||||
<input type="range" min="0" max="100" class="custom-range slider"
|
||||
v-model.number="volume" @click.right.prevent="reset" style="height: 10px; width: 100px;">
|
||||
</div>
|
||||
<div class="flex-shrink-0">
|
||||
<icon icon="volume_up"></icon>
|
||||
|
@ -21,6 +21,14 @@ export default {
|
|||
name: "VolumeSlider",
|
||||
emits: "input",
|
||||
props: ['value'],
|
||||
data() {
|
||||
return {
|
||||
initial: 75
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initial = this.value;
|
||||
},
|
||||
computed: {
|
||||
volume: {
|
||||
get() {
|
||||
|
@ -31,5 +39,10 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
this.volume = this.initial;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue
Block a user