Re-designs invite dialog as share link.
This commit is contained in:
parent
88a45cf991
commit
644faca306
|
@ -1329,15 +1329,6 @@ export default {
|
||||||
&& APP.UI.notifyInitiallyMuted();
|
&& APP.UI.notifyInitiallyMuted();
|
||||||
});
|
});
|
||||||
|
|
||||||
APP.UI.addListener(UIEvents.USER_INVITED, (roomUrl) => {
|
|
||||||
APP.UI.inviteParticipants(
|
|
||||||
roomUrl,
|
|
||||||
APP.conference.roomName,
|
|
||||||
roomLocker.password,
|
|
||||||
APP.settings.getDisplayName()
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
room.on(
|
room.on(
|
||||||
ConferenceEvents.AVAILABLE_DEVICES_CHANGED, function (id, devices) {
|
ConferenceEvents.AVAILABLE_DEVICES_CHANGED, function (id, devices) {
|
||||||
APP.UI.updateDevicesAvailability(id, devices);
|
APP.UI.updateDevicesAvailability(id, devices);
|
||||||
|
|
|
@ -185,6 +185,7 @@
|
||||||
"connectError": "Oops! Something went wrong and we couldn't connect to the conference.",
|
"connectError": "Oops! Something went wrong and we couldn't connect to the conference.",
|
||||||
"connectErrorWithMsg": "Oops! Something went wrong and we couldn't connect to the conference: __msg__",
|
"connectErrorWithMsg": "Oops! Something went wrong and we couldn't connect to the conference: __msg__",
|
||||||
"connecting": "Connecting",
|
"connecting": "Connecting",
|
||||||
|
"copy": "Copy",
|
||||||
"error": "Error",
|
"error": "Error",
|
||||||
"detectext": "Error when trying to detect desktopsharing extension.",
|
"detectext": "Error when trying to detect desktopsharing extension.",
|
||||||
"failtoinstall": "Failed to install desktop sharing extension",
|
"failtoinstall": "Failed to install desktop sharing extension",
|
||||||
|
@ -230,7 +231,6 @@
|
||||||
"passwordCheck": "Are you sure you would like to remove your password?",
|
"passwordCheck": "Are you sure you would like to remove your password?",
|
||||||
"Remove": "Remove",
|
"Remove": "Remove",
|
||||||
"passwordMsg": "Set a password to lock your room",
|
"passwordMsg": "Set a password to lock your room",
|
||||||
"Invite": "Invite",
|
|
||||||
"shareLink": "Copy and share this link",
|
"shareLink": "Copy and share this link",
|
||||||
"settings1": "Configure your conference",
|
"settings1": "Configure your conference",
|
||||||
"settings2": "Participants join muted",
|
"settings2": "Participants join muted",
|
||||||
|
|
|
@ -1065,50 +1065,6 @@ UI.updateDTMFSupport = function (isDTMFSupported) {
|
||||||
//Toolbar.showDialPadButton(dtmfSupport);
|
//Toolbar.showDialPadButton(dtmfSupport);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* Invite participants to conference.
|
|
||||||
* @param {string} roomUrl
|
|
||||||
* @param {string} conferenceName
|
|
||||||
* @param {string} key
|
|
||||||
* @param {string} nick
|
|
||||||
*/
|
|
||||||
UI.inviteParticipants = function (roomUrl, conferenceName, key, nick) {
|
|
||||||
let keyText = "";
|
|
||||||
if (key) {
|
|
||||||
keyText = APP.translation.translateString(
|
|
||||||
"email.sharedKey", {sharedKey: key}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
let and = APP.translation.translateString("email.and");
|
|
||||||
let supportedBrowsers = `Chromium, Google Chrome, Firefox ${and} Opera`;
|
|
||||||
|
|
||||||
let subject = APP.translation.translateString(
|
|
||||||
"email.subject", {appName:interfaceConfig.APP_NAME, conferenceName}
|
|
||||||
);
|
|
||||||
|
|
||||||
let body = APP.translation.translateString(
|
|
||||||
"email.body", {
|
|
||||||
appName:interfaceConfig.APP_NAME,
|
|
||||||
sharedKeyText: keyText,
|
|
||||||
roomUrl,
|
|
||||||
supportedBrowsers
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
body = body.replace(/\n/g, "%0D%0A");
|
|
||||||
|
|
||||||
if (nick) {
|
|
||||||
body += "%0D%0A%0D%0A" + UIUtil.escapeHtml(nick);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (interfaceConfig.INVITATION_POWERED_BY) {
|
|
||||||
body += "%0D%0A%0D%0A--%0D%0Apowered by jitsi.org";
|
|
||||||
}
|
|
||||||
|
|
||||||
window.open(`mailto:?subject=${subject}&body=${body}`, '_blank');
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show user feedback dialog if its required or just show "thank you" dialog.
|
* Show user feedback dialog if its required or just show "thank you" dialog.
|
||||||
* @returns {Promise} when dialog is closed.
|
* @returns {Promise} when dialog is closed.
|
||||||
|
|
|
@ -22,15 +22,14 @@ function openLinkDialog () {
|
||||||
|
|
||||||
let title = APP.translation.generateTranslationHTML("dialog.shareLink");
|
let title = APP.translation.generateTranslationHTML("dialog.shareLink");
|
||||||
APP.UI.messageHandler.openTwoButtonDialog(
|
APP.UI.messageHandler.openTwoButtonDialog(
|
||||||
null, null, null,
|
null, title, null,
|
||||||
'<h2>' + title + '</h2>'
|
'<input id="inviteLinkRef" type="text" '
|
||||||
+ '<input id="inviteLinkRef" type="text" '
|
+ inviteAttributes + ' readonly/>',
|
||||||
+ inviteAttributes + ' onclick="this.select();" readonly>',
|
false, "dialog.copy",
|
||||||
false, "dialog.Invite",
|
|
||||||
function (e, v) {
|
function (e, v) {
|
||||||
if (v && roomUrl) {
|
if (v && roomUrl) {
|
||||||
JitsiMeetJS.analytics.sendEvent('toolbar.invite.button');
|
JitsiMeetJS.analytics.sendEvent('toolbar.invite.button');
|
||||||
emitter.emit(UIEvents.USER_INVITED, roomUrl);
|
document.execCommand('copy');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
JitsiMeetJS.analytics.sendEvent('toolbar.invite.cancel');
|
JitsiMeetJS.analytics.sendEvent('toolbar.invite.cancel');
|
||||||
|
@ -38,7 +37,8 @@ function openLinkDialog () {
|
||||||
},
|
},
|
||||||
function (event) {
|
function (event) {
|
||||||
if (roomUrl) {
|
if (roomUrl) {
|
||||||
document.getElementById('inviteLinkRef').select();
|
$('#inviteLinkRef').focus();
|
||||||
|
$('#inviteLinkRef').select();
|
||||||
} else {
|
} else {
|
||||||
if (event && event.target) {
|
if (event && event.target) {
|
||||||
$(event.target).find('button[value=true]')
|
$(event.target).find('button[value=true]')
|
||||||
|
|
|
@ -108,7 +108,7 @@ var messageHandler = {
|
||||||
persistent: false,
|
persistent: false,
|
||||||
buttons: buttons,
|
buttons: buttons,
|
||||||
defaultButton: defaultButton,
|
defaultButton: defaultButton,
|
||||||
focus: focus,
|
focus: (focus && focus >= 0) ? focus : -1,
|
||||||
loaded: loadedFunction,
|
loaded: loadedFunction,
|
||||||
submit: function (e, v, m, f) {
|
submit: function (e, v, m, f) {
|
||||||
twoButtonDialog = null;
|
twoButtonDialog = null;
|
||||||
|
|
|
@ -29,7 +29,6 @@ export default {
|
||||||
*/
|
*/
|
||||||
UPDATE_SHARED_VIDEO: "UI.update_shared_video",
|
UPDATE_SHARED_VIDEO: "UI.update_shared_video",
|
||||||
ROOM_LOCK_CLICKED: "UI.room_lock_clicked",
|
ROOM_LOCK_CLICKED: "UI.room_lock_clicked",
|
||||||
USER_INVITED: "UI.user_invited",
|
|
||||||
USER_KICKED: "UI.user_kicked",
|
USER_KICKED: "UI.user_kicked",
|
||||||
REMOTE_AUDIO_MUTED: "UI.remote_audio_muted",
|
REMOTE_AUDIO_MUTED: "UI.remote_audio_muted",
|
||||||
FULLSCREEN_TOGGLE: "UI.fullscreen_toggle",
|
FULLSCREEN_TOGGLE: "UI.fullscreen_toggle",
|
||||||
|
|
Loading…
Reference in New Issue