mirror of https://github.com/vector-im/riot-web
Prompt to remove the jitsi widget when pressing the call button
If there's already one in the room. We threw up an error message anyway telling you there was already a jitsi widget, so just add a button to end the call.pull/21833/head
parent
a765db8977
commit
96080f2ccc
|
@ -69,6 +69,8 @@ import {WidgetType} from "./widgets/WidgetType";
|
|||
import {SettingLevel} from "./settings/SettingLevel";
|
||||
import {base32} from "rfc4648";
|
||||
|
||||
import QuestionDialog from "./components/views/dialogs/QuestionDialog";
|
||||
|
||||
global.mxCalls = {
|
||||
//room_id: MatrixCall
|
||||
};
|
||||
|
@ -202,7 +204,6 @@ function _setCallState(call, roomId, status) {
|
|||
|
||||
function _showICEFallbackPrompt() {
|
||||
const cli = MatrixClientPeg.get();
|
||||
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
|
||||
const code = sub => <code>{sub}</code>;
|
||||
Modal.createTrackedDialog('No TURN servers', '', QuestionDialog, {
|
||||
title: _t("Call failed due to misconfigured server"),
|
||||
|
@ -380,11 +381,17 @@ async function _startCallApp(roomId, type) {
|
|||
"Refusing to start conference call widget in " + roomId +
|
||||
" a conference call widget is already present",
|
||||
);
|
||||
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||
|
||||
Modal.createTrackedDialog('Already have Jitsi Widget', '', ErrorDialog, {
|
||||
title: _t('Call in Progress'),
|
||||
description: _t('A call is already in progress!'),
|
||||
Modal.createTrackedDialog('Already have Jitsi Widget', '', QuestionDialog, {
|
||||
title: _t('End Call'),
|
||||
description: _t('Remove the group call from the room?'),
|
||||
button: _t('End Call'),
|
||||
cancelButton: _t('Cancel'),
|
||||
onFinished: (endCall) => {
|
||||
if (endCall) {
|
||||
WidgetUtils.setRoomWidget(roomId, currentJitsiWidgets[0].getContent()['id']);
|
||||
}
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,9 @@
|
|||
"You cannot place a call with yourself.": "You cannot place a call with yourself.",
|
||||
"Call in Progress": "Call in Progress",
|
||||
"A call is currently being placed!": "A call is currently being placed!",
|
||||
"A call is already in progress!": "A call is already in progress!",
|
||||
"End Call": "End Call",
|
||||
"Remove the group call from the room?": "Remove the group call from the room?",
|
||||
"Cancel": "Cancel",
|
||||
"Permission Required": "Permission Required",
|
||||
"You do not have permission to start a conference call in this room": "You do not have permission to start a conference call in this room",
|
||||
"Replying With Files": "Replying With Files",
|
||||
|
@ -140,7 +142,6 @@
|
|||
"Cancel entering passphrase?": "Cancel entering passphrase?",
|
||||
"Are you sure you want to cancel entering passphrase?": "Are you sure you want to cancel entering passphrase?",
|
||||
"Go Back": "Go Back",
|
||||
"Cancel": "Cancel",
|
||||
"Setting up keys": "Setting up keys",
|
||||
"Messages": "Messages",
|
||||
"Actions": "Actions",
|
||||
|
|
Loading…
Reference in New Issue