Merge pull request #1100 from jitsi/close-page-update
Close page update
This commit is contained in:
commit
3ad1573130
1
404.html
1
404.html
|
@ -1,6 +1,7 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="css/all.css"/>
|
<link rel="stylesheet" href="css/all.css"/>
|
||||||
|
<!--#include virtual="title.html" -->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="error_page">
|
<div class="error_page">
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="css/all.css"/>
|
<link rel="stylesheet" href="css/all.css"/>
|
||||||
|
<!--#include virtual="title.html" -->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="redirectPageMessage">Sorry! You are not allowed to be here :(</div>
|
<div class="redirectPageMessage">Sorry! You are not allowed to be here :(</div>
|
||||||
|
|
27
close.html
27
close.html
|
@ -1,8 +1,31 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="css/all.css"/>
|
<link rel="stylesheet" href="css/all.css"/>
|
||||||
|
<!--#include virtual="title.html" -->
|
||||||
|
<script><!--#include virtual="/interface_config.js" --></script>
|
||||||
|
<script>function translateStr(id, msg) {
|
||||||
|
var div = document.getElementById(id);
|
||||||
|
div.innerHTML = msg;
|
||||||
|
}
|
||||||
|
function translate() {
|
||||||
|
translateStr('hintMessage',
|
||||||
|
'You can use video calls with '
|
||||||
|
+ interfaceConfig.APP_NAME +' for your business');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body onload="translate();">
|
||||||
<div class="redirectPageMessage">Thank you for your feedback!</div>
|
<div class="redirectPageMessage">
|
||||||
|
<div class="thanks-msg">
|
||||||
|
<p id="thanksMessage">Thank you for your feedback!</p>
|
||||||
|
</div>
|
||||||
|
<div class="hint-msg">
|
||||||
|
<p>
|
||||||
|
<span>Did you know?</span>
|
||||||
|
<span class="hint-msg__holder" id="hintMessage"></span>
|
||||||
|
</p>
|
||||||
|
<div class="happy-software"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -0,0 +1,33 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="css/all.css"/>
|
||||||
|
<!--#include virtual="title.html" -->
|
||||||
|
<script><!--#include virtual="/interface_config.js" --></script>
|
||||||
|
<script>function translateStr(id, msg) {
|
||||||
|
var div = document.getElementById(id);
|
||||||
|
div.innerHTML = msg;
|
||||||
|
}
|
||||||
|
function translate() {
|
||||||
|
translateStr('thanksMessage',
|
||||||
|
'Thank you for using ' + interfaceConfig.APP_NAME);
|
||||||
|
translateStr('hintMessage',
|
||||||
|
'You can use video calls with '
|
||||||
|
+ interfaceConfig.APP_NAME +' for your business');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body onload="translate();">
|
||||||
|
<div class="redirectPageMessage">
|
||||||
|
<div class="thanks-msg">
|
||||||
|
<p id="thanksMessage"></p>
|
||||||
|
</div>
|
||||||
|
<div class="hint-msg">
|
||||||
|
<p>
|
||||||
|
<span>Did you know?</span>
|
||||||
|
<span class="hint-msg__holder" id="hintMessage"></span>
|
||||||
|
</p>
|
||||||
|
<div class="happy-software"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -184,29 +184,34 @@ function muteLocalVideo (muted) {
|
||||||
* If requested show a thank you dialog before that.
|
* If requested show a thank you dialog before that.
|
||||||
* If we have a close page enabled, redirect to it without
|
* If we have a close page enabled, redirect to it without
|
||||||
* showing any other dialog.
|
* showing any other dialog.
|
||||||
* @param {boolean} showThankYou whether we should show a thank you dialog
|
*
|
||||||
|
* @param {object} options Feedback data
|
||||||
|
* @param {boolean} options.thankYouDialogVisible - whether we should
|
||||||
|
* show thank you dialog
|
||||||
|
* @param {boolean} options.feedbackSubmitted - whether feedback was submitted
|
||||||
*/
|
*/
|
||||||
function maybeRedirectToWelcomePage(showThankYou) {
|
function maybeRedirectToWelcomePage(options) {
|
||||||
|
|
||||||
// if close page is enabled redirect to it, without further action
|
// if close page is enabled redirect to it, without further action
|
||||||
if (config.enableClosePage) {
|
if (config.enableClosePage) {
|
||||||
window.location.pathname = "close.html";
|
if (options.feedbackSubmitted)
|
||||||
|
window.location.pathname = "close.html";
|
||||||
|
else
|
||||||
|
window.location.pathname = "close2.html";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showThankYou) {
|
// else: show thankYou dialog only if there is no feedback
|
||||||
|
if (options.thankYouDialogVisible)
|
||||||
APP.UI.messageHandler.openMessageDialog(
|
APP.UI.messageHandler.openMessageDialog(
|
||||||
null, "dialog.thankYou", {appName:interfaceConfig.APP_NAME});
|
null, "dialog.thankYou", {appName:interfaceConfig.APP_NAME});
|
||||||
}
|
|
||||||
|
|
||||||
if (!config.enableWelcomePage) {
|
// if Welcome page is enabled redirect to welcome page after 3 sec.
|
||||||
return;
|
if (config.enableWelcomePage) {
|
||||||
|
setTimeout(() => {
|
||||||
|
APP.settings.setWelcomePageEnabled(true);
|
||||||
|
window.location.pathname = "/";
|
||||||
|
}, 3000);
|
||||||
}
|
}
|
||||||
// redirect to welcome page
|
|
||||||
setTimeout(() => {
|
|
||||||
APP.settings.setWelcomePageEnabled(true);
|
|
||||||
window.location.pathname = "/";
|
|
||||||
}, 3000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -6,7 +6,36 @@ html, body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.redirectPageMessage {
|
.redirectPageMessage {
|
||||||
|
width: 30%;
|
||||||
|
margin: 20% auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 36px;
|
font-size: 24px;
|
||||||
margin-top: 20%;
|
|
||||||
|
.thanks-msg {
|
||||||
|
border-bottom: 1px solid $selectBg;
|
||||||
|
padding-left: 30px;
|
||||||
|
padding-right: 30px;
|
||||||
|
p {
|
||||||
|
margin: 30px auto;
|
||||||
|
font-size: 24px;
|
||||||
|
line-height: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.hint-msg{
|
||||||
|
p {
|
||||||
|
margin: 26px auto;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 18px;
|
||||||
|
.hint-msg__holder{
|
||||||
|
font-weight: 200;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.happy-software{
|
||||||
|
width: 120px;
|
||||||
|
height: 86px;
|
||||||
|
margin: 0 auto;
|
||||||
|
background: $happySoftwareBackground;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,6 +92,8 @@ $borderRadius: 4px;
|
||||||
$defaultWatermarkLink: '../images/watermark.png';
|
$defaultWatermarkLink: '../images/watermark.png';
|
||||||
$sidebarWidth: 200px;
|
$sidebarWidth: 200px;
|
||||||
|
|
||||||
|
$happySoftwareBackground: transparent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Z-indexes. TODO: Replace this by a function.
|
* Z-indexes. TODO: Replace this by a function.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1037,25 +1037,26 @@ UI.requestFeedbackOnHangup = function () {
|
||||||
if (Feedback.isVisible())
|
if (Feedback.isVisible())
|
||||||
return Promise.reject(UIErrors.FEEDBACK_REQUEST_IN_PROGRESS);
|
return Promise.reject(UIErrors.FEEDBACK_REQUEST_IN_PROGRESS);
|
||||||
// Feedback has been submitted already.
|
// Feedback has been submitted already.
|
||||||
else if (Feedback.isEnabled() && Feedback.isSubmitted())
|
else if (Feedback.isEnabled() && Feedback.isSubmitted()) {
|
||||||
return Promise.resolve(true);
|
return Promise.resolve({
|
||||||
|
thankYouDialogVisible : true,
|
||||||
|
feedbackSubmitted: true
|
||||||
|
});
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return new Promise(function (resolve) {
|
return new Promise(function (resolve) {
|
||||||
if (Feedback.isEnabled()) {
|
if (Feedback.isEnabled()) {
|
||||||
// If the user has already entered feedback, we'll show the
|
Feedback.openFeedbackWindow(
|
||||||
// window and immidiately start the conference dispose timeout.
|
(options) => {
|
||||||
if (Feedback.getFeedbackScore() > 0) {
|
options.thankYouDialogVisible = false;
|
||||||
Feedback.openFeedbackWindow();
|
resolve(options);
|
||||||
resolve(false);
|
});
|
||||||
|
|
||||||
} else { // Otherwise we'll wait for user's feedback.
|
|
||||||
Feedback.openFeedbackWindow(() => resolve(false));
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// If the feedback functionality isn't enabled we show a thank
|
// If the feedback functionality isn't enabled we show a thank
|
||||||
// you dialog. Signaling it (true), so the caller
|
// you dialog. Signaling it (true), so the caller
|
||||||
// of requestFeedback can act on it
|
// of requestFeedback can act on it
|
||||||
resolve(true);
|
resolve(
|
||||||
|
{thankYouDialogVisible : true, feedbackSubmitted: false});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -164,9 +164,7 @@ export default class Dialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
setFeedbackMessage() {
|
setFeedbackMessage() {
|
||||||
let message = $('#feedbackTextArea').val();
|
this.feedbackMessage = $('#feedbackTextArea').val();
|
||||||
|
|
||||||
this.feedbackMessage = message;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
show(cb) {
|
show(cb) {
|
||||||
|
@ -179,6 +177,8 @@ export default class Dialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
onHide() {
|
onHide() {
|
||||||
this.onCloseCallback(this.feedbackScore, this.feedbackMessage);
|
this.onCloseCallback({
|
||||||
|
feedbackSubmitted: this.submitted
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue