소스 검색

Re-designs invite dialog as share link.

master
yanas 9 년 전
부모
커밋
644faca306
6개의 변경된 파일9개의 추가작업 그리고 63개의 파일을 삭제
  1. 0
    9
      conference.js
  2. 1
    1
      lang/main.json
  3. 0
    44
      modules/UI/UI.js
  4. 7
    7
      modules/UI/toolbars/Toolbar.js
  5. 1
    1
      modules/UI/util/MessageHandler.js
  6. 0
    1
      service/UI/UIEvents.js

+ 0
- 9
conference.js 파일 보기

@@ -1329,15 +1329,6 @@ export default {
1329 1329
                 && APP.UI.notifyInitiallyMuted();
1330 1330
         });
1331 1331
 
1332
-        APP.UI.addListener(UIEvents.USER_INVITED, (roomUrl) => {
1333
-            APP.UI.inviteParticipants(
1334
-                roomUrl,
1335
-                APP.conference.roomName,
1336
-                roomLocker.password,
1337
-                APP.settings.getDisplayName()
1338
-            );
1339
-        });
1340
-
1341 1332
         room.on(
1342 1333
             ConferenceEvents.AVAILABLE_DEVICES_CHANGED, function (id, devices) {
1343 1334
                 APP.UI.updateDevicesAvailability(id, devices);

+ 1
- 1
lang/main.json 파일 보기

@@ -185,6 +185,7 @@
185 185
         "connectError": "Oops! Something went wrong and we couldn't connect to the conference.",
186 186
         "connectErrorWithMsg": "Oops! Something went wrong and we couldn't connect to the conference: __msg__",
187 187
         "connecting": "Connecting",
188
+        "copy": "Copy",
188 189
         "error": "Error",
189 190
         "detectext": "Error when trying to detect desktopsharing extension.",
190 191
         "failtoinstall": "Failed to install desktop sharing extension",
@@ -230,7 +231,6 @@
230 231
         "passwordCheck": "Are you sure you would like to remove your password?",
231 232
         "Remove": "Remove",
232 233
         "passwordMsg": "Set a password to lock your room",
233
-        "Invite": "Invite",
234 234
         "shareLink": "Copy and share this link",
235 235
         "settings1": "Configure your conference",
236 236
         "settings2": "Participants join muted",

+ 0
- 44
modules/UI/UI.js 파일 보기

@@ -1065,50 +1065,6 @@ UI.updateDTMFSupport = function (isDTMFSupported) {
1065 1065
     //Toolbar.showDialPadButton(dtmfSupport);
1066 1066
 };
1067 1067
 
1068
-/**
1069
- * Invite participants to conference.
1070
- * @param {string} roomUrl
1071
- * @param {string} conferenceName
1072
- * @param {string} key
1073
- * @param {string} nick
1074
- */
1075
-UI.inviteParticipants = function (roomUrl, conferenceName, key, nick) {
1076
-    let keyText = "";
1077
-    if (key) {
1078
-        keyText = APP.translation.translateString(
1079
-            "email.sharedKey", {sharedKey: key}
1080
-        );
1081
-    }
1082
-
1083
-    let and = APP.translation.translateString("email.and");
1084
-    let supportedBrowsers = `Chromium, Google Chrome, Firefox ${and} Opera`;
1085
-
1086
-    let subject = APP.translation.translateString(
1087
-        "email.subject", {appName:interfaceConfig.APP_NAME, conferenceName}
1088
-    );
1089
-
1090
-    let body = APP.translation.translateString(
1091
-        "email.body", {
1092
-            appName:interfaceConfig.APP_NAME,
1093
-            sharedKeyText: keyText,
1094
-            roomUrl,
1095
-            supportedBrowsers
1096
-        }
1097
-    );
1098
-
1099
-    body = body.replace(/\n/g, "%0D%0A");
1100
-
1101
-    if (nick) {
1102
-        body += "%0D%0A%0D%0A" + UIUtil.escapeHtml(nick);
1103
-    }
1104
-
1105
-    if (interfaceConfig.INVITATION_POWERED_BY) {
1106
-        body += "%0D%0A%0D%0A--%0D%0Apowered by jitsi.org";
1107
-    }
1108
-
1109
-    window.open(`mailto:?subject=${subject}&body=${body}`, '_blank');
1110
-};
1111
-
1112 1068
 /**
1113 1069
  * Show user feedback dialog if its required or just show "thank you" dialog.
1114 1070
  * @returns {Promise} when dialog is closed.

+ 7
- 7
modules/UI/toolbars/Toolbar.js 파일 보기

@@ -22,15 +22,14 @@ function openLinkDialog () {
22 22
 
23 23
     let title = APP.translation.generateTranslationHTML("dialog.shareLink");
24 24
     APP.UI.messageHandler.openTwoButtonDialog(
25
-        null, null, null,
26
-        '<h2>' + title + '</h2>'
27
-        + '<input id="inviteLinkRef" type="text" '
28
-        + inviteAttributes + ' onclick="this.select();" readonly>',
29
-        false, "dialog.Invite",
25
+        null, title, null,
26
+        '<input id="inviteLinkRef" type="text" '
27
+            + inviteAttributes + ' readonly/>',
28
+        false, "dialog.copy",
30 29
         function (e, v) {
31 30
             if (v && roomUrl) {
32 31
                 JitsiMeetJS.analytics.sendEvent('toolbar.invite.button');
33
-                emitter.emit(UIEvents.USER_INVITED, roomUrl);
32
+                document.execCommand('copy');
34 33
             }
35 34
             else {
36 35
                 JitsiMeetJS.analytics.sendEvent('toolbar.invite.cancel');
@@ -38,7 +37,8 @@ function openLinkDialog () {
38 37
         },
39 38
         function (event) {
40 39
             if (roomUrl) {
41
-                document.getElementById('inviteLinkRef').select();
40
+                $('#inviteLinkRef').focus();
41
+                $('#inviteLinkRef').select();
42 42
             } else {
43 43
                 if (event && event.target) {
44 44
                     $(event.target).find('button[value=true]')

+ 1
- 1
modules/UI/util/MessageHandler.js 파일 보기

@@ -108,7 +108,7 @@ var messageHandler = {
108 108
             persistent: false,
109 109
             buttons: buttons,
110 110
             defaultButton: defaultButton,
111
-            focus: focus,
111
+            focus: (focus && focus >= 0) ? focus : -1,
112 112
             loaded: loadedFunction,
113 113
             submit: function (e, v, m, f) {
114 114
                 twoButtonDialog = null;

+ 0
- 1
service/UI/UIEvents.js 파일 보기

@@ -29,7 +29,6 @@ export default {
29 29
      */
30 30
     UPDATE_SHARED_VIDEO: "UI.update_shared_video",
31 31
     ROOM_LOCK_CLICKED: "UI.room_lock_clicked",
32
-    USER_INVITED: "UI.user_invited",
33 32
     USER_KICKED: "UI.user_kicked",
34 33
     REMOTE_AUDIO_MUTED: "UI.remote_audio_muted",
35 34
     FULLSCREEN_TOGGLE: "UI.fullscreen_toggle",

Loading…
취소
저장