Looks like you don't have any add-ons installed yet. Head over to
the add-on store to get started!
@@ -60,13 +60,15 @@ Polymer({
},
addonTapped: function (ev) {
- this.fire('hassio-select-addon', { addon: this.data[ev.model.index].slug });
+ history.pushState(null, null, '/hassio/addon/' + this.data[ev.model.index].slug);
+ this.fire('location-changed');
ev.target.blur();
},
openStore: function (ev) {
- ev.preventDefault();
- this.fire('hassio-show-page', { page: 'addon-store' });
+ history.pushState(null, null, '/hassio/store');
+ this.fire('location-changed');
+ ev.target.blur();
}
});
diff --git a/panels/hassio/dashboard/hassio-dashboard.html b/panels/hassio/dashboard/hassio-dashboard.html
index 47c1cab021..92d555c3c9 100644
--- a/panels/hassio/dashboard/hassio-dashboard.html
+++ b/panels/hassio/dashboard/hassio-dashboard.html
@@ -5,12 +5,16 @@
+
+
+
+
+
+
-
-
-
+
@@ -31,6 +35,10 @@
.status > *:first-child {
margin-right: 24px;
}
+
+ paper-listbox paper-item {
+ cursor: pointer;
+ }
@@ -39,30 +47,30 @@
Hass.io
+
+
+
+ Advanced Settings
+
+
-
-
-
-
-
-
+
diff --git a/panels/hassio/dashboard/hassio-hass-update.html b/panels/hassio/dashboard/hassio-hass-update.html
new file mode 100644
index 0000000000..6cef5e6356
--- /dev/null
+++ b/panels/hassio/dashboard/hassio-hass-update.html
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ You are currently running Home Assistant version [[data.version]] and [[data.last_version]] is available.
+
+ Error: [[errors]]
+
+
+
+ Update
+
+
+
+
+
+
+
diff --git a/panels/hassio/ha-panel-hassio.html b/panels/hassio/ha-panel-hassio.html
index c73c27b7d7..cf1e084563 100644
--- a/panels/hassio/ha-panel-hassio.html
+++ b/panels/hassio/ha-panel-hassio.html
@@ -13,6 +13,7 @@
hass='[[hass]]'
narrow='[[narrow]]'
show-menu='[[showMenu]]'
+ route='[[route]]'
>
@@ -22,18 +23,10 @@ Polymer({
is: 'ha-panel-hassio',
properties: {
- hass: {
- type: Object,
- },
-
- narrow: {
- type: Boolean,
- },
-
- showMenu: {
- type: Boolean,
- value: false,
- },
+ hass: Object,
+ narrow: Boolean,
+ showMenu: Boolean,
+ route: Object,
loaded: {
type: Boolean,
diff --git a/panels/hassio/hassio-main.html b/panels/hassio/hassio-main.html
index ff4297ee00..0c4bace719 100644
--- a/panels/hassio/hassio-main.html
+++ b/panels/hassio/hassio-main.html
@@ -1,8 +1,12 @@
+
+
+
+
@@ -10,6 +14,17 @@
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
-
-
+ >
-
-
-
-
-
-
-
-
-
-
+
+
@@ -67,18 +104,15 @@ Polymer({
is: 'hassio-main',
properties: {
- hass: {
+ hass: Object,
+ narrow: Boolean,
+ showMenu: Boolean,
+ route: {
type: Object,
+ observer: '_routeChanged',
},
-
- narrow: {
- type: Boolean,
- },
-
- showMenu: {
- type: Boolean,
- value: false,
- },
+ _routeData: Object,
+ _routeTail: Object,
addon: {
type: String,
@@ -100,34 +134,21 @@ Polymer({
value: null,
},
- forceLoading: {
- type: Boolean,
- value: false,
- },
-
loaded: {
type: Boolean,
- computed: 'computeIsLoaded(supervisorInfo, hostInfo, hassInfo, forceLoading)',
- },
-
- currentPage: {
- type: String,
- value: 'dashboard',
- },
-
- lastPage: {
- type: String,
- value: 'dashboard',
+ computed: '_computeIsLoaded(supervisorInfo, hostInfo, hassInfo)',
},
},
listeners: {
- 'hassio-select-addon': 'addonSelected',
- 'hassio-show-page': 'showPage',
- 'hass-api-called': 'apiCalled',
+ 'hass-api-called': '_apiCalled',
},
- apiCalled: function (ev) {
+ attached: function () {
+ this._routeChanged(this.route);
+ },
+
+ _apiCalled: function (ev) {
if (ev.detail.success) {
var tries = 1;
@@ -142,52 +163,17 @@ Polymer({
}
},
- computeIsLoaded: function (supervisorInfo, hostInfo, hassInfo, forceLoading) {
+ _computeIsLoaded: function (supervisorInfo, hostInfo, hassInfo) {
return (supervisorInfo !== null &&
hostInfo !== null &&
- hassInfo !== null &&
- !forceLoading);
+ hassInfo !== null);
},
- addonSelected: function (ev) {
- var addon = ev.detail.addon;
-
- if (this.currentPage === this.lastPage) {
- this.lastPage = 'dashboard';
+ _routeChanged: function (route) {
+ if (route.path === '' && route.prefix === '/hassio') {
+ history.replaceState(null, null, '/hassio/dashboard');
+ this.fire('location-changed');
}
-
- if (addon) {
- this.lastPage = this.currentPage;
- this.currentPage = 'addon-view';
- this.addon = addon;
- } else {
- this.currentPage = this.lastPage;
- // Give time to cleanup the addon-view panel or it crashes
- setTimeout(function () {
- this.addon = addon;
- }.bind(this), 0);
- }
- },
-
- showPage: function (ev) {
- this.currentPage = ev.detail.page;
- },
-
- dashboardSelected: function (currentPage) {
- return currentPage === 'dashboard';
- },
-
- addonStoreSelected: function (currentPage) {
- return currentPage === 'addon-store';
- },
-
- addonViewSelected: function (currentPage) {
- return currentPage === 'addon-view';
- },
-
- supervisorSelected: function (currentPage) {
- return currentPage === 'supervisor';
- },
-
+ }
});
diff --git a/panels/hassio/supervisor/hassio-supervisor.html b/panels/hassio/supervisor/hassio-supervisor.html
index 034913a8f5..4a1856da7a 100644
--- a/panels/hassio/supervisor/hassio-supervisor.html
+++ b/panels/hassio/supervisor/hassio-supervisor.html
@@ -81,7 +81,7 @@ Polymer({
},
backTapped: function () {
- this.fire('hassio-select-addon', { addon: null });
+ history.back();
},
});
diff --git a/src/layouts/hass-error-screen.html b/src/layouts/hass-error-screen.html
new file mode 100644
index 0000000000..e98ece000d
--- /dev/null
+++ b/src/layouts/hass-error-screen.html
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Home Assistant
+
+
+
+
+
+
+
diff --git a/src/layouts/hass-loading-screen.html b/src/layouts/hass-loading-screen.html
index c0b1674e82..883f6a52ca 100644
--- a/src/layouts/hass-loading-screen.html
+++ b/src/layouts/hass-loading-screen.html
@@ -7,10 +7,6 @@
@@ -264,7 +264,7 @@ Polymer({
var current = this.currentView;
if (view !== current) {
- var path = this.route.prefix;
+ var path = '/states';
if (view) {
path += '/' + view;
}
diff --git a/src/layouts/partial-panel-resolver.html b/src/layouts/partial-panel-resolver.html
index f24f27ac31..7ad858de89 100644
--- a/src/layouts/partial-panel-resolver.html
+++ b/src/layouts/partial-panel-resolver.html
@@ -100,6 +100,7 @@ Polymer({
hass: this.hass,
narrow: this.narrow,
showMenu: this.showMenu,
+ route: this.routeTail,
panel: panel,
});
this.resolved = true;