浏览代码

Merge branch 'master' into kkrisstoff-task/dropdown-aui-changes

master
Lyubomir Marinov 8 年前
父节点
当前提交
55b741d11b

+ 0
- 1
conference.js 查看文件

1086
             }
1086
             }
1087
         );
1087
         );
1088
 
1088
 
1089
-
1090
         room.on(ConferenceEvents.USER_JOINED, (id, user) => {
1089
         room.on(ConferenceEvents.USER_JOINED, (id, user) => {
1091
             if (user.isHidden())
1090
             if (user.isHidden())
1092
                 return;
1091
                 return;

+ 1
- 0
css/_base.scss 查看文件

186
 }
186
 }
187
 
187
 
188
 .link {
188
 .link {
189
+    cursor: pointer;
189
     color: $linkFontColor;
190
     color: $linkFontColor;
190
     @include transition(color .1s ease-out);
191
     @include transition(color .1s ease-out);
191
 
192
 

+ 67
- 78
css/_jitsi_popover.scss 查看文件

8
     min-width: 100px;
8
     min-width: 100px;
9
     padding: 1px;
9
     padding: 1px;
10
     text-align: left;
10
     text-align: left;
11
-    color: #333333;
12
-    background-color: #ffffff;
11
+    color: $popoverFontColor;
12
+    background-color: $popoverBg;
13
     background-clip: padding-box;
13
     background-clip: padding-box;
14
-    border: 1px solid #cccccc;
15
-    border: 1px solid rgba(0, 0, 0, 0.2);
16
-    border-radius: 6px;
14
+    border: 1px solid $popoverBg;
15
+    border-radius: 3px;
17
     /*-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);*/
16
     /*-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);*/
18
     /*box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);*/
17
     /*box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);*/
19
     white-space: normal;
18
     white-space: normal;
20
     margin-top: -10px;
19
     margin-top: -10px;
21
     margin-bottom: 35px;
20
     margin-bottom: 35px;
22
-}
23
 
21
 
24
-.jitsipopover.black
25
-{
26
-    background-color: rgba(0,0,0,0.8);
27
-    color: #ffffff;
28
-}
22
+    &__title {
23
+        text-align: left;
24
+        margin: 0;
25
+        padding: 0;
26
+    }
29
 
27
 
30
-.jitsipopover-content {
31
-    padding: 9px 14px;
32
-    font-size: 10pt;
33
-    white-space:pre-wrap;
34
-    text-align: center;
35
-}
28
+    &__content {
29
+        padding: em(5) em(10);
30
+        font-size: em(14);
31
+        white-space:pre-wrap;
32
+        text-align: center;
33
+    }
36
 
34
 
37
-.jitsipopover > .arrow,
38
-.jitsipopover > .arrow:after {
39
-    position: absolute;
40
-    display: block;
41
-    width: 0;
42
-    height: 0;
43
-    border-color: transparent;
44
-    border-style: solid;
45
-}
35
+    &__icon {
36
+        margin-right: 2px;
37
+    }
46
 
38
 
47
-.jitsipopover > .arrow {
48
-    border-width: 11px;
49
-    left: 50%;
50
-    margin-left: -11px;
51
-    border-bottom-width: 0;
52
-    border-top-color: #999999;
53
-    border-top-color: rgba(0, 0, 0, 0.25);
54
-    bottom: -11px;
55
-}
56
-.jitsipopover > .arrow:after {
57
-    border-width: 10px;
58
-    content: " ";
59
-    bottom: 1px;
60
-    margin-left: -10px;
61
-    border-bottom-width: 0;
62
-    border-top-color: #ffffff;
63
-}
39
+    &__green
40
+    {
41
+        @extend .jitsipopover__icon;
42
+        color: #4abd04;
43
+    }
64
 
44
 
65
-.jitsipopover.black > .arrow:after
66
-{
67
-    border-top-color: rgba(0, 0, 0, 0.8);
68
-}
45
+    &__orange
46
+    {
47
+        @extend .jitsipopover__icon;
48
+        color: #ffa800;
49
+    }
69
 
50
 
70
-.jitsiPopupmenuPadding {
71
-    height: 35px;
72
-    width: 100px;
73
-    position: absolute;
74
-    bottom: -35px;
75
-}
51
+    &__menu-padding {
52
+        height: 35px;
53
+        width: 100px;
54
+        position: absolute;
55
+        bottom: -35px;
56
+    }
76
 
57
 
77
-.jitsipopover_green
78
-{
79
-    color: #4abd04;
80
-}
58
+    &__showmore {
59
+        display: block;
60
+        text-align: center;
61
+        width: 90px;
62
+        margin: 10px auto;
63
+    }
81
 
64
 
82
-.jitsipopover_orange
83
-{
84
-    color: #ffa800;
85
-}
65
+    &__clear {
66
+        position: absolute;
67
+        display: block;
68
+        width: 0;
69
+        height: 0;
70
+        border-color: transparent;
71
+        border-style: solid;
72
+    }
86
 
73
 
87
-.jitsipopover_blue
88
-{
89
-    color: #21B9FC;
90
-}
74
+    > .arrow {
75
+        border-width: 5px 2.5px 0 2.5px;
76
+        left: 50%;
77
+        margin-left: -5px;
78
+        @extend .jitsipopover__clear;
79
+        border-bottom-width: 0;
80
+        border-top-color: $popoverBg;
81
+        bottom: -5px;
91
 
82
 
92
-.jitsipopover_showmore
93
-{
94
-    background-color: #21B9FC;
95
-    color: #ffffff;
96
-    cursor: pointer;
97
-    border-radius: 3px;
98
-    text-align: center;
99
-    width: 90px;
100
-    height: 16px;
101
-    padding-top: 4px;
102
-    padding-left: 10px;
103
-    padding-right: 10px;
104
-    margin: 15px auto 0px auto;
83
+
84
+        &:after {
85
+            border-width: 5px;
86
+            content: " ";
87
+            bottom: 1px;
88
+            margin-left: -5px;
89
+            @extend .jitsipopover__clear;
90
+            border-bottom-width: 0;
91
+            border-top-color: $popoverBg;
92
+        }
93
+    }
105
 }
94
 }

+ 1
- 19
css/_login_menu.scss 查看文件

31
     left: 18px;
31
     left: 18px;
32
 }
32
 }
33
 
33
 
34
-li a.authButton{
35
-    background-color: #06a5df;
36
-    padding-top: 3px;
37
-    padding-bottom: 3px;
38
-    padding-left: 29px;
39
-    padding-right: 29px;
40
-    border-radius: 4px;
41
-    cursor: pointer;
42
-}
43
-
44
-span.authentication:hover ul.loginmenu, ul.loginmenu:hover {
45
-    display:block !important;
46
-}
47
-
48
-span.authentication {
49
-    position: relative;
50
-}
51
-
52
 a.disabled {
34
 a.disabled {
53
     color: gray !important;
35
     color: gray !important;
54
     pointer-events: none;
36
     pointer-events: none;
73
     position: absolute;
55
     position: absolute;
74
     top: 18px;
56
     top: 18px;
75
     left: -7px;
57
     left: -7px;
76
-}
58
+}

+ 27
- 1
css/_side_toolbar_container.scss 查看文件

24
      */
24
      */
25
     input, select, a,
25
     input, select, a,
26
     .sideToolbarBlock, .input-control, .button-control {
26
     .sideToolbarBlock, .input-control, .button-control {
27
-        display: inline-block;
27
+        display: block;
28
         margin-top: 15px;
28
         margin-top: 15px;
29
         margin-left: 10%;
29
         margin-left: 10%;
30
         width: 80%;
30
         width: 80%;
118
     width : auto !important;
118
     width : auto !important;
119
     text-align: center;
119
     text-align: center;
120
 }
120
 }
121
+
122
+/**
123
+ * Profile
124
+ */
125
+.auth_container {
126
+    ul {
127
+        padding: 0;
128
+
129
+        li {
130
+            list-style-type: none;
131
+
132
+            a.authButton {
133
+                width: 160px;
134
+                margin: 10px 20px;
135
+                padding: 3px 29px;
136
+                box-sizing: border-box;
137
+                background-color: #06a5df;
138
+                border-radius: 4px;
139
+                cursor: pointer;
140
+                color: $defaultColor;
141
+                text-decoration: none;
142
+                text-align: center;
143
+            }
144
+        }
145
+    }
146
+}

+ 5
- 0
css/_variables.scss 查看文件

1
+/**
2
+* Theme
3
+*/
4
+@import 'themes/main';
5
+
1
 /**
6
 /**
2
  * Style variables
7
  * Style variables
3
  */
8
  */

+ 0
- 18
css/_videolayout_default.scss 查看文件

260
     height: 13px;
260
     height: 13px;
261
 }
261
 }
262
 
262
 
263
-.connection_info
264
-{
265
-    float: left;
266
-    padding-bottom: 5px;
267
-}
268
-
269
-.connection_info > table
270
-{
271
-    white-space: nowrap;
272
-}
273
-
274
-.connection_info, .connection_info > table
275
-{
276
-    text-align: left;
277
-    font-size: 11px;
278
-    color: #ffffff;
279
-}
280
-
281
 #localVideoContainer>span.status:hover,
263
 #localVideoContainer>span.status:hover,
282
 #localVideoContainer .displayname:hover {
264
 #localVideoContainer .displayname:hover {
283
     cursor: text;
265
     cursor: text;

+ 26
- 0
css/connection-info.scss 查看文件

1
+%connection-info {
2
+    text-align: left;
3
+    font-size: 12px;
4
+    font-weight: 400;
5
+    color: $popoverFontColor;
6
+
7
+    td {
8
+        padding: 2px 0;
9
+    }
10
+}
11
+
12
+.connection-info
13
+{
14
+    float: left;
15
+    padding-bottom: 5px;
16
+    @extend %connection-info;
17
+
18
+    > table {
19
+        white-space: nowrap;
20
+        @extend %connection-info;
21
+    }
22
+
23
+    td:nth-child(n-1) {
24
+        padding-left: 5px;
25
+    }
26
+}

+ 5
- 1
css/input-control/_input-control.scss 查看文件

20
     }
20
     }
21
 
21
 
22
     &__input {
22
     &__input {
23
-        margin: 8px 0;
23
+        margin-bottom: 8px;
24
+
25
+        &:last-child {
26
+            margin-bottom: inherit;
27
+        }
24
 
28
 
25
         &::selection {
29
         &::selection {
26
             background-color: $defaultDarkSelectionColor;
30
             background-color: $defaultDarkSelectionColor;

+ 2
- 1
css/main.scss 查看文件

61
 @import 'shortcuts/main';
61
 @import 'shortcuts/main';
62
 @import 'buttons/button-control';
62
 @import 'buttons/button-control';
63
 @import "modals/invite/invite";
63
 @import "modals/invite/invite";
64
+@import "connection-info";
64
 @import 'aui-components/dropdown';
65
 @import 'aui-components/dropdown';
65
 
66
 
66
-/* Modules END */
67
+/* Modules END */

+ 5
- 1
css/themes/_light.scss 查看文件

43
 $hintFontSize: em(13, 14);
43
 $hintFontSize: em(13, 14);
44
 $linkFontColor: #3572b0;
44
 $linkFontColor: #3572b0;
45
 $linkHoverFontColor: darken(#3572b0, 10%);
45
 $linkHoverFontColor: darken(#3572b0, 10%);
46
-$dropdownColor: #333;
46
+$dropdownColor: #333;
47
+
48
+// Popover colors
49
+$popoverBg: #000;
50
+$popoverFontColor: #ffffff;

+ 14
- 13
index.html 查看文件

103
                 <span id="mainToolbar" class="toolbar"></span>
103
                 <span id="mainToolbar" class="toolbar"></span>
104
         </div>
104
         </div>
105
         <div id="subject" class="hide"></div>
105
         <div id="subject" class="hide"></div>
106
+
106
         <div id="extendedToolbar" class="toolbar">
107
         <div id="extendedToolbar" class="toolbar">
107
             <a class="button" id="toolbar_button_profile" data-container="body" data-placement="right" data-i18n="[content]toolbar.profile" content="Edit your profile">
108
             <a class="button" id="toolbar_button_profile" data-container="body" data-placement="right" data-i18n="[content]toolbar.profile" content="Edit your profile">
108
                 <img id="avatar" src="images/avatar2.png"/>
109
                 <img id="avatar" src="images/avatar2.png"/>
109
             </a>
110
             </a>
110
-            <span id="authentication" class="authentication" style="display: none">
111
-                <a class="button icon-avatar" id="toolbar_button_authentication" data-i18n="[content]toolbar.authenticate"></a>
112
-                <ul class="loginmenu extendedToolbarPopup">
113
-                    <span class="loginmenuPadding"></span>
114
-                    <li id="toolbar_auth_identity"></li>
115
-                    <li id="toolbar_button_login">
116
-                        <a class="authButton" data-i18n="toolbar.login"></a>
117
-                    </li>
118
-                    <li id="toolbar_button_logout">
119
-                        <a class="authButton" data-i18n="toolbar.logout"></a>
120
-                    </li>
121
-                </ul>
122
-            </span>
123
             <a class="button icon-contactList" id="toolbar_contact_list" shortcut="contactlistpopover">
111
             <a class="button icon-contactList" id="toolbar_contact_list" shortcut="contactlistpopover">
124
                 <span class="badge-round">
112
                 <span class="badge-round">
125
                     <span id="numberOfParticipants"></span>
113
                     <span id="numberOfParticipants"></span>
144
             <a class="button icon-raised-hand" id="toolbar_button_raisehand" shortcut="raiseHandPopover"></a>
132
             <a class="button icon-raised-hand" id="toolbar_button_raisehand" shortcut="raiseHandPopover"></a>
145
             <a class="button icon-toggle-filmstrip" id="toolbar_film_strip" data-container="body" shortcut="filmstripPopover"></a>
133
             <a class="button icon-toggle-filmstrip" id="toolbar_film_strip" data-container="body" shortcut="filmstripPopover"></a>
146
             <a class="button icon-feedback" id="feedbackButton"></a>
134
             <a class="button icon-feedback" id="feedbackButton"></a>
135
+
147
             <div id="sideToolbarContainer">
136
             <div id="sideToolbarContainer">
148
                 <div id="profile_container" class="sideToolbarContainer__inner">
137
                 <div id="profile_container" class="sideToolbarContainer__inner">
149
                     <div class="title" data-i18n="profile.title"></div>
138
                     <div class="title" data-i18n="profile.title"></div>
155
                         <label data-i18n="profile.setEmailLabel"></label>
144
                         <label data-i18n="profile.setEmailLabel"></label>
156
                         <input type="text" id="setEmail" placeholder="Enter e-mail">
145
                         <input type="text" id="setEmail" placeholder="Enter e-mail">
157
                     </div>
146
                     </div>
147
+                    <div class="sideToolbarBlock auth_container" id="authenticationContainer">
148
+                        <p data-i18n="toolbar.authenticate"></p>
149
+                        <ul>
150
+                            <li id="toolbar_auth_identity"></li>
151
+                            <li id="toolbar_button_login">
152
+                                <a class="authButton" data-i18n="toolbar.login"></a>
153
+                            </li>
154
+                            <li id="toolbar_button_logout">
155
+                                <a class="authButton" data-i18n="toolbar.logout"></a>
156
+                            </li>
157
+                        </ul>
158
+                    </div>
158
                 </div>
159
                 </div>
159
                 <div id="chat_container" class="sideToolbarContainer__inner">
160
                 <div id="chat_container" class="sideToolbarContainer__inner">
160
                     <div id="nickname">
161
                     <div id="nickname">

+ 4
- 0
interface_config.js 查看文件

17
     GENERATE_ROOMNAMES_ON_WELCOME_PAGE: true,
17
     GENERATE_ROOMNAMES_ON_WELCOME_PAGE: true,
18
     APP_NAME: "Jitsi Meet",
18
     APP_NAME: "Jitsi Meet",
19
     INVITATION_POWERED_BY: true,
19
     INVITATION_POWERED_BY: true,
20
+    /**
21
+     * If we should show authentication block in profile
22
+     */
23
+    AUTHENTICATION_ENABLE: true,
20
     // the toolbar buttons line is intentionally left in one line, to be able
24
     // the toolbar buttons line is intentionally left in one line, to be able
21
     // to easily override values or remove them using regex
25
     // to easily override values or remove them using regex
22
     MAIN_TOOLBAR_BUTTONS: ['microphone', 'camera', 'desktop', 'invite', 'fullscreen', 'hangup'], // jshint ignore:line
26
     MAIN_TOOLBAR_BUTTONS: ['microphone', 'camera', 'desktop', 'invite', 'fullscreen', 'hangup'], // jshint ignore:line

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

151
     },
151
     },
152
     "connectionindicator":
152
     "connectionindicator":
153
     {
153
     {
154
+        "header": "Connection data",
154
         "bitrate": "Bitrate:",
155
         "bitrate": "Bitrate:",
155
         "packetloss": "Packet loss:",
156
         "packetloss": "Packet loss:",
156
         "resolution": "Resolution:",
157
         "resolution": "Resolution:",

+ 4
- 2
modules/UI/UI.js 查看文件

764
 
764
 
765
 UI.connectionIndicatorShowMore = function(id) {
765
 UI.connectionIndicatorShowMore = function(id) {
766
     VideoLayout.showMore(id);
766
     VideoLayout.showMore(id);
767
+    return false;
767
 };
768
 };
768
 
769
 
769
 // FIXME check if someone user this
770
 // FIXME check if someone user this
1140
  * @param {string} [login] current login
1141
  * @param {string} [login] current login
1141
  */
1142
  */
1142
 UI.updateAuthInfo = function (isAuthEnabled, login) {
1143
 UI.updateAuthInfo = function (isAuthEnabled, login) {
1144
+    let showAuth = isAuthEnabled && UIUtil.isAuthenticationEnabled();
1143
     let loggedIn = !!login;
1145
     let loggedIn = !!login;
1144
 
1146
 
1145
-    Toolbar.showAuthenticateButton(isAuthEnabled);
1147
+    Toolbar.showAuthenticateButton(showAuth);
1146
 
1148
 
1147
-    if (isAuthEnabled) {
1149
+    if (showAuth) {
1148
         Toolbar.setAuthenticatedIdentity(login);
1150
         Toolbar.setAuthenticatedIdentity(login);
1149
 
1151
 
1150
         Toolbar.showLoginButton(!loggedIn);
1152
         Toolbar.showLoginButton(!loggedIn);

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

8
     let placeholder = config.hosts.authdomain
8
     let placeholder = config.hosts.authdomain
9
         ? "user identity"
9
         ? "user identity"
10
         : "user@domain.net";
10
         : "user@domain.net";
11
-    let passRequiredMsg = APP.translation.translateString(
12
-        "dialog.passwordRequired"
13
-    );
11
+
14
     return `
12
     return `
15
-        <h2 data-i18n="dialog.passwordRequired">${passRequiredMsg}</h2>
16
-        <input name="username" type="text" placeholder=${placeholder} autofocus>
13
+        <input name="username" type="text" 
14
+               class="input-control__input"
15
+               placeholder=${placeholder} autofocus>
17
         <input name="password" type="password"
16
         <input name="password" type="password"
17
+               class="input-control__input"
18
                data-i18n="[placeholder]dialog.userPassword"
18
                data-i18n="[placeholder]dialog.userPassword"
19
-               placeholder="user password">
20
-        `;
19
+               placeholder="user password">`;
21
 }
20
 }
22
 
21
 
23
 /**
22
 /**
80
 
79
 
81
     const states = {
80
     const states = {
82
         login: {
81
         login: {
82
+            title: APP.translation.translateString('dialog.passwordRequired'),
83
             html: getPasswordInputHtml(),
83
             html: getPasswordInputHtml(),
84
             buttons: loginButtons,
84
             buttons: loginButtons,
85
             focus: ':input:first',
85
             focus: ':input:first',

+ 9
- 9
modules/UI/toolbars/Toolbar.js 查看文件

391
      * @param show <tt>true</tt> to show or <tt>false</tt> to hide
391
      * @param show <tt>true</tt> to show or <tt>false</tt> to hide
392
      */
392
      */
393
     showAuthenticateButton (show) {
393
     showAuthenticateButton (show) {
394
-        if (UIUtil.isButtonEnabled('authentication') && show) {
395
-            $('#authentication').css({display: "inline"});
396
-        } else {
397
-            $('#authentication').css({display: "none"});
398
-        }
394
+        let display = show ? 'block' : 'none';
395
+
396
+        $('#authenticationContainer').css({display});
399
     },
397
     },
400
 
398
 
401
     showEtherpadButton () {
399
     showEtherpadButton () {
449
      * @param authIdentity identity name to be displayed.
447
      * @param authIdentity identity name to be displayed.
450
      */
448
      */
451
     setAuthenticatedIdentity (authIdentity) {
449
     setAuthenticatedIdentity (authIdentity) {
450
+        let selector = $('#toolbar_auth_identity');
451
+
452
         if (authIdentity) {
452
         if (authIdentity) {
453
-            let selector = $('#toolbar_auth_identity');
454
             selector.css({display: "list-item"});
453
             selector.css({display: "list-item"});
455
             selector.text(authIdentity);
454
             selector.text(authIdentity);
456
         } else {
455
         } else {
457
-            $('#toolbar_auth_identity').css({display: "none"});
456
+            selector.css({display: "none"});
457
+            selector.text('');
458
         }
458
         }
459
     },
459
     },
460
 
460
 
463
      * @param show <tt>true</tt> to show
463
      * @param show <tt>true</tt> to show
464
      */
464
      */
465
     showLoginButton (show) {
465
     showLoginButton (show) {
466
-        if (UIUtil.isButtonEnabled('authentication') && show) {
466
+        if (show) {
467
             $('#toolbar_button_login').css({display: "list-item"});
467
             $('#toolbar_button_login').css({display: "list-item"});
468
         } else {
468
         } else {
469
             $('#toolbar_button_login').css({display: "none"});
469
             $('#toolbar_button_login').css({display: "none"});
475
      * @param show <tt>true</tt> to show
475
      * @param show <tt>true</tt> to show
476
      */
476
      */
477
     showLogoutButton (show) {
477
     showLogoutButton (show) {
478
-        if (UIUtil.isButtonEnabled('authentication') && show) {
478
+        if (show) {
479
             $('#toolbar_button_logout').css({display: "list-item"});
479
             $('#toolbar_button_logout').css({display: "list-item"});
480
         } else {
480
         } else {
481
             $('#toolbar_button_logout').css({display: "none"});
481
             $('#toolbar_button_logout').css({display: "none"});

+ 4
- 4
modules/UI/util/JitsiPopover.js 查看文件

29
         this.element = element;
29
         this.element = element;
30
         this.template = ' <div class="jitsipopover ' + this.options.skin +
30
         this.template = ' <div class="jitsipopover ' + this.options.skin +
31
             '"><div class="arrow"></div>' +
31
             '"><div class="arrow"></div>' +
32
-            '<div class="jitsipopover-content"></div>' +
33
-            '<div class="jitsiPopupmenuPadding"></div></div>';
32
+            '<div class="jitsipopover__content"></div>' +
33
+            '<div class="jitsipopover__menu-padding"></div></div>';
34
         var self = this;
34
         var self = this;
35
         this.element.on("mouseenter", function () {
35
         this.element.on("mouseenter", function () {
36
             self.elementIsHovered = true;
36
             self.elementIsHovered = true;
76
      */
76
      */
77
     JitsiPopover.prototype.createPopover = function () {
77
     JitsiPopover.prototype.createPopover = function () {
78
         $("body").append(this.template);
78
         $("body").append(this.template);
79
-        $(".jitsipopover > .jitsipopover-content").html(this.options.content);
79
+        $(".jitsipopover > .jitsipopover__content").html(this.options.content);
80
         var self = this;
80
         var self = this;
81
         $(".jitsipopover").on("mouseenter", function () {
81
         $(".jitsipopover").on("mouseenter", function () {
82
             self.popoverIsHovered = true;
82
             self.popoverIsHovered = true;
103
                 $(".jitsipopover").css(
103
                 $(".jitsipopover").css(
104
                     {top: position.top, left: position.left, display: "table"});
104
                     {top: position.top, left: position.left, display: "table"});
105
                 $(".jitsipopover > .arrow").css({left: calcLeft});
105
                 $(".jitsipopover > .arrow").css({left: calcLeft});
106
-                $(".jitsipopover > .jitsiPopupmenuPadding").css(
106
+                $(".jitsipopover > .jitsipopover__menu-padding").css(
107
                     {left: calcLeft - 50});
107
                     {left: calcLeft - 50});
108
             }
108
             }
109
         });
109
         });

+ 9
- 0
modules/UI/util/UIUtil.js 查看文件

204
         return interfaceConfig.SETTINGS_SECTIONS.indexOf(name) !== -1;
204
         return interfaceConfig.SETTINGS_SECTIONS.indexOf(name) !== -1;
205
     },
205
     },
206
 
206
 
207
+    /**
208
+     * Indicates if Authentication Section should be shown
209
+     *
210
+     * @returns {boolean}
211
+     */
212
+    isAuthenticationEnabled: function() {
213
+        return interfaceConfig.AUTHENTICATION_ENABLE;
214
+    },
215
+
207
     /**
216
     /**
208
      * Shows the element given by id.
217
      * Shows the element given by id.
209
      *
218
      *

+ 49
- 32
modules/UI/videolayout/ConnectionIndicator.js 查看文件

80
         packetLoss = "N/A";
80
         packetLoss = "N/A";
81
     } else {
81
     } else {
82
 
82
 
83
-        packetLoss = "<span class='jitsipopover_green'>&darr;</span>" +
83
+        packetLoss = "<span class='jitsipopover__green'>&darr;</span>" +
84
             (this.packetLoss.download !== null ?
84
             (this.packetLoss.download !== null ?
85
                 this.packetLoss.download : "N/A") +
85
                 this.packetLoss.download : "N/A") +
86
-            "% <span class='jitsipopover_orange'>&uarr;</span>" +
86
+            "% <span class='jitsipopover__orange'>&uarr;</span>" +
87
             (this.packetLoss.upload !== null? this.packetLoss.upload : "N/A") +
87
             (this.packetLoss.upload !== null? this.packetLoss.upload : "N/A") +
88
             "%";
88
             "%";
89
     }
89
     }
95
         return `${width}x${height}`;
95
         return `${width}x${height}`;
96
     }).join(', ') || 'N/A';
96
     }).join(', ') || 'N/A';
97
 
97
 
98
-    var result = "<table style='width:100%'>" +
99
-        "<tr>" +
100
-        "<td><span class='jitsipopover_blue' data-i18n='connectionindicator.bitrate'>" +
101
-        translate("connectionindicator.bitrate") + "</span></td>" +
102
-        "<td><span class='jitsipopover_green'>&darr;</span>" +
103
-        downloadBitrate + " <span class='jitsipopover_orange'>&uarr;</span>" +
104
-        uploadBitrate + "</td>" +
105
-        "</tr><tr>" +
106
-        "<td><span class='jitsipopover_blue' data-i18n='connectionindicator.packetloss'>" +
107
-        translate("connectionindicator.packetloss") + "</span></td>" +
108
-        "<td>" + packetLoss  + "</td>" +
109
-        "</tr><tr>" +
110
-        "<td><span class='jitsipopover_blue' data-i18n='connectionindicator.resolution'>" +
111
-        translate("connectionindicator.resolution") + "</span></td>" +
112
-        "<td>" + resolutionStr + "</td></tr></table>";
98
+    let result = (
99
+        `<table class="connection-info__container" style='width:100%'>
100
+            <tr>
101
+                <td>
102
+                    <span data-i18n='connectionindicator.bitrate'>
103
+                        ${translate("connectionindicator.bitrate")}
104
+                    </span>
105
+                </td>
106
+                <td>
107
+                    <span class='jitsipopover__green'>&darr;</span>${downloadBitrate}
108
+                    <span class='jitsipopover__orange'>&uarr;</span>${uploadBitrate}
109
+                </td>
110
+            </tr>
111
+            <tr>
112
+                <td>
113
+                    <span data-i18n='connectionindicator.packetloss'>
114
+                        ${translate("connectionindicator.packetloss")}
115
+                    </span>
116
+                </td>
117
+                <td>${packetLoss}</td>
118
+            </tr>
119
+            <tr>
120
+                <td>
121
+                    <span data-i18n='connectionindicator.resolution'>
122
+                        ${translate("connectionindicator.resolution")}
123
+                    </span>
124
+                </td>
125
+                <td>
126
+                    ${resolutionStr}
127
+                </td>
128
+            </tr>
129
+        </table>`);
113
 
130
 
114
     if(this.videoContainer.videoSpanId == "localVideoContainer") {
131
     if(this.videoContainer.videoSpanId == "localVideoContainer") {
115
-        result += "<div class=\"jitsipopover_showmore\" " +
132
+        result += "<a class=\"jitsipopover__showmore link\" " +
116
             "onclick = \"APP.UI.connectionIndicatorShowMore('" +
133
             "onclick = \"APP.UI.connectionIndicatorShowMore('" +
117
             // FIXME: we do not know local id when this text is generated
134
             // FIXME: we do not know local id when this text is generated
118
             //this.id + "')\"  data-i18n='connectionindicator." +
135
             //this.id + "')\"  data-i18n='connectionindicator." +
119
             "local')\"  data-i18n='connectionindicator." +
136
             "local')\"  data-i18n='connectionindicator." +
120
                 (this.showMoreValue ? "less" : "more") + "'>" +
137
                 (this.showMoreValue ? "less" : "more") + "'>" +
121
             translate("connectionindicator." + (this.showMoreValue ? "less" : "more")) +
138
             translate("connectionindicator." + (this.showMoreValue ? "less" : "more")) +
122
-            "</div><br />";
139
+            "</a>";
123
     }
140
     }
124
 
141
 
125
     if (this.showMoreValue) {
142
     if (this.showMoreValue) {
138
 
155
 
139
         if (!this.transport || this.transport.length === 0) {
156
         if (!this.transport || this.transport.length === 0) {
140
             transport = "<tr>" +
157
             transport = "<tr>" +
141
-                "<td><span class='jitsipopover_blue' " +
158
+                "<td><span " +
142
                 "data-i18n='connectionindicator.address'>" +
159
                 "data-i18n='connectionindicator.address'>" +
143
                 translate("connectionindicator.address") + "</span></td>" +
160
                 translate("connectionindicator.address") + "</span></td>" +
144
                 "<td> N/A</td></tr>";
161
                 "<td> N/A</td></tr>";
171
             var local_address_key = "connectionindicator.localaddress";
188
             var local_address_key = "connectionindicator.localaddress";
172
             var remote_address_key = "connectionindicator.remoteaddress";
189
             var remote_address_key = "connectionindicator.remoteaddress";
173
             var localTransport =
190
             var localTransport =
174
-                "<tr><td><span class='jitsipopover_blue' data-i18n='" +
191
+                "<tr><td><span data-i18n='" +
175
                 local_address_key +"' data-i18n-options='" +
192
                 local_address_key +"' data-i18n-options='" +
176
                     JSON.stringify({count: data.localIP.length}) + "'>" +
193
                     JSON.stringify({count: data.localIP.length}) + "'>" +
177
                     translate(local_address_key, {count: data.localIP.length}) +
194
                     translate(local_address_key, {count: data.localIP.length}) +
179
                 ConnectionIndicator.getStringFromArray(data.localIP) +
196
                 ConnectionIndicator.getStringFromArray(data.localIP) +
180
                 "</td></tr>";
197
                 "</td></tr>";
181
             transport =
198
             transport =
182
-                "<tr><td><span class='jitsipopover_blue' data-i18n='" +
199
+                "<tr><td><span data-i18n='" +
183
                 remote_address_key + "' data-i18n-options='" +
200
                 remote_address_key + "' data-i18n-options='" +
184
                     JSON.stringify({count: data.remoteIP.length}) + "'>" +
201
                     JSON.stringify({count: data.remoteIP.length}) + "'>" +
185
                     translate(remote_address_key,
202
                     translate(remote_address_key,
193
 
210
 
194
             transport += "<tr>" +
211
             transport += "<tr>" +
195
                 "<td>" +
212
                 "<td>" +
196
-                "<span class='jitsipopover_blue' data-i18n='" + key_remote +
213
+                "<span data-i18n='" + key_remote +
197
                 "' data-i18n-options='" +
214
                 "' data-i18n-options='" +
198
                 JSON.stringify({count: this.transport.length}) + "'>" +
215
                 JSON.stringify({count: this.transport.length}) + "'>" +
199
                 translate(key_remote, {count: this.transport.length}) +
216
                 translate(key_remote, {count: this.transport.length}) +
200
                 "</span></td><td>";
217
                 "</span></td><td>";
201
             localTransport += "<tr>" +
218
             localTransport += "<tr>" +
202
                 "<td>" +
219
                 "<td>" +
203
-                "<span class='jitsipopover_blue' data-i18n='" + key_local +
220
+                "<span data-i18n='" + key_local +
204
                 "' data-i18n-options='" +
221
                 "' data-i18n-options='" +
205
                 JSON.stringify({count: this.transport.length}) + "'>" +
222
                 JSON.stringify({count: this.transport.length}) + "'>" +
206
                 translate(key_local, {count: this.transport.length}) +
223
                 translate(key_local, {count: this.transport.length}) +
213
             transport += "</td></tr>";
230
             transport += "</td></tr>";
214
             transport += localTransport + "</td></tr>";
231
             transport += localTransport + "</td></tr>";
215
             transport +="<tr>" +
232
             transport +="<tr>" +
216
-                "<td><span class='jitsipopover_blue' data-i18n='connectionindicator.transport'>" +
233
+                "<td><span data-i18n='connectionindicator.transport'>" +
217
                 translate("connectionindicator.transport") + "</span></td>" +
234
                 translate("connectionindicator.transport") + "</span></td>" +
218
                 "<td>" + this.transport[0].type + "</td></tr>";
235
                 "<td>" + this.transport[0].type + "</td></tr>";
219
 
236
 
220
         }
237
         }
221
 
238
 
222
-        result += "<table  style='width:100%'>" +
239
+        result += "<table class='connection-info__container' style='width:100%'>" +
223
             "<tr>" +
240
             "<tr>" +
224
             "<td>" +
241
             "<td>" +
225
-            "<span class='jitsipopover_blue' data-i18n='connectionindicator.bandwidth'>" +
242
+            "<span data-i18n='connectionindicator.bandwidth'>" +
226
             translate("connectionindicator.bandwidth") + "</span>" +
243
             translate("connectionindicator.bandwidth") + "</span>" +
227
             "</td><td>" +
244
             "</td><td>" +
228
-            "<span class='jitsipopover_green'>&darr;</span>" +
245
+            "<span class='jitsipopover__green'>&darr;</span>" +
229
             downloadBandwidth +
246
             downloadBandwidth +
230
-            " <span class='jitsipopover_orange'>&uarr;</span>" +
247
+            " <span class='jitsipopover__orange'>&uarr;</span>" +
231
             uploadBandwidth + "</td></tr>";
248
             uploadBandwidth + "</td></tr>";
232
 
249
 
233
         result += transport + "</table>";
250
         result += transport + "</table>";
266
         this.connectionIndicatorContainer);
283
         this.connectionIndicatorContainer);
267
     this.popover = new JitsiPopover(
284
     this.popover = new JitsiPopover(
268
         $("#" + this.videoContainer.videoSpanId + " > .connectionindicator"),
285
         $("#" + this.videoContainer.videoSpanId + " > .connectionindicator"),
269
-        {content: "<div class=\"connection_info\" data-i18n='connectionindicator.na'>" +
286
+        {content: "<div class=\"connection-info\" data-i18n='connectionindicator.na'>" +
270
             APP.translation.translateString("connectionindicator.na") + "</div>",
287
             APP.translation.translateString("connectionindicator.na") + "</div>",
271
             skin: "black"});
288
             skin: "black"});
272
 
289
 
379
     // popover is visible or we force to do so.
396
     // popover is visible or we force to do so.
380
     if(this.popover.popoverShown || force) {
397
     if(this.popover.popoverShown || force) {
381
         this.popover.updateContent(
398
         this.popover.updateContent(
382
-            `<div class="connection_info">${this.generateText()}</div>`
399
+            `<div class="connection-info">${this.generateText()}</div>`
383
         );
400
         );
384
-        APP.translation.translateElement($(".connection_info"));
401
+        APP.translation.translateElement($(".connection-info"));
385
     }
402
     }
386
 };
403
 };
387
 
404
 

正在加载...
取消
保存