瀏覽代碼

updates in connection indicator styles

master
Ilya Daynatovich 8 年之前
父節點
當前提交
c09e10a584
共有 5 個檔案被更改,包括 40 行新增46 行删除
  1. 6
    7
      css/_jitsi_popover.scss
  2. 0
    23
      css/_videolayout_default.scss
  3. 26
    0
      css/connection-info.scss
  4. 1
    0
      css/main.scss
  5. 7
    16
      modules/UI/videolayout/ConnectionIndicator.js

+ 6
- 7
css/_jitsi_popover.scss 查看文件

@@ -32,9 +32,8 @@
32 32
         text-align: center;
33 33
     }
34 34
 
35
-
36 35
     &__icon {
37
-        margin-right: 5px;
36
+        margin-right: 2px;
38 37
     }
39 38
 
40 39
     &__green
@@ -56,8 +55,7 @@
56 55
         bottom: -35px;
57 56
     }
58 57
 
59
-    &__showmore
60
-    {
58
+    &__showmore {
61 59
         display: block;
62 60
         text-align: center;
63 61
         width: 90px;
@@ -74,22 +72,23 @@
74 72
     }
75 73
 
76 74
     > .arrow {
77
-        border-width: 5px;
75
+        border-width: 5px 2.5px 0 2.5px;
78 76
         left: 50%;
79 77
         margin-left: -5px;
78
+        @extend .jitsipopover__clear;
80 79
         border-bottom-width: 0;
81 80
         border-top-color: $popoverBg;
82 81
         bottom: -5px;
83
-        @extend .jitsipopover__clear;
82
+
84 83
 
85 84
         &:after {
86 85
             border-width: 5px;
87 86
             content: " ";
88 87
             bottom: 1px;
89 88
             margin-left: -5px;
89
+            @extend .jitsipopover__clear;
90 90
             border-bottom-width: 0;
91 91
             border-top-color: $popoverBg;
92
-            @extend .jitsipopover__clear;
93 92
         }
94 93
     }
95 94
 }

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

@@ -261,29 +261,6 @@
261 261
     height: 13px;
262 262
 }
263 263
 
264
-.connection_info
265
-{
266
-    float: left;
267
-    padding-bottom: 5px;
268
-}
269
-
270
-.connection_info > table
271
-{
272
-    white-space: nowrap;
273
-}
274
-
275
-.connection_info, .connection_info > table
276
-{
277
-    text-align: left;
278
-    font-size: 12px;
279
-    font-weight: 400;
280
-    color: $popoverFontColor;
281
-
282
-    td {
283
-        padding: 5px 0;
284
-    }
285
-}
286
-
287 264
 #localVideoContainer>span.status:hover,
288 265
 #localVideoContainer .displayname:hover {
289 266
     cursor: text;

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

@@ -0,0 +1,26 @@
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
+}

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

@@ -61,5 +61,6 @@
61 61
 @import 'shortcuts/main';
62 62
 @import 'buttons/button-control';
63 63
 @import "modals/invite/invite";
64
+@import "connection-info";
64 65
 
65 66
 /* Modules END */

+ 7
- 16
modules/UI/videolayout/ConnectionIndicator.js 查看文件

@@ -95,15 +95,8 @@ ConnectionIndicator.prototype.generateText = function () {
95 95
         return `${width}x${height}`;
96 96
     }).join(', ') || 'N/A';
97 97
 
98
-    let headerKey = 'connectionindicator.header';
99 98
     let result = (
100
-        `<table style='width:100%'>
101
-            <tr>
102
-                <td>
103
-                    <span class="jitsipopover__title"
104
-                        data-i18n="">${translate(headerKey)}</span>
105
-                </td>
106
-            </tr>
99
+        `<table class="connection-info__container" style='width:100%'>
107 100
             <tr>
108 101
                 <td>
109 102
                     <span data-i18n='connectionindicator.bitrate'>
@@ -111,10 +104,8 @@ ConnectionIndicator.prototype.generateText = function () {
111 104
                     </span>
112 105
                 </td>
113 106
                 <td>
114
-                    <span class='jitsipopover__green'>&darr;</span>
115
-                    ${downloadBitrate}
116
-                    <span class='jitsipopover__orange'>&uarr;</span>
117
-                    ${uploadBitrate}
107
+                    <span class='jitsipopover__green'>&darr;</span>${downloadBitrate}
108
+                    <span class='jitsipopover__orange'>&uarr;</span>${uploadBitrate}
118 109
                 </td>
119 110
             </tr>
120 111
             <tr>
@@ -245,7 +236,7 @@ ConnectionIndicator.prototype.generateText = function () {
245 236
 
246 237
         }
247 238
 
248
-        result += "<table  style='width:100%'>" +
239
+        result += "<table class='connection-info__container' style='width:100%'>" +
249 240
             "<tr>" +
250 241
             "<td>" +
251 242
             "<span data-i18n='connectionindicator.bandwidth'>" +
@@ -292,7 +283,7 @@ ConnectionIndicator.prototype.create = function () {
292 283
         this.connectionIndicatorContainer);
293 284
     this.popover = new JitsiPopover(
294 285
         $("#" + this.videoContainer.videoSpanId + " > .connectionindicator"),
295
-        {content: "<div class=\"connection_info\" data-i18n='connectionindicator.na'>" +
286
+        {content: "<div class=\"connection-info\" data-i18n='connectionindicator.na'>" +
296 287
             APP.translation.translateString("connectionindicator.na") + "</div>",
297 288
             skin: "black"});
298 289
 
@@ -405,9 +396,9 @@ ConnectionIndicator.prototype.updatePopoverData = function (force) {
405 396
     // popover is visible or we force to do so.
406 397
     if(this.popover.popoverShown || force) {
407 398
         this.popover.updateContent(
408
-            `<div class="connection_info">${this.generateText()}</div>`
399
+            `<div class="connection-info">${this.generateText()}</div>`
409 400
         );
410
-        APP.translation.translateElement($(".connection_info"));
401
+        APP.translation.translateElement($(".connection-info"));
411 402
     }
412 403
 };
413 404
 

Loading…
取消
儲存