From 587a0fe44381ca41deac1422552ecb6fc0f95ad6 Mon Sep 17 00:00:00 2001 From: Sean Engelhardt Date: Thu, 28 Feb 2019 17:26:28 +0100 Subject: [PATCH 1/2] Clean projector detail interface Alters the projector detail interface to provide better usability. Alters the dragging slightly to have a nice preview and smoother transitions. --- .../sorting-list/sorting-list.component.html | 2 +- .../sorting-list/sorting-list.component.scss | 17 +- .../projector-detail.component.html | 296 ++++++++++-------- .../projector-detail.component.scss | 107 +++---- .../projector-detail.component.ts | 5 + client/src/assets/styles/drag.scss | 29 ++ 6 files changed, 263 insertions(+), 193 deletions(-) create mode 100644 client/src/assets/styles/drag.scss diff --git a/client/src/app/shared/components/sorting-list/sorting-list.component.html b/client/src/app/shared/components/sorting-list/sorting-list.component.html index a26cfc724..84a8259b8 100644 --- a/client/src/app/shared/components/sorting-list/sorting-list.component.html +++ b/client/src/app/shared/components/sorting-list/sorting-list.component.html @@ -1,5 +1,5 @@
-
+
No data
diff --git a/client/src/app/shared/components/sorting-list/sorting-list.component.scss b/client/src/app/shared/components/sorting-list/sorting-list.component.scss index 3eb0fc8bf..af2500602 100644 --- a/client/src/app/shared/components/sorting-list/sorting-list.component.scss +++ b/client/src/app/shared/components/sorting-list/sorting-list.component.scss @@ -1,3 +1,5 @@ +@import '../../../../assets/styles/drag.scss'; + .box { width: 100%; border-bottom: solid 1px #ccc; @@ -5,21 +7,6 @@ font-size: 14px; } -.cdk-drag-preview { - box-sizing: border-box; - border-radius: 4px; - box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), - 0 3px 14px 2px rgba(0, 0, 0, 0.12); -} - -.cdk-drag-placeholder { - opacity: 0; -} - -.cdk-drag-animating { - transition: transform 125ms ease-in-out; -} - .box:last-child { border: none; } diff --git a/client/src/app/site/projector/components/projector-detail/projector-detail.component.html b/client/src/app/site/projector/components/projector-detail/projector-detail.component.html index 9a6f74e74..bd574f893 100644 --- a/client/src/app/site/projector/components/projector-detail/projector-detail.component.html +++ b/client/src/app/site/projector/components/projector-detail/projector-detail.component.html @@ -12,56 +12,65 @@
-
-
-
-
{{ projector.scroll }}
- + + + + + +
{{ projector.scroll }}
+ + + + + + +
-
-
{{ projector.scale }}
- - - -
-
-
-
+
+
+ - -
- -
-
History
-

- {{ getSlideTitle(elements[0]) }} -

+
-
Current
-
-

Slides

-
-

- Countdowns - -

- - - - {{ countdown.description }} - - -
+ + + + + + Queue + -
-

- Messages - -

- - - - {{ message.getPreview(40) }} - - -
- -
-

Current list of speakers overlay

- - - - Current list of speakers overlay - - -
- -
-

Current list of speakers slide

- - - - Current list of speakers slide - - -
-
- -
-

Current speaker chyron

- - - - Current speaker chyron - - -
- -
-
Queue
-
-
-
- drag_indicator -
-
- {{ i+1 }}. {{ getSlideTitle(element) }} -
-
-
- - +
+
+
+ drag_indicator +
+
+ +
+
+ {{ i + 1 }}. {{ getSlideTitle(element) }} +
+
+
+ +
+
-
-
+ + + + + + + + + History + +

+ {{ i + 1 }}. {{ getSlideTitle(elements[0]) }} +

+
+ + + + + Countdowns + + + + + {{ countdown.description }} + + + + + + + + + + + Messages + + + + + {{ message.getPreview(40) }} + + + + + + + + + + + Current list of speakers + + + + + + + Current list of speakers overlay + + + + + + + + Current list of speakers slide + + + + + + + + Current speaker chyron + + + +
diff --git a/client/src/app/site/projector/components/projector-detail/projector-detail.component.scss b/client/src/app/site/projector/components/projector-detail/projector-detail.component.scss index 4c029feee..edaa9456c 100644 --- a/client/src/app/site/projector/components/projector-detail/projector-detail.component.scss +++ b/client/src/app/site/projector/components/projector-detail/projector-detail.component.scss @@ -1,3 +1,5 @@ +@import '../../../../../assets/styles/drag.scss'; + #projector { width: 100%; /*1000px;*/ border: 1px solid lightgrey; @@ -25,8 +27,7 @@ } .control-group { - text-align: center; - color: rgba(0, 0, 0, 0.54); + color: rgba(0, 0, 0, 0.5); .button-size { width: 40px; @@ -34,64 +35,60 @@ } } -h4 { - margin-top: 5px; +.slide-controls { + text-align: center; +} - button { - width: 20px; - height: 20px; +.projector-controls { + text-align: right; +} + +.drop-list { + width: 100%; + display: block; + overflow: hidden; +} + +.drop-list-entry { + display: table; + min-height: 50px; + width: 100%; + border-bottom: solid 1px #ccc; + color: rgba(0, 0, 0, 0.87); + + .drag-handle { + display: table-cell; + padding: 0 10px; + line-height: 0px; + vertical-align: middle; + width: 25px; + color: slategrey; + cursor: move; } -} -h5 { - margin-bottom: 0; -} + .name { + display: table-cell; + vertical-align: middle; + } -.queue { - margin-top: 15px; + .button-right { + display: table-cell; + padding-right: 10px; + vertical-align: middle; + width: auto; + white-space: nowrap; - .drop-list { - width: 100%; - display: block; - overflow: hidden; - - .list-entry { - display: table; - min-height: 50px; - width: 100%; - border-bottom: solid 1px #ccc; - color: rgba(0, 0, 0, 0.87); - - .drag-handle { - display: table-cell; - padding: 0 10px; - line-height: 0px; - vertical-align: middle; - width: 25px; - color: slategrey; - cursor: move; - } - - .name { - display: table-cell; - vertical-align: middle; - } - - .button-right { - display: table-cell; - padding-right: 10px; - vertical-align: middle; - width: auto; - white-space: nowrap; - - div { - float: right; - } - } - } - - .list-entry:last-child { - border: none; + div { + float: right; } } } + +.drop-list-entry:last-child { + border: none; +} + +// move away from preview. +.drop-list.cdk-drop-list-dragging .drop-list-entry:not(.cdk-drag-placeholder) { + transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); +} diff --git a/client/src/app/site/projector/components/projector-detail/projector-detail.component.ts b/client/src/app/site/projector/components/projector-detail/projector-detail.component.ts index ee07e2215..de2a25e7b 100644 --- a/client/src/app/site/projector/components/projector-detail/projector-detail.component.ts +++ b/client/src/app/site/projector/components/projector-detail/projector-detail.component.ts @@ -43,6 +43,11 @@ export class ProjectorDetailComponent extends BaseViewComponent implements OnIni public messages: ViewProjectorMessage[] = []; + /** + * true if the queue might be altered + */ + public editQueue = false; + /** * @param titleService * @param translate diff --git a/client/src/assets/styles/drag.scss b/client/src/assets/styles/drag.scss new file mode 100644 index 000000000..cddb5f38d --- /dev/null +++ b/client/src/assets/styles/drag.scss @@ -0,0 +1,29 @@ +//shared CSS rules that are required for all components that implement drag and drop +/** + * Moving list entries away from preview cannot be stored in this scss file, cause the naming + * of the css classes is relevant. Use it like the following. + * + * transform can somehow not be stored as css variable + * + * @example + * ```css + * .drop-list.cdk-drop-list-dragging .list-entry:not(.cdk-drag-placeholder) { + * transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); + * } + */ + +.cdk-drag-preview { + box-sizing: border-box; + border-radius: 4px; + background-color: white; + box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), + 0 3px 14px 2px rgba(0, 0, 0, 0.12); +} + +.cdk-drag-placeholder { + opacity: 0; +} + +.cdk-drag-animating { + transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); +} From 2257991abacf7116bd8e17fa983f4ce82fb526c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Thu, 28 Feb 2019 21:39:05 +0100 Subject: [PATCH 2/2] Projector detail template improvements --- .../slide-container.component.scss | 1 + .../motion-detail.component.html | 5 +- .../projector-detail.component.html | 53 +++++++++++-------- .../projector-detail.component.scss | 45 +++++++++++++--- .../styles/global-components-style.scss | 13 ++++- .../src/assets/styles/openslides-theme.scss | 35 ------------ client/src/styles.scss | 16 ++++++ 7 files changed, 98 insertions(+), 70 deletions(-) diff --git a/client/src/app/shared/components/slide-container/slide-container.component.scss b/client/src/app/shared/components/slide-container/slide-container.component.scss index 4687f8642..cb29e038e 100644 --- a/client/src/app/shared/components/slide-container/slide-container.component.scss +++ b/client/src/app/shared/components/slide-container/slide-container.component.scss @@ -7,6 +7,7 @@ position: absolute; left: 50px; top: 50px; + line-height: 1.5em; } } diff --git a/client/src/app/site/motions/components/motion-detail/motion-detail.component.html b/client/src/app/site/motions/components/motion-detail/motion-detail.component.html index d6b887cbd..2ed4be551 100644 --- a/client/src/app/site/motions/components/motion-detail/motion-detail.component.html +++ b/client/src/app/site/motions/components/motion-detail/motion-detail.component.html @@ -72,10 +72,7 @@ List of speakers - + - - - -
{{ projector.scroll }}
+ + + +
{{ projector.scale }}
- - - - + + +
{{ projector.scroll }}
+
@@ -72,11 +73,18 @@
- + {{ getSlideTitle(element) }} +
+
+ +
+
@@ -84,7 +92,7 @@ - + Queue @@ -96,7 +104,7 @@ (cdkDropListDropped)="onSortingChange($event)" >
@@ -104,7 +112,7 @@ drag_indicator
-
@@ -121,14 +129,17 @@
- + - + History @@ -192,17 +203,17 @@ - Current list of speakers overlay + Overlay - - + + - Current list of speakers slide + Slide @@ -212,7 +223,7 @@ - Current speaker chyron + Chyron diff --git a/client/src/app/site/projector/components/projector-detail/projector-detail.component.scss b/client/src/app/site/projector/components/projector-detail/projector-detail.component.scss index edaa9456c..0e4026a35 100644 --- a/client/src/app/site/projector/components/projector-detail/projector-detail.component.scss +++ b/client/src/app/site/projector/components/projector-detail/projector-detail.component.scss @@ -30,7 +30,7 @@ color: rgba(0, 0, 0, 0.5); .button-size { - width: 40px; + padding-left: 5px; display: inline-block; } } @@ -43,6 +43,37 @@ text-align: right; } +.currentElement { + margin-bottom: 20px; + box-shadow: 0px 3px 10px 0px rgba(0, 0, 0, 0.25); + + .button-right { + position: absolute; + right: 10px; + } +} + +.queue, +.previous-slides { + box-shadow: none !important; + background: none !important; + margin-bottom: 20px; + + .queue-element { + margin-bottom: 5px; + } + + .mat-expansion-panel-header { + padding: 0 5px 0 0 !important; + height: 36px !important; + } + + .mat-action-row { + border-top-style: none; + padding: 0; + } +} + .drop-list { width: 100%; display: block; @@ -53,8 +84,6 @@ display: table; min-height: 50px; width: 100%; - border-bottom: solid 1px #ccc; - color: rgba(0, 0, 0, 0.87); .drag-handle { display: table-cell; @@ -66,11 +95,6 @@ cursor: move; } - .name { - display: table-cell; - vertical-align: middle; - } - .button-right { display: table-cell; padding-right: 10px; @@ -82,6 +106,11 @@ float: right; } } + + .name { + display: table-cell; + vertical-align: middle; + } } .drop-list-entry:last-child { diff --git a/client/src/assets/styles/global-components-style.scss b/client/src/assets/styles/global-components-style.scss index e0f4f2218..c35824b5b 100644 --- a/client/src/assets/styles/global-components-style.scss +++ b/client/src/assets/styles/global-components-style.scss @@ -19,7 +19,7 @@ color: mat-color($primary); } - .accent-text { + .accent, .accent-text { color: mat-color($accent); } @@ -42,7 +42,7 @@ font-size: 75%; display: block; } - .error { + .error, .warn { color: mat-color($warn); } @@ -75,4 +75,13 @@ background-color: mat-color($primary); color: white; // TODO } + .backgroundColorAccent { + background-color: mat-color($accent); + color: mat-color($accent, default-contrast) !important; + } + + .backgroundColorLight { + background-color: mat-color($background, status-bar); + color: mat-color($foreground, text) !important; + } } diff --git a/client/src/assets/styles/openslides-theme.scss b/client/src/assets/styles/openslides-theme.scss index 2952fda99..38c31be84 100644 --- a/client/src/assets/styles/openslides-theme.scss +++ b/client/src/assets/styles/openslides-theme.scss @@ -32,46 +32,11 @@ $openslides-blue: ( ) ); -$openslides-green: ( - 50: #e9f2e6, - 100: #c8e0bf, - 200: #a3cb95, - 300: #7eb66b, - 400: #62a64b, - 500: #46962b, - 600: #3f8e26, - 700: #0a321e, - 800: #092d1a, - 900: #072616, - A100: #acff9d, - A200: #80ff6a, - A400: #55ff37, - A700: #3fff1e, - contrast: ( - 50: #000000, - 100: #000000, - 200: #000000, - 300: #000000, - 400: #000000, - 500: #ffffff, - 600: #ffffff, - 700: #ffffff, - 800: #ffffff, - 900: #ffffff, - A100: #000000, - A200: #000000, - A400: #000000, - A700: #000000 - ) -); - // Generate paletes using: https://material.io/design/color/ // default values fir mat-palette: $default: 500, $lighter: 100, $darker: 700. $openslides-primary: mat-palette($openslides-blue); $openslides-accent: mat-palette($mat-light-blue); -// $openslides-primary: mat-palette($openslides-green); -// $openslides-accent: mat-palette($mat-amber); $openslides-warn: mat-palette($mat-red); diff --git a/client/src/styles.scss b/client/src/styles.scss index b3b58344e..a546c5bee 100644 --- a/client/src/styles.scss +++ b/client/src/styles.scss @@ -409,6 +409,9 @@ button.mat-menu-item.selected { .spacer-left-10 { margin-left: 10px; } +.spacer-left-40 { + margin-left: 40px !important; +} .button24 { background-color: white; @@ -469,6 +472,12 @@ button.mat-menu-item.selected { .center { text-align: center; } +.pointer:hover { + cursor: pointer; +} +.pointer.selected { + cursor: pointer; +} /** Colors **/ .lightblue { @@ -638,3 +647,10 @@ button.mat-menu-item.selected { .mat-cell > * { z-index: 2; } + + +.queue { + .mat-expansion-panel-body { + padding: 0 !important; + } +}