Merge pull request #1025 from BeatC/display-name-required-dialog-fixes

fix display name required dialog
This commit is contained in:
Дамян Минков 2016-10-18 14:36:03 -05:00 committed by GitHub
commit 27158752b0
4 changed files with 27 additions and 8 deletions

View File

@ -67,6 +67,10 @@
border: 1px solid $primaryButtonHoverBackground; border: 1px solid $primaryButtonHoverBackground;
background-color: $primaryButtonHoverBackground; background-color: $primaryButtonHoverBackground;
} }
&[disabled] {
color: $primaryButtonColor;
}
} }
&_close { &_close {

View File

@ -1,6 +1,14 @@
.input-control { .input-control {
padding: 16px 0; padding: 16px 0;
&:first-child {
padding-top: 0;
}
&:last-child {
padding-bottom: 0;
}
&__text { &__text {
margin: 8px 0; margin: 8px 0;
font-size: 1em font-size: 1em

View File

@ -262,7 +262,8 @@
"token": "token", "token": "token",
"tokenAuthFailedTitle": "Authentication problem", "tokenAuthFailedTitle": "Authentication problem",
"tokenAuthFailed": "Sorry, you're not allowed to join this call.", "tokenAuthFailed": "Sorry, you're not allowed to join this call.",
"displayNameRequired": "Please enter your display name", "displayNameRequired": "Display name is required",
"enterDisplayName": "Please enter your display name",
"extensionRequired": "Extension required:", "extensionRequired": "Extension required:",
"firefoxExtensionPrompt": "You need to install a Firefox extension in order to use screen sharing. Please try again after you <a href='__url__'>get it from here</a>!", "firefoxExtensionPrompt": "You need to install a Firefox extension in order to use screen sharing. Please try again after you <a href='__url__'>get it from here</a>!",
"rateExperience": "Please rate your meeting experience.", "rateExperience": "Please rate your meeting experience.",

View File

@ -74,21 +74,27 @@ JITSI_TRACK_ERROR_TO_MESSAGE_KEY_MAP.microphone[TrackErrors.NO_DATA_FROM_SOURCE]
* Prompt user for nickname. * Prompt user for nickname.
*/ */
function promptDisplayName() { function promptDisplayName() {
let nickRequiredMsg let labelKey = 'dialog.enterDisplayName';
= APP.translation.translateString("dialog.displayNameRequired"); let labelStr = APP.translation.translateString(labelKey);
let titleStr
= APP.translation.translateString('dialog.displayNameRequired');
let defaultNickMsg = APP.translation.translateString("defaultNickname"); let defaultNickMsg = APP.translation.translateString("defaultNickname");
let message = ` let message = (
<h2 data-i18n="dialog.displayNameRequired">${nickRequiredMsg}</h2> `<div class="input-control">
<input name="displayName" type="text" <label class="input-control__label">${labelStr}</label>
<input name="displayName" type="text"
data-i18n="[placeholder]defaultNickname" data-i18n="[placeholder]defaultNickname"
placeholder="${defaultNickMsg}" autofocus>`; class="input-control__input"
placeholder="${defaultNickMsg}" autofocus>
</div>`
);
// Don't use a translation string, because we're too early in the call and // Don't use a translation string, because we're too early in the call and
// the translation may not be initialised. // the translation may not be initialised.
let buttons = {Ok:true}; let buttons = {Ok:true};
let dialog = messageHandler.openDialog( let dialog = messageHandler.openDialog(
null, titleStr,
message, message,
true, true,
buttons, buttons,