diff --git a/app/src/renderer/App.vue b/app/src/renderer/App.vue index f74ef7a8ad..c61675799d 100644 --- a/app/src/renderer/App.vue +++ b/app/src/renderer/App.vue @@ -1,9 +1,7 @@ #app app-header - #app-content - #app-main: router-view - app-footer + #app-content: router-view notifications(:notifications='notifications' theme='cosmos') modal-help session @@ -11,7 +9,6 @@ @@ -61,7 +66,7 @@ export default { .app-menu-main flex 1 - overflow-y auto + position relative // for perfect-scrollbar .ni-user border-top 1px solid bc diff --git a/app/src/renderer/components/common/NiListItem.vue b/app/src/renderer/components/common/NiListItem.vue index 1ada60eec0..fabce23c1b 100644 --- a/app/src/renderer/components/common/NiListItem.vue +++ b/app/src/renderer/components/common/NiListItem.vue @@ -93,7 +93,6 @@ export default { display block border-bottom 2px solid bc-dim height 3rem - max-width width-main position relative &:last-child diff --git a/app/src/renderer/components/common/NiPage.vue b/app/src/renderer/components/common/NiPage.vue index f025db52fd..e3d9d59fa7 100644 --- a/app/src/renderer/components/common/NiPage.vue +++ b/app/src/renderer/components/common/NiPage.vue @@ -5,18 +5,31 @@ div(slot='subtitle') {{ subtitle }} div(slot="menu"): slot(name="menu") main.ni-page-main: slot - page-footer + app-footer @@ -25,8 +38,13 @@ export default { @require '~variables' .ni-page - max-width aw - margin 0 auto + flex 1 + display flex + flex-flow column nowrap + +.ni-page-main + flex 1 + position relative .ni-page-title color bright diff --git a/app/src/renderer/components/common/NiPageHeader.vue b/app/src/renderer/components/common/NiPageHeader.vue index c71847ab68..c9b83f828a 100644 --- a/app/src/renderer/components/common/NiPageHeader.vue +++ b/app/src/renderer/components/common/NiPageHeader.vue @@ -21,7 +21,7 @@ export default { @require '~variables' .ni-page-header - -webkit-app-region: drag; + -webkit-app-region drag .ni-page-header-title font-size xl diff --git a/app/src/renderer/components/common/NiToolBar.vue b/app/src/renderer/components/common/NiToolBar.vue index 7564f3711f..6753206d70 100644 --- a/app/src/renderer/components/common/NiToolBar.vue +++ b/app/src/renderer/components/common/NiToolBar.vue @@ -110,6 +110,9 @@ export default { height 3rem + px border-top px solid bc + .ni-page + padding-bottom 3rem + @media screen and (min-width: 568px) .ni-tool-bar-container .main diff --git a/app/src/renderer/styles/app.styl b/app/src/renderer/styles/app.styl index bdc986f720..8d3d30b3b7 100644 --- a/app/src/renderer/styles/app.styl +++ b/app/src/renderer/styles/app.styl @@ -40,25 +40,46 @@ a .desktop-only display none -@media screen and (min-width: 1024px) - agu .desktop-only - display block - #app df() color txt padding-top 3rem - min-height 100vh - display flex - flex-flow column nowrap + height 100vh + width 100vw -#app-content - flex 1 display flex flex-flow column nowrap -#app-main - flex 1 - .ni-field border-radius 2px!important + +@media screen and (min-width: 1024px) + #app + padding-top 0 + flex-flow row nowrap + + #app-header, #app-content + display flex + + #app-header + flex 0 0 width-side + border-right px solid bc + display flex + + > .container + flex 1 + display flex + flex-flow column nowrap + + .header-item-logo + border-bottom px solid bc + padding 2rem 1rem .75rem + line-height: normal + img + height 1.25rem + + #app-content + flex 1 + + .desktop-only + display block diff --git a/app/src/renderer/styles/vendor/perfect-scrollbar.styl b/app/src/renderer/styles/vendor/perfect-scrollbar.styl new file mode 100644 index 0000000000..8afadace22 --- /dev/null +++ b/app/src/renderer/styles/vendor/perfect-scrollbar.styl @@ -0,0 +1,80 @@ +.ps + overflow hidden !important + overflow-anchor none + -ms-overflow-style none + touch-action auto + -ms-touch-action auto + +.ps__rail-x + display none + opacity 0 + transition background-color .2s linear, opacity .2s linear + -webkit-transition background-color .2s linear, opacity .2s linear + height 15px + bottom 0px + position absolute + +.ps__rail-y + display none + opacity 0 + transition background-color .2s linear, opacity .2s linear + -webkit-transition background-color .2s linear, opacity .2s linear + width 15px + right 0 + position absolute + +.ps--active-x > .ps__rail-x, +.ps--active-y > .ps__rail-y + display block + background-color transparent + +.ps:hover > .ps__rail-x, +.ps:hover > .ps__rail-y, +.ps--focus > .ps__rail-x, +.ps--focus > .ps__rail-y, +.ps--scrolling-x > .ps__rail-x, +.ps--scrolling-y > .ps__rail-y + opacity 0.6 + +.ps__rail-x:hover, +.ps__rail-y:hover, +.ps__rail-x:focus, +.ps__rail-y:focus + background-color #eee + opacity 0.9 + +.ps__thumb-x + background-color input-bc + border-radius 6px + transition background-color .2s linear, height .2s ease-in-out + -webkit-transition background-color .2s linear, height .2s ease-in-out + height 6px + bottom 2px + position absolute + +.ps__thumb-y + background-color input-bc + border-radius 6px + transition background-color .2s linear, width .2s ease-in-out + -webkit-transition background-color .2s linear, width .2s ease-in-out + width 6px + right 2px + position absolute + +.ps__rail-x:hover > .ps__thumb-x, +.ps__rail-x:focus > .ps__thumb-x + background-color #999 + height 11px + +.ps__rail-y:hover > .ps__thumb-y, +.ps__rail-y:focus > .ps__thumb-y + background-color #999 + width 11px + +@supports (-ms-overflow-style: none) + .ps + overflow auto !important + +@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) + .ps + overflow auto !important diff --git a/package.json b/package.json index 7612a8ec8c..f7b4e7892b 100644 --- a/package.json +++ b/package.json @@ -116,6 +116,7 @@ "mousetrap": "^1.6.1", "nib": "^1.1.2", "no-scroll": "^2.1.0", + "perfect-scrollbar": "^1.3.0", "proxyquire": "^1.8.0", "request-interval": "^2.0.0", "shortid": "^2.2.8", diff --git a/test/unit/specs/__snapshots__/PageBalances.spec.js.snap b/test/unit/specs/__snapshots__/PageBalances.spec.js.snap index 255c9ebffe..a44b125675 100644 --- a/test/unit/specs/__snapshots__/PageBalances.spec.js.snap +++ b/test/unit/specs/__snapshots__/PageBalances.spec.js.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`PageBalances has the expected html structure 1`] = `"