Skip to content

Commit 9913d54

Browse files
authoredFeb 10, 2025
Ravem: Show correct name of connected VC (#193)
1 parent b05d1b8 commit 9913d54

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed
 

‎ravem/indico_ravem/client/index.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
// them and/or modify them under the terms of the MIT License; see
66
// the LICENSE file for more details.
77

8+
/* eslint-disable func-name-matching */
9+
/* eslint-disable import/unambiguous */
10+
811
(function() {
912
const $t = $T.domain('ravem');
1013
const ravemButton = (function makeRavemButton() {
1114
const states = {
1215
connected: {
1316
icon: 'x',
14-
tooltip: $t.gettext('Disconnect {0} from the videoconference room {1}'),
17+
tooltip: $t.gettext('Disconnect {0} from the videoconference room {3}'),
1518
action: 'disconnect',
1619
handler: function disconnectHandler(data, btn) {
1720
const name = btn.data('roomName');
@@ -192,7 +195,7 @@
192195
/**
193196
* Sets a new state for the button and update its icon, label and tool tip.
194197
*/
195-
function setButtonState(btn, newState, tooltipMessage) {
198+
function setButtonState(btn, newState, tooltipMessage = '', currentVCRoom = '') {
196199
btn.data('state', newState);
197200

198201
const name = btn.data('roomName');
@@ -203,7 +206,7 @@
203206

204207
tooltipMessage = tooltipMessage ? `${tooltipMessage}<br>` : '';
205208
const qtip = {
206-
content: states[newState].tooltip.format(name, vcRoomName, tooltipMessage),
209+
content: states[newState].tooltip.format(name, vcRoomName, tooltipMessage, currentVCRoom),
207210
position: {my: 'top center', at: 'bottom center'},
208211
show: 'mouseover',
209212
hide: {
@@ -316,7 +319,7 @@
316319
return;
317320
}
318321
const connected = data.connected;
319-
setButtonState(btn, connected ? 'connected' : 'disconnected');
322+
setButtonState(btn, connected ? 'connected' : 'disconnected', '', data.vc_room_id);
320323
});
321324
return btn;
322325
}

0 commit comments

Comments
 (0)