From 36c5ff8def7328c0eac70ba84b305bc147d7d379 Mon Sep 17 00:00:00 2001 From: Alessio Date: Wed, 17 Jun 2020 11:37:38 +0200 Subject: [PATCH 1/3] fix paddle --- .../wwwroot/assets/styles/base/paddle.less | 103 +++++++----------- Thermo.Active/wwwroot/assets/styles/style.css | 54 ++++----- .../components/paddle/sidebar.ts | 16 ++- .../components/paddle/sidebar.vue | 91 ++++++++++++---- .../components/paddle/switch-button.ts | 8 ++ .../components/paddle/switch-button.vue | 2 +- .../wwwroot/src/store/paddle.store.ts | 22 +++- 7 files changed, 169 insertions(+), 127 deletions(-) diff --git a/Thermo.Active/wwwroot/assets/styles/base/paddle.less b/Thermo.Active/wwwroot/assets/styles/base/paddle.less index ea0d52fc..165f684a 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/paddle.less +++ b/Thermo.Active/wwwroot/assets/styles/base/paddle.less @@ -3,47 +3,26 @@ @import "colors.less"; @import "fonts.less"; -html { - height : 100%; - overflow: hidden; -} - -body { - border : 0; - margin : 0; - padding: 0; - height : 100%; -} - -.hidden { - visibility: hidden; -} - -.main-nav { - position: absolute; - top : 50%; - right : 0; - z-index : 1000; -} - .container { #app { nav { - position: absolute; - // top : 50%; - right : 0; - height: 100%; - display: flex; - flex-direction: column; + position : absolute; + right : 0; + height : 100%; + display : flex; + flex-direction : column; justify-content: center; - .active button { transform: translate(-761px, 0px); } + .active_second_card button { + transform: translate(-1522px, 0px); + } + div { button { @@ -87,8 +66,6 @@ body { } } - - .sidebar { width : 100vw; height : 100vh; @@ -96,21 +73,15 @@ body { flex-direction : column; justify-content: center; - // .sidebar-backdrop { - // width: 100vw; - // height: 100vh; - // // position: fixed; - // // top: 0; - // // left: 0; - // cursor: pointer; - // } + .active { + transform: translate(-761px, 0px); + } .sidebar-panel { - overflow-y : auto; + // overflow-y : auto; background-color: #130f40; - position: fixed; - right: 0; - // top: 141px; + position : fixed; + right : 0; z-index : 900; padding : 3rem 20px 2rem 20px; width : 721px; @@ -119,19 +90,29 @@ body { box-shadow : 2px 10px 15px 0 rgba(0, 0, 0, 0.5); background-color: #dddddd; - .text-head-sidebar { - margin : 10px auto; - font-size : 24px; - font-weight : 500; - font-stretch : normal; - font-style : normal; - line-height : normal; - letter-spacing: normal; - text-align : center; - color : #002680; + .head-sidebar { + margin: 10px 0px; + display: flex; + justify-content: center; + + label { + font-size : 24px; + font-weight : 500; + font-stretch : normal; + font-style : normal; + line-height : normal; + letter-spacing: normal; + text-align : center; + color : #002680; + } + } - .box-sidebar-panel { + aside { + height: 95%; + } + + section { display : grid; grid-template-columns: repeat(2, 1fr); align-items : center; @@ -145,11 +126,10 @@ body { background-color: #808e96; margin : 10px 30px; - .text-box-paddle { + div { display : flex; width : 268px; height : 78px; - font-family : WorkSans; font-size : 18px; font-weight : 500; font-stretch : normal; @@ -166,19 +146,12 @@ body { } label { - width : 117px; + width : 100%; margin: 10px; } } - .text-box-paddle.text-soft { - label { - width : 100%; - align-self: center; - } - } - } } diff --git a/Thermo.Active/wwwroot/assets/styles/style.css b/Thermo.Active/wwwroot/assets/styles/style.css index dc16d9de..c5e0ccf5 100644 --- a/Thermo.Active/wwwroot/assets/styles/style.css +++ b/Thermo.Active/wwwroot/assets/styles/style.css @@ -4956,25 +4956,6 @@ article .box .body { width: 20px; height: 20px; } -html { - height: 100%; - overflow: hidden; -} -body { - border: 0; - margin: 0; - padding: 0; - height: 100%; -} -.hidden { - visibility: hidden; -} -.main-nav { - position: absolute; - top: 50%; - right: 0; - z-index: 1000; -} .container #app nav { position: absolute; right: 0; @@ -4986,6 +4967,9 @@ body { .container #app nav .active button { transform: translate(-761px, 0px); } +.container #app nav .active_second_card button { + transform: translate(-1522px, 0px); +} .container #app nav div button { position: relative; height: 30px; @@ -5024,8 +5008,10 @@ body { flex-direction: column; justify-content: center; } +.container #app .sidebar .active { + transform: translate(-761px, 0px); +} .container #app .sidebar .sidebar-panel { - overflow-y: auto; background-color: #130f40; position: fixed; right: 0; @@ -5037,8 +5023,12 @@ body { box-shadow: 2px 10px 15px 0 rgba(0, 0, 0, 0.5); background-color: #dddddd; } -.container #app .sidebar .sidebar-panel .text-head-sidebar { - margin: 10px auto; +.container #app .sidebar .sidebar-panel .head-sidebar { + margin: 10px 0px; + display: flex; + justify-content: center; +} +.container #app .sidebar .sidebar-panel .head-sidebar label { font-size: 24px; font-weight: 500; font-stretch: normal; @@ -5048,13 +5038,16 @@ body { text-align: center; color: #002680; } -.container #app .sidebar .sidebar-panel .box-sidebar-panel { +.container #app .sidebar .sidebar-panel aside { + height: 95%; +} +.container #app .sidebar .sidebar-panel section { display: grid; grid-template-columns: repeat(2, 1fr); align-items: center; justify-items: center; } -.container #app .sidebar .sidebar-panel .box-sidebar-panel .sidebar-panel-nav { +.container #app .sidebar .sidebar-panel section .sidebar-panel-nav { width: 286px; height: 100px; border-radius: 2px; @@ -5062,11 +5055,10 @@ body { background-color: #808e96; margin: 10px 30px; } -.container #app .sidebar .sidebar-panel .box-sidebar-panel .sidebar-panel-nav .text-box-paddle { +.container #app .sidebar .sidebar-panel section .sidebar-panel-nav div { display: flex; width: 268px; height: 78px; - font-family: WorkSans; font-size: 18px; font-weight: 500; font-stretch: normal; @@ -5076,18 +5068,14 @@ body { color: #ffffff; margin: 10px; } -.container #app .sidebar .sidebar-panel .box-sidebar-panel .sidebar-panel-nav .text-box-paddle i { +.container #app .sidebar .sidebar-panel section .sidebar-panel-nav div i { text-align: end; width: 50px; color: #bbbcbc; } -.container #app .sidebar .sidebar-panel .box-sidebar-panel .sidebar-panel-nav .text-box-paddle label { - width: 117px; - margin: 10px; -} -.container #app .sidebar .sidebar-panel .box-sidebar-panel .sidebar-panel-nav .text-box-paddle.text-soft label { +.container #app .sidebar .sidebar-panel section .sidebar-panel-nav div label { width: 100%; - align-self: center; + margin: 10px; } .arch { display: flex; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.ts index 26203a53..8e6050fe 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.ts @@ -5,14 +5,20 @@ import { paddleActions } from '@/store/paddle.store'; @Component({ name: 'sidebar' }) export default class Sidebar extends Vue { - azione1: boolean = false; - azione2: boolean = false; - isPanelOpen() { return this.$store.state.paddle.isNavOpen; } - closeSidebarPanel() { - paddleActions.Toggle(this.$store); + get action1() { + return this.$store.state.paddle.action1; } + + get action2() { + return this.$store.state.paddle.action2; + } + + ConfigPressed(action: string) { + paddleActions.ToggleAction(this.$store,action); + } + } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.vue index 0e100048..081ea69a 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.vue @@ -1,71 +1,122 @@