From 11b0cb8da8def7a8bcf3170ff027c8e2b2cea942 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 12 Dec 2017 11:25:57 +0100 Subject: [PATCH] Simplify status + content display (#7264) --- js/src/Application/application.css | 39 +++++++++++++++++------------- js/src/Application/application.js | 28 ++++++++++----------- js/src/Dapp/dapp.css | 10 +++----- js/src/Dapps/dapps.js | 24 +++++++++--------- js/src/Status/status.css | 11 +++------ js/src/Status/status.js | 4 +-- 6 files changed, 55 insertions(+), 61 deletions(-) diff --git a/js/src/Application/application.css b/js/src/Application/application.css index 82b3a7534..1c0f94718 100644 --- a/js/src/Application/application.css +++ b/js/src/Application/application.css @@ -19,7 +19,9 @@ box-sizing: border-box; display: flex; flex-direction: column; - min-height: 100vh; + height: 100vh; + overflow: hidden; + width: 100%; .logo { top: 0; @@ -27,8 +29,8 @@ left: 0; bottom: 0; opacity: 0.2; - position: fixed; - padding: 7em; + position: absolute; + padding: 2em; text-align: center; z-index: 0; @@ -37,21 +39,24 @@ margin: 0 auto; } } -} -.container { - box-sizing: border-box; - display: flex; - flex-grow: 1; - flex-direction: column; -} + .content { + box-sizing: border-box; + display: flex; + flex-grow: 1; + overflow: hidden; + position: relative; -.content { - padding: 0; -} + > div:not(.logo) { + display: flex; + flex-grow: 1; + overflow-y: scroll; + } + } -.error { - padding: 2em; - background: red; - color: white; + .error { + padding: 2em; + background: red; + color: white; + } } diff --git a/js/src/Application/application.js b/js/src/Application/application.js index 5e7135fa5..17bac38e0 100644 --- a/js/src/Application/application.js +++ b/js/src/Application/application.js @@ -109,32 +109,30 @@ class Application extends Component { renderApp () { const { children } = this.props; - return ( -
- - - - - -
- { children } -
+ return [ + , + , + , + , + , +
+ { children }
- ); + ]; } renderMinimized () { const { children } = this.props; - return ( -
+ return [ + , +
- { children }
- ); + ]; } } diff --git a/js/src/Dapp/dapp.css b/js/src/Dapp/dapp.css index 314d6c747..a458aa7a4 100644 --- a/js/src/Dapp/dapp.css +++ b/js/src/Dapp/dapp.css @@ -15,22 +15,20 @@ /* along with Parity. If not, see . */ -.frame { +.frame, +.full { background: white; box-sizing: border-box; border: 0; flex-grow: 1; + margin: 0; + padding: 0; opacity: 0; width: 100%; z-index: 1; } .full { - width: 100vw; - height: 100vh; - margin: 0; - padding: 0; - background: white; font-family: 'Roboto', sans-serif; font-size: 16px; font-weight: 300; diff --git a/js/src/Dapps/dapps.js b/js/src/Dapps/dapps.js index bcba01c87..dd1109e36 100644 --- a/js/src/Dapps/dapps.js +++ b/js/src/Dapps/dapps.js @@ -50,19 +50,17 @@ class Dapps extends Component { const applications = [].concat(this.store.visibleLocal, this.store.visibleViews, this.store.visibleBuiltin, this.store.visibleNetwork); return ( - -
- { - applications.map((app, index) => ( - - )) - } -
+ + { + applications.map((app, index) => ( + + )) + } { this.store.externalOverlayVisible ? ( diff --git a/js/src/Status/status.css b/js/src/Status/status.css index 110d2f3c8..27922da03 100644 --- a/js/src/Status/status.css +++ b/js/src/Status/status.css @@ -16,6 +16,7 @@ */ $textColor: #ccc; +$statusHeight: 2.75em; .home { color: $textColor !important; @@ -26,15 +27,9 @@ $textColor: #ccc; .container { flex: 0; box-sizing: border-box; - height: 2.75em; - .fixed { - box-sizing: border-box; - position: fixed; - top: 0; - right: 0; - left: 0; - height: 2.75em; + .bar { + height: $statusHeight; z-index: 1000; border-bottom: 1px solid #405161; color: $textColor; diff --git a/js/src/Status/status.js b/js/src/Status/status.js index 947a09739..fd39b1862 100644 --- a/js/src/Status/status.js +++ b/js/src/Status/status.js @@ -44,7 +44,7 @@ function Status ({ className = '', upgradeStore }, { api }) { return ( - +
); }