|
|
@@ -6,7 +6,68 @@ import SideContainerToggler from "../side_pannels/SideContainerToggler";
|
|
6
|
6
|
let emitter = null;
|
|
7
|
7
|
let Toolbar;
|
|
8
|
8
|
|
|
|
9
|
+/**
|
|
|
10
|
+ * Opens the invite link dialog.
|
|
|
11
|
+ */
|
|
|
12
|
+function openLinkDialog () {
|
|
|
13
|
+ let inviteAttributes;
|
|
|
14
|
+
|
|
|
15
|
+ if (roomUrl === null) {
|
|
|
16
|
+ inviteAttributes = 'data-i18n="[value]roomUrlDefaultMsg" value="' +
|
|
|
17
|
+ APP.translation.translateString("roomUrlDefaultMsg") + '"';
|
|
|
18
|
+ } else {
|
|
|
19
|
+ inviteAttributes = "value=\"" + encodeURI(roomUrl) + "\"";
|
|
|
20
|
+ }
|
|
|
21
|
+
|
|
|
22
|
+ let inviteLinkId = "inviteLinkRef";
|
|
|
23
|
+ let focusInviteLink = function() {
|
|
|
24
|
+ $('#' + inviteLinkId)
|
|
|
25
|
+ .focus()
|
|
|
26
|
+ .select();
|
|
|
27
|
+ };
|
|
|
28
|
+
|
|
|
29
|
+ let title = APP.translation.generateTranslationHTML("dialog.shareLink");
|
|
|
30
|
+ APP.UI.messageHandler.openTwoButtonDialog(
|
|
|
31
|
+ null, title, null,
|
|
|
32
|
+ '<input id="' + inviteLinkId + '" type="text" '
|
|
|
33
|
+ + inviteAttributes + ' readonly/>',
|
|
|
34
|
+ false, "dialog.copy",
|
|
|
35
|
+ function (e, v) {
|
|
|
36
|
+ if (v && roomUrl) {
|
|
|
37
|
+ JitsiMeetJS.analytics.sendEvent('toolbar.invite.button');
|
|
|
38
|
+
|
|
|
39
|
+ focusInviteLink();
|
|
|
40
|
+
|
|
|
41
|
+ document.execCommand('copy');
|
|
|
42
|
+ }
|
|
|
43
|
+ else {
|
|
|
44
|
+ JitsiMeetJS.analytics.sendEvent('toolbar.invite.cancel');
|
|
|
45
|
+ }
|
|
|
46
|
+ },
|
|
|
47
|
+ function (event) {
|
|
|
48
|
+ if (!roomUrl) {
|
|
|
49
|
+ if (event && event.target) {
|
|
|
50
|
+ $(event.target).find('button[value=true]')
|
|
|
51
|
+ .prop('disabled', true);
|
|
|
52
|
+ }
|
|
|
53
|
+ }
|
|
|
54
|
+ else {
|
|
|
55
|
+ focusInviteLink();
|
|
|
56
|
+ }
|
|
|
57
|
+ },
|
|
|
58
|
+ function (e, v, m, f) {
|
|
|
59
|
+ if(!v && !m && !f)
|
|
|
60
|
+ JitsiMeetJS.analytics.sendEvent('toolbar.invite.close');
|
|
|
61
|
+ },
|
|
|
62
|
+ 'Copy' // Focus Copy button.
|
|
|
63
|
+ );
|
|
|
64
|
+}
|
|
|
65
|
+
|
|
9
|
66
|
const buttonHandlers = {
|
|
|
67
|
+ "toolbar_button_authentication": function() {
|
|
|
68
|
+ JitsiMeetJS.analytics.sendEvent('toolbar.authentication.toggled');
|
|
|
69
|
+ emitter.emit(UIEvents.TOGGLE_AUTHENTICATION);
|
|
|
70
|
+ },
|
|
10
|
71
|
"toolbar_button_profile": function () {
|
|
11
|
72
|
JitsiMeetJS.analytics.sendEvent('toolbar.profile.toggled');
|
|
12
|
73
|
emitter.emit(UIEvents.TOGGLE_PROFILE);
|
|
|
@@ -125,6 +186,11 @@ const buttonHandlers = {
|
|
125
|
186
|
};
|
|
126
|
187
|
|
|
127
|
188
|
const defaultToolbarButtons = {
|
|
|
189
|
+ 'authentication': {
|
|
|
190
|
+ id: 'toolbar_button_authentication',
|
|
|
191
|
+ tooltipKey: 'toolbar.authenticate',
|
|
|
192
|
+ sideContainerId: 'authentication_container'
|
|
|
193
|
+ },
|
|
128
|
194
|
'microphone': {
|
|
129
|
195
|
id: 'toolbar_button_mute',
|
|
130
|
196
|
tooltipKey: 'toolbar.mute',
|
|
|
@@ -392,9 +458,9 @@ Toolbar = {
|
|
392
|
458
|
*/
|
|
393
|
459
|
showAuthenticateButton (show) {
|
|
394
|
460
|
if (UIUtil.isButtonEnabled('authentication') && show) {
|
|
395
|
|
- $('#authentication').css({display: "inline"});
|
|
|
461
|
+ $('#toolbar_button_authentication').css({display: "inline"});
|
|
396
|
462
|
} else {
|
|
397
|
|
- $('#authentication').css({display: "none"});
|
|
|
463
|
+ $('#toolbar_button_authentication').css({display: "none"});
|
|
398
|
464
|
}
|
|
399
|
465
|
},
|
|
400
|
466
|
|