mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-19 10:57:19 +00:00
153 lines
4.1 KiB
HTML
153 lines
4.1 KiB
HTML
<link rel="import" href="../../bower_components/polymer/polymer.html">
|
|
|
|
<link rel="import" href="../../bower_components/paper-icon-button/paper-icon-button.html">
|
|
|
|
<link rel="import" href="../../bower_components/app-layout/app-header-layout/app-header-layout.html">
|
|
<link rel="import" href="../../bower_components/app-layout/app-header/app-header.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-dev-info">
|
|
<template>
|
|
<style include="iron-positioning ha-style">
|
|
:host {
|
|
background-color: white;
|
|
-ms-user-select: initial;
|
|
-webkit-user-select: initial;
|
|
-moz-user-select: initial;
|
|
}
|
|
|
|
.content {
|
|
padding: 16px;
|
|
}
|
|
|
|
.about {
|
|
text-align: center;
|
|
line-height: 2em;
|
|
}
|
|
|
|
.version {
|
|
@apply(--paper-font-headline);
|
|
}
|
|
|
|
.develop {
|
|
@apply(--paper-font-subhead);
|
|
}
|
|
|
|
.about a {
|
|
color: var(--dark-primary-color);
|
|
}
|
|
|
|
.error-log-intro {
|
|
margin-top: 16px;
|
|
border-top: 1px solid var(--light-primary-color);
|
|
padding-top: 16px;
|
|
}
|
|
|
|
paper-icon-button {
|
|
float: right;
|
|
}
|
|
|
|
.error-log {
|
|
@apply(--paper-font-code1)
|
|
clear: both;
|
|
white-space: pre-wrap;
|
|
}
|
|
</style>
|
|
|
|
<app-header-layout has-scrolling-region>
|
|
<app-header fixed>
|
|
<app-toolbar>
|
|
<ha-menu-button narrow='[[narrow]]' show-menu='[[showMenu]]'></ha-menu-button>
|
|
<div main-title>About</div>
|
|
</app-toolbar>
|
|
</app-header>
|
|
|
|
<div class='content fit'>
|
|
<div class='about'>
|
|
<p class='version'>
|
|
<a href='https://home-assistant.io'><img src="/static/icons/favicon-192x192.png" height="192" /></a><br />
|
|
Home Assistant<br />
|
|
[[hass.config.core.version]]
|
|
</p>
|
|
<p>
|
|
Path to configuration.yaml: [[hass.config.core.config_dir]]
|
|
</p>
|
|
<p class='develop'>
|
|
<a href='https://home-assistant.io/developers/credits/' target='_blank'>
|
|
Developed by a bunch of awesome people.
|
|
</a>
|
|
</p>
|
|
<p>
|
|
Published under the MIT license<br />
|
|
Source:
|
|
<a href='https://github.com/home-assistant/home-assistant' target='_blank'>server</a> —
|
|
<a href='https://github.com/home-assistant/home-assistant-polymer' target='_blank'>frontend-ui</a> —
|
|
<a href='https://github.com/home-assistant/home-assistant-js' target='_blank'>frontend-core</a>
|
|
</p>
|
|
<p>
|
|
Built using
|
|
<a href='https://www.python.org'>Python 3</a>,
|
|
<a href='https://www.polymer-project.org' target='_blank'>Polymer [[polymerVersion]]</a>,
|
|
Icons by <a href='https://www.google.com/design/icons/' target='_blank'>Google</a> and <a href='https://MaterialDesignIcons.com' target='_blank'>MaterialDesignIcons.com</a>.
|
|
</p>
|
|
</div>
|
|
<p class='error-log-intro'>
|
|
The following errors have been logged this session:
|
|
<paper-icon-button icon='mdi:refresh' on-tap='refreshErrorLog'></paper-icon-button>
|
|
</p>
|
|
<div class='error-log'>[[errorLog]]</div>
|
|
</div>
|
|
</app-header-layout>
|
|
</template>
|
|
</dom-module>
|
|
|
|
<script>
|
|
Polymer({
|
|
is: 'ha-panel-dev-info',
|
|
|
|
properties: {
|
|
hass: {
|
|
type: Object,
|
|
},
|
|
|
|
narrow: {
|
|
type: Boolean,
|
|
value: false,
|
|
},
|
|
|
|
showMenu: {
|
|
type: Boolean,
|
|
value: false,
|
|
},
|
|
|
|
polymerVersion: {
|
|
type: String,
|
|
value: Polymer.version,
|
|
},
|
|
|
|
errorLog: {
|
|
type: String,
|
|
value: '',
|
|
},
|
|
},
|
|
|
|
attached: function () {
|
|
this.refreshErrorLog();
|
|
},
|
|
|
|
refreshErrorLog: function (ev) {
|
|
if (ev) ev.preventDefault();
|
|
|
|
this.errorLog = 'Loading error log…';
|
|
|
|
this.hass.callApi('GET', 'error_log').then(
|
|
function (log) {
|
|
this.errorLog = log || 'No errors have been reported.';
|
|
}.bind(this));
|
|
},
|
|
});
|
|
</script>
|