mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fix for content appearing behind header in hassio and config panels (#1708)
* Call iron-resize on route change * Add EventsMixin to hassio-main
This commit is contained in:
parent
68d1c77a79
commit
458a7827f9
@ -8,9 +8,10 @@ import './hassio-data.js';
|
||||
import './hassio-pages-with-tabs.js';
|
||||
|
||||
import applyThemesOnElement from '../../src/common/dom/apply_themes_on_element.js';
|
||||
import EventsMixin from '../../src/mixins/events-mixin.js';
|
||||
import NavigateMixin from '../../src/mixins/navigate-mixin.js';
|
||||
|
||||
class HassioMain extends NavigateMixin(PolymerElement) {
|
||||
class HassioMain extends EventsMixin(NavigateMixin(PolymerElement)) {
|
||||
static get template() {
|
||||
return html`
|
||||
<app-route route="[[route]]" pattern="/:page" data="{{routeData}}"></app-route>
|
||||
@ -93,6 +94,7 @@ class HassioMain extends NavigateMixin(PolymerElement) {
|
||||
if (route.path === '' && route.prefix === '/hassio') {
|
||||
this.navigate('/hassio/dashboard', true);
|
||||
}
|
||||
this.fire('iron-resize');
|
||||
}
|
||||
|
||||
equalsAddon(page) {
|
||||
|
@ -6,6 +6,7 @@ import { PolymerElement } from '@polymer/polymer/polymer-element.js';
|
||||
import '../../layouts/hass-error-screen.js';
|
||||
|
||||
import isComponentLoaded from '../../common/config/is_component_loaded.js';
|
||||
import EventsMixin from '../../mixins/events-mixin.js';
|
||||
import NavigateMixin from '../../mixins/navigate-mixin.js';
|
||||
|
||||
import(/* webpackChunkName: "panel-config-automation" */ './automation/ha-config-automation.js');
|
||||
@ -19,9 +20,10 @@ import(/* webpackChunkName: "panel-config-users" */ './users/ha-config-users.js'
|
||||
import(/* webpackChunkName: "panel-config-zwave" */ './zwave/ha-config-zwave.js');
|
||||
|
||||
/*
|
||||
* @appliesMixin EventsMixin
|
||||
* @appliesMixin NavigateMixin
|
||||
*/
|
||||
class HaPanelConfig extends NavigateMixin(PolymerElement) {
|
||||
class HaPanelConfig extends EventsMixin(NavigateMixin(PolymerElement)) {
|
||||
static get template() {
|
||||
return html`
|
||||
<app-route
|
||||
@ -170,6 +172,7 @@ class HaPanelConfig extends NavigateMixin(PolymerElement) {
|
||||
if (route.path === '' && route.prefix === '/config') {
|
||||
this.navigate('/config/dashboard', true);
|
||||
}
|
||||
this.fire('iron-resize');
|
||||
}
|
||||
|
||||
_equals(a, b) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user