* Convert remaining elements to ES6 classes * Use native DOM methods for tests * Fix Polymer 2 debounce call
53 lines
1.3 KiB
HTML
53 lines
1.3 KiB
HTML
<link rel="import" href="../../bower_components/polymer/polymer-element.html">
|
|
|
|
<link rel="import" href="../../bower_components/app-layout/app-toolbar/app-toolbar.html">
|
|
|
|
<link rel="import" href="../../src/components/ha-menu-button.html">
|
|
<link rel="import" href="../../src/resources/ha-style.html">
|
|
|
|
<dom-module id='ha-panel-iframe'>
|
|
<template>
|
|
<style include='ha-style'>
|
|
iframe {
|
|
border: 0;
|
|
width: 100%;
|
|
height: calc(100% - 64px);
|
|
}
|
|
</style>
|
|
<app-toolbar>
|
|
<ha-menu-button narrow='[[narrow]]' show-menu='[[showMenu]]'></ha-menu-button>
|
|
<div main-title>[[panel.title]]</div>
|
|
</app-toolbar>
|
|
|
|
<iframe
|
|
src='[[panel.config.url]]'
|
|
sandbox="allow-forms allow-popups allow-pointer-lock allow-same-origin allow-scripts"
|
|
allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"
|
|
></iframe>
|
|
</template>
|
|
</dom-module>
|
|
|
|
<script>
|
|
class HaPanelIframe extends Polymer.Element {
|
|
static get is() { return 'ha-panel-iframe'; }
|
|
|
|
static get properties() {
|
|
return {
|
|
panel: {
|
|
type: Object,
|
|
},
|
|
|
|
narrow: {
|
|
type: Boolean,
|
|
},
|
|
|
|
showMenu: {
|
|
type: Boolean,
|
|
},
|
|
};
|
|
}
|
|
}
|
|
|
|
customElements.define(HaPanelIframe.is, HaPanelIframe);
|
|
</script>
|