From cbad10f7170d21d3421f3288f6e306b6b45288e8 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sat, 9 Nov 2019 15:56:01 +0100 Subject: [PATCH] Added support within the UI to change a clients playback latency --- shared/css/static/modal-latency.scss | 84 +++++++++++++++++ shared/css/static/modal.scss | 4 + shared/html/templates.html | 42 +++++++++ shared/js/connection/ConnectionBase.ts | 10 +++ shared/js/ui/client.ts | 22 +++++ shared/js/ui/modal/ModalChangeLatency.ts | 110 +++++++++++++++++++++++ shared/loader/app.ts | 2 + web/js/voice/VoiceClient.ts | 12 +++ 8 files changed, 286 insertions(+) create mode 100644 shared/css/static/modal-latency.scss create mode 100644 shared/js/ui/modal/ModalChangeLatency.ts diff --git a/shared/css/static/modal-latency.scss b/shared/css/static/modal-latency.scss new file mode 100644 index 00000000..07d94c71 --- /dev/null +++ b/shared/css/static/modal-latency.scss @@ -0,0 +1,84 @@ +@import "mixin"; +@import "properties"; + +.modal-body.modal-latency { + @include user-select(none); + @include transform(all $button_hover_animation_time ease-in-out); + + .info { + display: flex; + flex-direction: row; + justify-content: stretch; + + .htmltag-client { + color: #999!important; + margin-left: .25em; + } + + div { + display: flex; + flex-direction: row; + justify-content: stretch; + } + + .value { + margin-left: .25em; + } + } + + .container-min, .container-max { + display: flex; + flex-direction: row; + justify-content: stretch; + + height: 2em; + + .container-value { + display: flex; + flex-direction: row; + justify-content: space-between; + + flex-shrink: 0; + flex-grow: 0; + + margin-right: 1em; + width: 9em; + + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + + align-self: center; + + .value { + } + } + } + + .container-max { + padding-top: 1em; + } + + .container-slider { + align-self: center; + } + + .buttons { + display: flex; + flex-direction: row; + justify-content: stretch; + + margin-top: 2em; + + .spacer { + flex-grow: 1; + flex-shrink: 1; + + min-width: 0; + } + + button:not(:last-of-type) { + margin-right: 1em; + } + } +} \ No newline at end of file diff --git a/shared/css/static/modal.scss b/shared/css/static/modal.scss index 78f714c0..2a25c1a8 100644 --- a/shared/css/static/modal.scss +++ b/shared/css/static/modal.scss @@ -256,6 +256,10 @@ .modal-body.modal-green { border-left: 2px solid #00d400; } + .modal-body.modal-red { + border: none; + border-left: 2px solid #d50000; + } .modal-body.modal-body-input { color: #999999; diff --git a/shared/html/templates.html b/shared/html/templates.html index 54b92244..6c4d48f8 100644 --- a/shared/html/templates.html +++ b/shared/html/templates.html @@ -2586,6 +2586,48 @@ + +