From 98bf0d9e84b96d48fe3505eb1876e26973b1a111 Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Sun, 27 Oct 2024 12:29:01 -0700 Subject: [PATCH] Fix bug in mute user modal --- src/App.vue | 33 +++++---- web/templates/about.html | 152 +++++++++++++++++++++++++++++++++------ 2 files changed, 151 insertions(+), 34 deletions(-) diff --git a/src/App.vue b/src/App.vue index 4cc3fda..9c25b56 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1374,6 +1374,23 @@ export default { } } + // Common callback handler after the confirmation box. + const callback = () => { + // Hang up videos both ways. + this.closeVideo(username); + + this.sendMute(username, mute); + if (mute) { + this.ChatClient( + `You have muted ${username} and will no longer see their chat messages, ` + + `and they will not see whether your webcam is active. You may unmute them via the Who Is Online list.`); + } else { + this.ChatClient( + `You have unmuted ${username} and can see their chat messages from now on.`, + ); + } + }; + if (mute) { this.modalConfirm({ title: `Mute ${username}`, @@ -1383,6 +1400,7 @@ export default { `not be able to see whether your webcam is active until you unmute them.`, }).then(() => { this.muted[username] = true; + callback(); }); } else { this.modalConfirm({ @@ -1393,22 +1411,9 @@ export default { `they may be able to watch your webcam now if you are broadcasting!`, }).then(() => { delete this.muted[username]; + callback(); }); } - - // Hang up videos both ways. - this.closeVideo(username); - - this.sendMute(username, mute); - if (mute) { - this.ChatClient( - `You have muted ${username} and will no longer see their chat messages, ` + - `and they will not see whether your webcam is active. You may unmute them via the Who Is Online list.`); - } else { - this.ChatClient( - `You have unmuted ${username} and can see their chat messages from now on.`, - ); - } }, sendMute(username, mute) { this.client.send({ diff --git a/web/templates/about.html b/web/templates/about.html index a5b66c7..19fb8dc 100644 --- a/web/templates/about.html +++ b/web/templates/about.html @@ -43,7 +43,10 @@
-

Help & Support

+

+ Help & Support + +

-

Tour of the user interface

+

+ Tour of the user interface + +

Screenshot of the user interface on desktop @@ -200,9 +206,15 @@
-

Feature Highlights

+

+ Feature Highlights + +

-

Emoji Reactions

+

+ Emoji Reactions + +

You may add emoji reactions to chat messages by clicking on the @@ -218,7 +230,10 @@ reaction by clicking on it.

-

Muting spammy users

+

+ Muting spammy users + +

If somebody on chat is bothering you, you may mute their messages by clicking @@ -244,7 +259,10 @@ session (until you log off).

-

Styling Your Messages

+

+ Styling Your Messages + +

BareRTC supports Markdown syntax for your chat messages. You can make text bold @@ -264,9 +282,15 @@


-

Video Sharing How-To's

+

+ Video Sharing How-To's + +

-

About webcam sharing

+

+ About webcam sharing + +

The WebRTC technology used by this chat room allows for direct, peer to peer @@ -293,7 +317,10 @@ way so that they may be banned from the chat room.

-

How do I go on video?

+

+ How do I go on video? + +

To share your webcam, click on the green @@ -326,14 +353,20 @@ -

How do I stop my camera?

+

+ How do I stop my camera? + +

When you are broadcasting, the red " Stop" button at the top of the page will turn your camera off.

-

How do I mute my camera's microphone?

+

+ How do I mute my camera's microphone? + +

The button to Mute will be at the top of the page next to the @@ -341,7 +374,10 @@ your own webcam video preview to toggle the mute that way. Either button works!

-

How do I see who is watching me?

+

+ How do I see who is watching me? + +

You may click on the