From 9236714bec54a4762e8c6e470aad79a4f8e8b751 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sat, 19 Jan 2019 13:03:51 +0100 Subject: [PATCH] Made the sections scrollable --- shared/css/general.scss | 88 +++++++++++++++++------ shared/html/templates.html | 17 +++-- shared/js/load.ts | 3 +- shared/js/main.ts | 2 +- shared/js/settings.ts | 12 ++-- shared/js/ui/context_divider.ts | 69 ++++++++++++++++++ shared/js/ui/modal/ModalPermissionEdit.ts | 10 +++ shared/js/utils/tab.ts | 23 +++--- 8 files changed, 181 insertions(+), 43 deletions(-) create mode 100644 shared/js/ui/context_divider.ts diff --git a/shared/css/general.scss b/shared/css/general.scss index e33faeb0..da04d9c8 100644 --- a/shared/css/general.scss +++ b/shared/css/general.scss @@ -150,13 +150,6 @@ width: 100%; } -.main_container { - padding: 4px; - border: lightgray solid; - border-width: 2px; - background-color: white; -} - html { background-color: gray; } @@ -268,24 +261,56 @@ footer .container { justify-content: center; } +$separator_thickness: 4px; .app { + .container-app-main { + display: flex; + flex-direction: row; + justify-content: stretch; + + height: 100%; + width: 100%; + + + border: $separator_thickness solid lightgray; + border-top-width: 0; + } + + .container-control-bar { + height: 45px; + width: 100%; + border-radius: 2px 0 0 0; + border-bottom-width: 0; + background-color: lightgrey; + + display: flex; + flex-direction: column; + justify-content: center; + } + .container-channel-chat { + /* > div { min-height: 100px; min-width: 100px; max-width: 100%; } + */ min-width: 100px; - max-width: 60%; /* tmp chat fix */ + //max-width: 60%; /* tmp chat fix */ + display: flex; flex-direction: column; - flex-grow: 1; + justify-content: stretch; .container-channel { - flex-grow: 60; + background: white; + display: flex; justify-content: stretch; + height: calc(100% - 250px); + min-height: 100px; /* overflow: auto; @@ -293,30 +318,51 @@ footer .container { */ overflow: hidden; overflow-y: auto; - - background: white; - border: 2px solid lightgray; - border-right-width: 0; } .container-chat { + background: white; + display: flex; flex-direction: column; justify-content: stretch; - max-height: 400px; + //max-height: 400px; height: 250px; - border-radius: 0 0 0 2px; - border-top-width: 0; - border-right-width: 0; + min-height: 100px; } } .container-info { + background: white; + min-width: 100px; - max-width: 40%; - width: 40%; - border-radius: 0 0 2px 0; + //max-width: 40%; + //width: 40%; + + display: flex; + flex-direction: row; + justify-content: stretch; + } +} + +.container-seperator { + background: lightgray; + flex-grow: 0; + flex-shrink: 0; + + &.horizontal { + height: $separator_thickness; + width: 100%; + + cursor: row-resize; + } + + &.vertical { + width: $separator_thickness; + height: 100%; + + cursor: col-resize; } } diff --git a/shared/html/templates.html b/shared/html/templates.html index a52b88fe..f1085ec6 100644 --- a/shared/html/templates.html +++ b/shared/html/templates.html @@ -9,9 +9,8 @@