Quick mute all sounds checkbox
This commit is contained in:
parent
3404373a4b
commit
f65f653430
|
@ -133,6 +133,7 @@ const app = Vue.createApp({
|
||||||
exitMessages: false, // hide exit messages by default in public channels
|
exitMessages: false, // hide exit messages by default in public channels
|
||||||
watchNotif: true, // notify in chat about cameras being watched
|
watchNotif: true, // notify in chat about cameras being watched
|
||||||
closeDMs: false, // ignore unsolicited DMs
|
closeDMs: false, // ignore unsolicited DMs
|
||||||
|
muteSounds: false, // mute all sound effects
|
||||||
},
|
},
|
||||||
|
|
||||||
// My video feed.
|
// My video feed.
|
||||||
|
@ -396,6 +397,9 @@ const app = Vue.createApp({
|
||||||
"prefs.watchNotif": function() {
|
"prefs.watchNotif": function() {
|
||||||
localStorage.watchNotif = this.prefs.watchNotif;
|
localStorage.watchNotif = this.prefs.watchNotif;
|
||||||
},
|
},
|
||||||
|
"prefs.muteSounds": function() {
|
||||||
|
localStorage.muteSounds = this.prefs.muteSounds;
|
||||||
|
},
|
||||||
"prefs.closeDMs": function() {
|
"prefs.closeDMs": function() {
|
||||||
localStorage.closeDMs = this.prefs.closeDMs;
|
localStorage.closeDMs = this.prefs.closeDMs;
|
||||||
|
|
||||||
|
@ -603,6 +607,9 @@ const app = Vue.createApp({
|
||||||
if (localStorage.watchNotif != undefined) {
|
if (localStorage.watchNotif != undefined) {
|
||||||
this.prefs.watchNotif = localStorage.watchNotif === "true";
|
this.prefs.watchNotif = localStorage.watchNotif === "true";
|
||||||
}
|
}
|
||||||
|
if (localStorage.muteSounds != undefined) {
|
||||||
|
this.prefs.muteSounds = localStorage.muteSounds === "true";
|
||||||
|
}
|
||||||
if (localStorage.closeDMs != undefined) {
|
if (localStorage.closeDMs != undefined) {
|
||||||
this.prefs.closeDMs = localStorage.closeDMs === "true";
|
this.prefs.closeDMs = localStorage.closeDMs === "true";
|
||||||
}
|
}
|
||||||
|
@ -1281,7 +1288,7 @@ const app = Vue.createApp({
|
||||||
description: JSON.stringify(pc.localDescription),
|
description: JSON.stringify(pc.localDescription),
|
||||||
}));
|
}));
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
this.ChatClient(`Error sending WebRTC negotiation message (SDP): ${e}`);
|
console.error(`Error sending WebRTC negotiation message (SDP): ${e}`);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -2450,6 +2457,8 @@ const app = Vue.createApp({
|
||||||
},
|
},
|
||||||
|
|
||||||
playSound(event) {
|
playSound(event) {
|
||||||
|
// Muting all SFX?
|
||||||
|
if (this.prefs.muteSounds) return;
|
||||||
let filename = this.config.sounds.settings[event];
|
let filename = this.config.sounds.settings[event];
|
||||||
// Do we have an audio track?
|
// Do we have an audio track?
|
||||||
if (this.config.sounds.audioTracks[filename] != undefined) {
|
if (this.config.sounds.audioTracks[filename] != undefined) {
|
||||||
|
|
|
@ -184,6 +184,15 @@
|
||||||
<!-- Sound settings -->
|
<!-- Sound settings -->
|
||||||
<div v-else-if="settingsModal.tab==='sounds'">
|
<div v-else-if="settingsModal.tab==='sounds'">
|
||||||
|
|
||||||
|
<div class="mb-4">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox"
|
||||||
|
v-model="prefs.muteSounds"
|
||||||
|
:value="true">
|
||||||
|
Mute all sound effects
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="columns is-mobile">
|
<div class="columns is-mobile">
|
||||||
<div class="column is-2 pr-1">
|
<div class="column is-2 pr-1">
|
||||||
<label class="label is-size-7">DM chat</label>
|
<label class="label is-size-7">DM chat</label>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user