1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00
Files
frontend/panels/dev-info/ha-panel-dev-info.html
2016-07-16 23:19:49 -07:00

154 lines
3.8 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="./partial-base.html">
-->
<dom-module id="ha-panel-dev-info">
<style is="custom-style" include="iron-positioning"></style>
<style>
.content {
margin-top: 64px;
padding: 24px;
background-color: white;
-ms-user-select: initial;
-webkit-user-select: initial;
-moz-user-select: initial;
}
.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>
<template>
<partial-base narrow="[[narrow]]" show-menu='[[showMenu]]'>
<span header-title>About</span>
<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 />
[[hassVersion]]
</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/balloob/home-assistant' target='_blank'>server</a> &mdash;
<a href='https://github.com/balloob/home-assistant-polymer' target='_blank'>frontend-ui</a> &mdash;
<a href='https://github.com/balloob/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>,
<a href='https://optimizely.github.io/nuclear-js/' target='_blank'>NuclearJS [[nuclearVersion]]</a><br />
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>
</partial-base>
</template>
</dom-module>
<script>
Polymer({
is: 'ha-panel-dev-info',
behaviors: [window.hassBehavior],
properties: {
hass: {
type: Object,
},
narrow: {
type: Boolean,
value: false,
},
showMenu: {
type: Boolean,
value: false,
},
hassVersion: {
type: String,
bindNuclear: function (hass) {
return hass.configGetters.serverVersion;
},
},
polymerVersion: {
type: String,
value: Polymer.version,
},
nuclearVersion: {
type: String,
value: '1.3.0',
},
errorLog: {
type: String,
value: '',
},
},
attached: function () {
this.refreshErrorLog();
},
refreshErrorLog: function (ev) {
if (ev) ev.preventDefault();
this.errorLog = 'Loading error log…';
this.hass.errorLogActions.fetchErrorLog().then(
function (log) {
this.errorLog = log || 'No errors have been reported.';
}.bind(this));
},
});
</script>