From 7edf6b0ea2206f77b9c9d3a4e7cc816cecdc993a Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Sun, 30 Jul 2023 11:25:44 -0700 Subject: [PATCH] Add confirmation modal on unmute --- web/static/js/BareRTC.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/web/static/js/BareRTC.js b/web/static/js/BareRTC.js index 4854552..815d7b5 100644 --- a/web/static/js/BareRTC.js +++ b/web/static/js/BareRTC.js @@ -578,6 +578,17 @@ const app = Vue.createApp({ } this.muted[username] = true; } else { + if (!window.confirm( + `Do you want to remove your mute on ${username}? If you un-mute them, you `+ + `will be able to see their chat messages or DMs going forward, but most importantly, `+ + `they may be able to watch your webcam now if you are broadcasting!\n\n`+ + `Note: currently you can only re-mute them the next time you see one of their `+ + `chat messages, or you can only boot them off your cam after they have already `+ + `opened it. If you are concerned about this, click Cancel and do not remove `+ + `the mute on ${username}.` + )) { + return; + } delete this.muted[username]; }