mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-09 18:36:35 +00:00
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.
This commit is contained in:
parent
6b10eeb1e9
commit
d71a80c4f8
@ -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);
|
||||
}
|
||||
</style>
|
||||
<app-route route="[[route]]" pattern="/:view" data="{{routeData}}"></app-route>
|
||||
<ha-app-layout id="layout">
|
||||
@ -88,7 +95,7 @@ class HUIRoot extends NavigateMixin(EventsMixin(PolymerElement)) {
|
||||
</div>
|
||||
</app-header>
|
||||
|
||||
<span id='view'></span>
|
||||
<div id='view'></div>
|
||||
</app-header-layout>
|
||||
`;
|
||||
}
|
||||
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user