parent
a730ef1acf
commit
7354ab21e9
|
@ -28,11 +28,11 @@ class ConnectionOverlay extends Component {
|
||||||
if (socket.state === SOCKET_STATE.DISCONNECTED) {
|
if (socket.state === SOCKET_STATE.DISCONNECTED) {
|
||||||
const uri = localStorage.getItem("autoconnect");
|
const uri = localStorage.getItem("autoconnect");
|
||||||
const password = localStorage.getItem("password");
|
const password = localStorage.getItem("password");
|
||||||
this.state = {
|
this.setState({
|
||||||
uri: uri || "ws://127.0.0.1:8412",
|
uri: uri || process.env.DEFAULT_WS_URI,
|
||||||
password,
|
password,
|
||||||
autoconnect: !!uri
|
autoconnect: !!uri
|
||||||
};
|
});
|
||||||
if (uri) {
|
if (uri) {
|
||||||
initialize(getURI(this.state.uri, this.state.password));
|
initialize(getURI(this.state.uri, this.state.password));
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ const path = require("path");
|
||||||
const webpack = require("webpack");
|
const webpack = require("webpack");
|
||||||
|
|
||||||
const defines = {
|
const defines = {
|
||||||
"DEFAULT_WS_URI": process.env.WEBSOCKET_URI || "ws://localhost:8412/"
|
"DEFAULT_WS_URI": process.env.WEBSOCKET_URI || "ws://127.0.0.1:8412/"
|
||||||
};
|
};
|
||||||
|
|
||||||
const env = process.env.ENVIRONMENT || "development";
|
const env = process.env.ENVIRONMENT || "development";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user