Bläddra i källkod

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

fix display name required dialog
master
Дамян Минков 8 år sedan
förälder
incheckning
27158752b0
4 ändrade filer med 27 tillägg och 8 borttagningar
  1. 4
    0
      css/buttons/_button-control.scss
  2. 8
    0
      css/input-control/_input-control.scss
  3. 2
    1
      lang/main.json
  4. 13
    7
      modules/UI/UI.js

+ 4
- 0
css/buttons/_button-control.scss Visa fil

67
             border: 1px solid $primaryButtonHoverBackground;
67
             border: 1px solid $primaryButtonHoverBackground;
68
             background-color: $primaryButtonHoverBackground;
68
             background-color: $primaryButtonHoverBackground;
69
         }
69
         }
70
+
71
+        &[disabled] {
72
+            color: $primaryButtonColor;
73
+        }
70
     }
74
     }
71
 
75
 
72
     &_close {
76
     &_close {

+ 8
- 0
css/input-control/_input-control.scss Visa fil

1
 .input-control {
1
 .input-control {
2
     padding: 16px 0;
2
     padding: 16px 0;
3
 
3
 
4
+    &:first-child {
5
+        padding-top: 0;
6
+    }
7
+
8
+    &:last-child {
9
+        padding-bottom: 0;
10
+    }
11
+
4
     &__text {
12
     &__text {
5
         margin: 8px 0;
13
         margin: 8px 0;
6
         font-size: 1em
14
         font-size: 1em

+ 2
- 1
lang/main.json Visa fil

262
         "token": "token",
262
         "token": "token",
263
         "tokenAuthFailedTitle": "Authentication problem",
263
         "tokenAuthFailedTitle": "Authentication problem",
264
         "tokenAuthFailed": "Sorry, you're not allowed to join this call.",
264
         "tokenAuthFailed": "Sorry, you're not allowed to join this call.",
265
-        "displayNameRequired": "Please enter your display name",
265
+        "displayNameRequired": "Display name is required",
266
+        "enterDisplayName": "Please enter your display name",
266
         "extensionRequired": "Extension required:",
267
         "extensionRequired": "Extension required:",
267
         "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>!",
268
         "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>!",
268
         "rateExperience": "Please rate your meeting experience.",
269
         "rateExperience": "Please rate your meeting experience.",

+ 13
- 7
modules/UI/UI.js Visa fil

74
  * Prompt user for nickname.
74
  * Prompt user for nickname.
75
  */
75
  */
76
 function promptDisplayName() {
76
 function promptDisplayName() {
77
-    let nickRequiredMsg
78
-        = APP.translation.translateString("dialog.displayNameRequired");
77
+    let labelKey = 'dialog.enterDisplayName';
78
+    let labelStr = APP.translation.translateString(labelKey);
79
+    let titleStr
80
+        = APP.translation.translateString('dialog.displayNameRequired');
79
     let defaultNickMsg = APP.translation.translateString("defaultNickname");
81
     let defaultNickMsg = APP.translation.translateString("defaultNickname");
80
-    let message = `
81
-        <h2 data-i18n="dialog.displayNameRequired">${nickRequiredMsg}</h2>
82
-        <input name="displayName" type="text"
82
+    let message = (
83
+        `<div class="input-control">
84
+            <label class="input-control__label">${labelStr}</label>
85
+            <input name="displayName" type="text"
83
                data-i18n="[placeholder]defaultNickname"
86
                data-i18n="[placeholder]defaultNickname"
84
-               placeholder="${defaultNickMsg}" autofocus>`;
87
+               class="input-control__input"
88
+               placeholder="${defaultNickMsg}" autofocus>
89
+         </div>`
90
+    );
85
 
91
 
86
     // Don't use a translation string, because we're too early in the call and
92
     // Don't use a translation string, because we're too early in the call and
87
     // the translation may not be initialised.
93
     // the translation may not be initialised.
88
     let buttons = {Ok:true};
94
     let buttons = {Ok:true};
89
 
95
 
90
     let dialog = messageHandler.openDialog(
96
     let dialog = messageHandler.openDialog(
91
-        null,
97
+        titleStr,
92
         message,
98
         message,
93
         true,
99
         true,
94
         buttons,
100
         buttons,

Laddar…
Avbryt
Spara