From d71a80c4f8b50bfe43f62c991e41b2f97f1ae9b0 Mon Sep 17 00:00:00 2001 From: Jerad Meisner Date: Thu, 5 Jul 2018 08:27:28 -0700 Subject: [PATCH] Love: Rework layout to use static sized view area (#1403) * Rework view layout. * Don't edit ha-app-layout This reverts commit 7b32161 * User classList.toggle instead of attribute binding. * Change view to a div. --- src/panels/lovelace/hui-root.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/panels/lovelace/hui-root.js b/src/panels/lovelace/hui-root.js index 27b8b11c6e..d0a048c761 100644 --- a/src/panels/lovelace/hui-root.js +++ b/src/panels/lovelace/hui-root.js @@ -50,6 +50,13 @@ class HUIRoot extends NavigateMixin(EventsMixin(PolymerElement)) { app-toolbar a { color: var(--text-primary-color, white); } + #view { + min-height: calc(100vh - 112px); + position: relative; + } + #view.tabs-hidden { + min-height: calc(100vh - 64px); + } @@ -88,7 +95,7 @@ class HUIRoot extends NavigateMixin(EventsMixin(PolymerElement)) { - +
`; } @@ -219,6 +226,7 @@ class HUIRoot extends NavigateMixin(EventsMixin(PolymerElement)) { this._loadResources(config.resources || []); // On config change, recreate the view from scratch. this._selectView(this._curView); + this.$.view.classList.toggle('tabs-hidden', config.views.length < 2); } _columnsChanged(columns) {