Merge pull request #1219 from jitsi/guest-hint

Adds an option for guest only hint
This commit is contained in:
hristoterezov 2016-12-30 11:41:23 -06:00 committed by GitHub
commit cd03b29ece
5 changed files with 24 additions and 6 deletions

View File

@ -3,6 +3,7 @@
<link rel="stylesheet" href="css/all.css"/> <link rel="stylesheet" href="css/all.css"/>
<!--#include virtual="title.html" --> <!--#include virtual="title.html" -->
<script><!--#include virtual="/interface_config.js" --></script> <script><!--#include virtual="/interface_config.js" --></script>
<script src="utils.js?v=1"></script>
<script src="close.js"></script> <script src="close.js"></script>
</head> </head>
<body> <body>
@ -12,7 +13,7 @@
</div> </div>
<div class="hint-msg"> <div class="hint-msg">
<p> <p>
<span>Did you know?</span> <span id="hintQuestion">Did you know?</span>
<span class="hint-msg__holder" id="hintMessage"></span> <span class="hint-msg__holder" id="hintMessage"></span>
</p> </p>
<div class="happy-software"></div> <div class="happy-software"></div>

View File

@ -1,4 +1,4 @@
/* global interfaceConfig */ /* global interfaceConfig, getConfigParamsFromUrl */
//list of tips //list of tips
var hints = [ var hints = [
"You can pin participants by clicking on their thumbnails.",// jshint ignore:line "You can pin participants by clicking on their thumbnails.",// jshint ignore:line
@ -32,7 +32,7 @@ function insertTextMsg(id, msg){
var el = document.getElementById(id); var el = document.getElementById(id);
if (el) if (el)
el.innerText = msg; el.innerHTML = msg;
} }
/** /**
@ -42,6 +42,18 @@ function onLoad() {
//Works only for close2.html because close.html doesn't have this element. //Works only for close2.html because close.html doesn't have this element.
insertTextMsg('thanksMessage', insertTextMsg('thanksMessage',
'Thank you for using ' + interfaceConfig.APP_NAME); 'Thank you for using ' + interfaceConfig.APP_NAME);
// If there is a setting show a special message only for the guests
if (interfaceConfig.CLOSE_PAGE_GUEST_HINT) {
let params = getConfigParamsFromUrl('search');
if ( params.guest ) {
var element = document.getElementById('hintQuestion');
element.classList.add('hide');
insertTextMsg('hintMessage', interfaceConfig.CLOSE_PAGE_GUEST_HINT);
return;
}
}
insertTextMsg('hintMessage', getHint()); insertTextMsg('hintMessage', getHint());
} }

View File

@ -3,6 +3,7 @@
<link rel="stylesheet" href="css/all.css"/> <link rel="stylesheet" href="css/all.css"/>
<!--#include virtual="title.html" --> <!--#include virtual="title.html" -->
<script><!--#include virtual="/interface_config.js" --></script> <script><!--#include virtual="/interface_config.js" --></script>
<script src="utils.js?v=1"></script>
<script src="close.js"></script> <script src="close.js"></script>
</head> </head>
<body> <body>
@ -12,7 +13,7 @@
</div> </div>
<div class="hint-msg"> <div class="hint-msg">
<p> <p>
<span>Did you know?</span> <span id="hintQuestion">Did you know?</span>
<span class="hint-msg__holder" id="hintMessage"></span> <span class="hint-msg__holder" id="hintMessage"></span>
</p> </p>
<div class="happy-software"></div> <div class="happy-software"></div>

View File

@ -196,9 +196,11 @@ 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) {
if (options.feedbackSubmitted) if (options.feedbackSubmitted)
window.location.pathname = "close.html"; window.location.pathname = "close.html?guest="
+ APP.tokenData.isGuest;
else else
window.location.pathname = "close2.html"; window.location.pathname = "close2.html?guest="
+ APP.tokenData.isGuest;
return; return;
} }

View File

@ -53,6 +53,8 @@ var interfaceConfig = { // eslint-disable-line no-unused-vars
* Whether to only show the filmstrip (and hide the toolbar). * Whether to only show the filmstrip (and hide the toolbar).
*/ */
filmStripOnly: false, filmStripOnly: false,
//A html text to be shown to guests on the close page, false disables it
CLOSE_PAGE_GUEST_HINT: false,
RANDOM_AVATAR_URL_PREFIX: false, RANDOM_AVATAR_URL_PREFIX: false,
RANDOM_AVATAR_URL_SUFFIX: false, RANDOM_AVATAR_URL_SUFFIX: false,
FILM_STRIP_MAX_HEIGHT: 120, FILM_STRIP_MAX_HEIGHT: 120,