瀏覽代碼

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

fix display name required dialog
master
Дамян Минков 8 年之前
父節點
當前提交
27158752b0
共有 4 個檔案被更改,包括 27 行新增8 行删除
  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 查看文件

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

+ 8
- 0
css/input-control/_input-control.scss 查看文件

@@ -1,6 +1,14 @@
1 1
 .input-control {
2 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 12
     &__text {
5 13
         margin: 8px 0;
6 14
         font-size: 1em

+ 2
- 1
lang/main.json 查看文件

@@ -262,7 +262,8 @@
262 262
         "token": "token",
263 263
         "tokenAuthFailedTitle": "Authentication problem",
264 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 267
         "extensionRequired": "Extension required:",
267 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 269
         "rateExperience": "Please rate your meeting experience.",

+ 13
- 7
modules/UI/UI.js 查看文件

@@ -74,21 +74,27 @@ JITSI_TRACK_ERROR_TO_MESSAGE_KEY_MAP.microphone[TrackErrors.NO_DATA_FROM_SOURCE]
74 74
  * Prompt user for nickname.
75 75
  */
76 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 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 86
                data-i18n="[placeholder]defaultNickname"
84
-               placeholder="${defaultNickMsg}" autofocus>`;
87
+               class="input-control__input"
88
+               placeholder="${defaultNickMsg}" autofocus>
89
+         </div>`
90
+    );
85 91
 
86 92
     // Don't use a translation string, because we're too early in the call and
87 93
     // the translation may not be initialised.
88 94
     let buttons = {Ok:true};
89 95
 
90 96
     let dialog = messageHandler.openDialog(
91
-        null,
97
+        titleStr,
92 98
         message,
93 99
         true,
94 100
         buttons,

Loading…
取消
儲存