diff --git a/hassio/src/system/hassio-host-info.js b/hassio/src/system/hassio-host-info.js index 7b2ffae062..92236fc3d9 100644 --- a/hassio/src/system/hassio-host-info.js +++ b/hassio/src/system/hassio-host-info.js @@ -39,7 +39,7 @@ class HassioHostInfo extends EventsMixin(PolymerElement) { margin-top: 16px; } paper-button.info { - max-width: 50%; + max-width: calc(50% - 12px); } @@ -61,7 +61,14 @@ class HassioHostInfo extends EventsMixin(PolymerElement) { - Show hardware + + Hardware + + @@ -166,6 +173,14 @@ class HassioHostInfo extends EventsMixin(PolymerElement) { }); return data; } + + _changeHostnameClicked() { + const curHostname = this.data.hostname; + const hostname = prompt('Please enter a new hostname:', curHostname); + if (hostname && hostname !== curHostname) { + this.hass.callApi('post', 'hassio/host/options', { hostname }); + } + } } customElements.define('hassio-host-info', HassioHostInfo);