From e0a9ccca24d3dcf435faa00ab55e682249b11b67 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 6 Nov 2023 01:54:12 +0100 Subject: [PATCH] [`media UI`] Component refactor. - Fixed style of the floating control extensions panel. - Extracted `ProgressBar` and `ExtraControls` into separate components. --- .../webapp/src/components/Media/Controls.vue | 189 ++++-------------- .../src/components/Media/ExtraControls.vue | 55 +++++ .../src/components/Media/ProgressBar.vue | 71 +++++++ .../src/components/Media/VolumeSlider.vue | 4 +- .../src/components/elements/Dropdown.vue | 2 +- .../backend/http/webapp/src/style/layout.scss | 12 +- 6 files changed, 176 insertions(+), 157 deletions(-) create mode 100644 platypush/backend/http/webapp/src/components/Media/ExtraControls.vue create mode 100644 platypush/backend/http/webapp/src/components/Media/ProgressBar.vue diff --git a/platypush/backend/http/webapp/src/components/Media/Controls.vue b/platypush/backend/http/webapp/src/components/Media/Controls.vue index 5ec4f0150..935c2ddce 100644 --- a/platypush/backend/http/webapp/src/components/Media/Controls.vue +++ b/platypush/backend/http/webapp/src/components/Media/Controls.vue @@ -3,7 +3,7 @@
-
+
-
- -
+ -
- - - - - -
+
-
- -
-
- -
-
- -
+
@@ -70,7 +45,7 @@
-
+
-
+
-
-
- -
-
- - - -
+
+ +
@@ -149,11 +104,12 @@ + + diff --git a/platypush/backend/http/webapp/src/components/Media/ProgressBar.vue b/platypush/backend/http/webapp/src/components/Media/ProgressBar.vue new file mode 100644 index 000000000..a06db86dd --- /dev/null +++ b/platypush/backend/http/webapp/src/components/Media/ProgressBar.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/platypush/backend/http/webapp/src/components/Media/VolumeSlider.vue b/platypush/backend/http/webapp/src/components/Media/VolumeSlider.vue index 1b2a20150..f70715267 100644 --- a/platypush/backend/http/webapp/src/components/Media/VolumeSlider.vue +++ b/platypush/backend/http/webapp/src/components/Media/VolumeSlider.vue @@ -45,13 +45,15 @@ export default { .volume-slider-container { min-width: 15em; + max-width: 25em; display: inline-flex; align-items: center; + flex: 1; .volume-slider { margin: 0; padding: 0 .5em 0 1em; - flex-grow: 1; + flex: 1; } button { diff --git a/platypush/backend/http/webapp/src/components/elements/Dropdown.vue b/platypush/backend/http/webapp/src/components/elements/Dropdown.vue index 35bb09b08..765365c15 100644 --- a/platypush/backend/http/webapp/src/components/elements/Dropdown.vue +++ b/platypush/backend/http/webapp/src/components/elements/Dropdown.vue @@ -120,7 +120,7 @@ export default { flex-direction: column; button { - background: $default-bg-2; + background: none; border: 0; padding: 0.5em; diff --git a/platypush/backend/http/webapp/src/style/layout.scss b/platypush/backend/http/webapp/src/style/layout.scss index 48a39f2a9..ee90e3056 100644 --- a/platypush/backend/http/webapp/src/style/layout.scss +++ b/platypush/backend/http/webapp/src/style/layout.scss @@ -159,23 +159,23 @@ $width-ranges: ( .#{$name} { &.from { @include until(nth($range, 1)) { - display: none; + display: none !important; } } &.until { @include from(nth($range, 2)) { - display: none; + display: none !important; } } &.only { @include until(nth($range, 1)) { - display: none; + display: none !important; } @include from(nth($range, 2)) { - display: none; + display: none !important; } } } @@ -183,13 +183,13 @@ $width-ranges: ( .mobile { @include from($tablet) { - display: none; + display: none !important; } } .fullhd { @include until($fullhd) { - display: none; + display: none !important; } }