1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-24 04:39:01 +00:00

Expose build type on window (#630)

* Expose build type on window

* Build two panels for Hass.io
This commit is contained in:
Paulus Schoutsen
2017-11-14 22:39:20 -08:00
committed by GitHub
parent de87c5b19b
commit 6fac4e9027
6 changed files with 7 additions and 3 deletions

View File

@@ -3,10 +3,11 @@ import * as HAWS from 'home-assistant-js-websocket';
window.HAWS = HAWS;
window.HASS_DEMO = __DEMO__;
window.HASS_DEV = __DEV__;
window.HASS_BUILD = __BUILD__;
const init = window.createHassConnection = function (password) {
const proto = window.location.protocol === 'https:' ? 'wss' : 'ws';
const url = `${proto}://${window.location.host}/api/websocket${window.location.search}`;
const url = `${proto}://${window.location.host}/api/websocket?${window.HASS_BUILD}`;
const options = {
setupRetry: 10,
};