4
0
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:
Buster "Silver Eagle" Neece 2021-12-27 14:01:18 -06:00
parent d4fe37f009
commit 7693215e48
No known key found for this signature in database
GPG Key ID: 9FC8B9E008872109
2 changed files with 17 additions and 3 deletions

View File

@ -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>

View File

@ -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>