mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +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 './hassio-pages-with-tabs.js';
|
||||||
|
|
||||||
import applyThemesOnElement from '../../src/common/dom/apply_themes_on_element.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';
|
import NavigateMixin from '../../src/mixins/navigate-mixin.js';
|
||||||
|
|
||||||
class HassioMain extends NavigateMixin(PolymerElement) {
|
class HassioMain extends EventsMixin(NavigateMixin(PolymerElement)) {
|
||||||
static get template() {
|
static get template() {
|
||||||
return html`
|
return html`
|
||||||
<app-route route="[[route]]" pattern="/:page" data="{{routeData}}"></app-route>
|
<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') {
|
if (route.path === '' && route.prefix === '/hassio') {
|
||||||
this.navigate('/hassio/dashboard', true);
|
this.navigate('/hassio/dashboard', true);
|
||||||
}
|
}
|
||||||
|
this.fire('iron-resize');
|
||||||
}
|
}
|
||||||
|
|
||||||
equalsAddon(page) {
|
equalsAddon(page) {
|
||||||
|
@ -6,6 +6,7 @@ import { PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|||||||
import '../../layouts/hass-error-screen.js';
|
import '../../layouts/hass-error-screen.js';
|
||||||
|
|
||||||
import isComponentLoaded from '../../common/config/is_component_loaded.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 NavigateMixin from '../../mixins/navigate-mixin.js';
|
||||||
|
|
||||||
import(/* webpackChunkName: "panel-config-automation" */ './automation/ha-config-automation.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');
|
import(/* webpackChunkName: "panel-config-zwave" */ './zwave/ha-config-zwave.js');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* @appliesMixin EventsMixin
|
||||||
* @appliesMixin NavigateMixin
|
* @appliesMixin NavigateMixin
|
||||||
*/
|
*/
|
||||||
class HaPanelConfig extends NavigateMixin(PolymerElement) {
|
class HaPanelConfig extends EventsMixin(NavigateMixin(PolymerElement)) {
|
||||||
static get template() {
|
static get template() {
|
||||||
return html`
|
return html`
|
||||||
<app-route
|
<app-route
|
||||||
@ -170,6 +172,7 @@ class HaPanelConfig extends NavigateMixin(PolymerElement) {
|
|||||||
if (route.path === '' && route.prefix === '/config') {
|
if (route.path === '' && route.prefix === '/config') {
|
||||||
this.navigate('/config/dashboard', true);
|
this.navigate('/config/dashboard', true);
|
||||||
}
|
}
|
||||||
|
this.fire('iron-resize');
|
||||||
}
|
}
|
||||||
|
|
||||||
_equals(a, b) {
|
_equals(a, b) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user