mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-10 02:46:38 +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 {
|
app-toolbar a {
|
||||||
color: var(--text-primary-color, white);
|
color: var(--text-primary-color, white);
|
||||||
}
|
}
|
||||||
|
#view {
|
||||||
|
min-height: calc(100vh - 112px);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
#view.tabs-hidden {
|
||||||
|
min-height: calc(100vh - 64px);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<app-route route="[[route]]" pattern="/:view" data="{{routeData}}"></app-route>
|
<app-route route="[[route]]" pattern="/:view" data="{{routeData}}"></app-route>
|
||||||
<ha-app-layout id="layout">
|
<ha-app-layout id="layout">
|
||||||
@ -88,7 +95,7 @@ class HUIRoot extends NavigateMixin(EventsMixin(PolymerElement)) {
|
|||||||
</div>
|
</div>
|
||||||
</app-header>
|
</app-header>
|
||||||
|
|
||||||
<span id='view'></span>
|
<div id='view'></div>
|
||||||
</app-header-layout>
|
</app-header-layout>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -219,6 +226,7 @@ class HUIRoot extends NavigateMixin(EventsMixin(PolymerElement)) {
|
|||||||
this._loadResources(config.resources || []);
|
this._loadResources(config.resources || []);
|
||||||
// On config change, recreate the view from scratch.
|
// On config change, recreate the view from scratch.
|
||||||
this._selectView(this._curView);
|
this._selectView(this._curView);
|
||||||
|
this.$.view.classList.toggle('tabs-hidden', config.views.length < 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
_columnsChanged(columns) {
|
_columnsChanged(columns) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user