mirror of
https://github.com/netfun2000/hipudding-teslamate.git
synced 2026-02-27 09:44:28 +08:00
* Add URL_PATH environment variable for reverse proxy deployments For example, this can be used to run TeslaMate behind a reverse proxy, using a URL path such as "/teslamate". * gettext: update pot and po files Generated using: mix gettext.extract --merge * web: run mix format * gettext: update pot and po files Re-generating gettext files after running mix format. Generated using: mix gettext.extract --merge
30 lines
668 B
JavaScript
30 lines
668 B
JavaScript
import "../css/app.scss";
|
|
|
|
import "phoenix_html";
|
|
import { Socket } from "phoenix";
|
|
import { LiveSocket } from "phoenix_live_view";
|
|
|
|
import * as hooks from "./hooks";
|
|
|
|
const csrfToken = document
|
|
.querySelector("meta[name='csrf-token']")
|
|
.getAttribute("content");
|
|
|
|
const liveSocket = new LiveSocket(window.LIVE_PATH, Socket, {
|
|
hooks,
|
|
params: {
|
|
_csrf_token: csrfToken,
|
|
baseUrl: window.location.origin,
|
|
referrer: document.referrer,
|
|
tz: Intl && Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
},
|
|
});
|
|
|
|
liveSocket.connect();
|
|
|
|
// liveSocket.enableDebug();
|
|
// liveSocket.enableLatencySim(1000);
|
|
// window.liveSocket = liveSocket;
|
|
|
|
import "./main";
|