From c09e10a5840a0a710fd29ab0feb28afb73cac6d2 Mon Sep 17 00:00:00 2001 From: Ilya Daynatovich Date: Wed, 19 Oct 2016 17:57:16 +0300 Subject: [PATCH] updates in connection indicator styles --- css/_jitsi_popover.scss | 13 +++++----- css/_videolayout_default.scss | 23 ---------------- css/connection-info.scss | 26 +++++++++++++++++++ css/main.scss | 1 + modules/UI/videolayout/ConnectionIndicator.js | 23 +++++----------- 5 files changed, 40 insertions(+), 46 deletions(-) create mode 100644 css/connection-info.scss diff --git a/css/_jitsi_popover.scss b/css/_jitsi_popover.scss index b46fcd1555..7df8ae8680 100644 --- a/css/_jitsi_popover.scss +++ b/css/_jitsi_popover.scss @@ -32,9 +32,8 @@ text-align: center; } - &__icon { - margin-right: 5px; + margin-right: 2px; } &__green @@ -56,8 +55,7 @@ bottom: -35px; } - &__showmore - { + &__showmore { display: block; text-align: center; width: 90px; @@ -74,22 +72,23 @@ } > .arrow { - border-width: 5px; + border-width: 5px 2.5px 0 2.5px; left: 50%; margin-left: -5px; + @extend .jitsipopover__clear; border-bottom-width: 0; border-top-color: $popoverBg; bottom: -5px; - @extend .jitsipopover__clear; + &:after { border-width: 5px; content: " "; bottom: 1px; margin-left: -5px; + @extend .jitsipopover__clear; border-bottom-width: 0; border-top-color: $popoverBg; - @extend .jitsipopover__clear; } } } diff --git a/css/_videolayout_default.scss b/css/_videolayout_default.scss index ac84a2a2f2..56400e58d8 100644 --- a/css/_videolayout_default.scss +++ b/css/_videolayout_default.scss @@ -261,29 +261,6 @@ height: 13px; } -.connection_info -{ - float: left; - padding-bottom: 5px; -} - -.connection_info > table -{ - white-space: nowrap; -} - -.connection_info, .connection_info > table -{ - text-align: left; - font-size: 12px; - font-weight: 400; - color: $popoverFontColor; - - td { - padding: 5px 0; - } -} - #localVideoContainer>span.status:hover, #localVideoContainer .displayname:hover { cursor: text; diff --git a/css/connection-info.scss b/css/connection-info.scss new file mode 100644 index 0000000000..323ad8873b --- /dev/null +++ b/css/connection-info.scss @@ -0,0 +1,26 @@ +%connection-info { + text-align: left; + font-size: 12px; + font-weight: 400; + color: $popoverFontColor; + + td { + padding: 2px 0; + } +} + +.connection-info +{ + float: left; + padding-bottom: 5px; + @extend %connection-info; + + > table { + white-space: nowrap; + @extend %connection-info; + } + + td:nth-child(n-1) { + padding-left: 5px; + } +} diff --git a/css/main.scss b/css/main.scss index cb9c295ed5..1959a6edb7 100644 --- a/css/main.scss +++ b/css/main.scss @@ -61,5 +61,6 @@ @import 'shortcuts/main'; @import 'buttons/button-control'; @import "modals/invite/invite"; +@import "connection-info"; /* Modules END */ \ No newline at end of file diff --git a/modules/UI/videolayout/ConnectionIndicator.js b/modules/UI/videolayout/ConnectionIndicator.js index 2eaf7a4853..f9744fa374 100644 --- a/modules/UI/videolayout/ConnectionIndicator.js +++ b/modules/UI/videolayout/ConnectionIndicator.js @@ -95,15 +95,8 @@ ConnectionIndicator.prototype.generateText = function () { return `${width}x${height}`; }).join(', ') || 'N/A'; - let headerKey = 'connectionindicator.header'; let result = ( - ` - - - + `
- ${translate(headerKey)} -
@@ -245,7 +236,7 @@ ConnectionIndicator.prototype.generateText = function () { } - result += "
@@ -111,10 +104,8 @@ ConnectionIndicator.prototype.generateText = function () { - - ${downloadBitrate} - - ${uploadBitrate} + ${downloadBitrate} + ${uploadBitrate}
" + + result += "
" + "" + "
" + "" + @@ -292,7 +283,7 @@ ConnectionIndicator.prototype.create = function () { this.connectionIndicatorContainer); this.popover = new JitsiPopover( $("#" + this.videoContainer.videoSpanId + " > .connectionindicator"), - {content: "
" + + {content: "
" + APP.translation.translateString("connectionindicator.na") + "
", skin: "black"}); @@ -405,9 +396,9 @@ ConnectionIndicator.prototype.updatePopoverData = function (force) { // popover is visible or we force to do so. if(this.popover.popoverShown || force) { this.popover.updateContent( - `
${this.generateText()}
` + `
${this.generateText()}
` ); - APP.translation.translateElement($(".connection_info")); + APP.translation.translateElement($(".connection-info")); } };