init
This commit is contained in:
@@ -12,3 +12,9 @@ dioxus-html-macro = "0.2"
|
|||||||
|
|
||||||
tracing = "0"
|
tracing = "0"
|
||||||
tracing-wasm = "0"
|
tracing-wasm = "0"
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
opt-level = 3
|
||||||
|
lto = true
|
||||||
|
strip = true
|
||||||
|
|
||||||
|
|||||||
33
dist/index.html
vendored
33
dist/index.html
vendored
@@ -6,38 +6,11 @@
|
|||||||
<!-- <link rel="stylesheet" href="https://rsms.me/inter/inter.css"> -->
|
<!-- <link rel="stylesheet" href="https://rsms.me/inter/inter.css"> -->
|
||||||
<title>R-Dashboard</title>
|
<title>R-Dashboard</title>
|
||||||
|
|
||||||
<link rel="preload" href="/r-dashboard-190d13071c713371_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
|
<link rel="preload" href="/r-dashboard-5519b63f005514a8_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
|
||||||
<link rel="modulepreload" href="/r-dashboard-190d13071c713371.js"></head>
|
<link rel="modulepreload" href="/r-dashboard-5519b63f005514a8.js"></head>
|
||||||
<body>
|
<body>
|
||||||
<div id="main"></div>
|
<div id="main"></div>
|
||||||
<div class="lg:hidden bg-black"></div>
|
<div class="lg:hidden bg-black"></div>
|
||||||
|
|
||||||
|
|
||||||
<script type="module">import init from '/r-dashboard-190d13071c713371.js';init('/r-dashboard-190d13071c713371_bg.wasm');</script><script>(function () {
|
<script type="module">import init from '/r-dashboard-5519b63f005514a8.js';init('/r-dashboard-5519b63f005514a8_bg.wasm');</script></body></html>
|
||||||
var protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
|
||||||
var url = protocol + '//' + window.location.host + '/_trunk/ws';
|
|
||||||
var poll_interval = 5000;
|
|
||||||
var reload_upon_connect = () => {
|
|
||||||
window.setTimeout(
|
|
||||||
() => {
|
|
||||||
// when we successfully reconnect, we'll force a
|
|
||||||
// reload (since we presumably lost connection to
|
|
||||||
// trunk due to it being killed, so it will have
|
|
||||||
// rebuilt on restart)
|
|
||||||
var ws = new WebSocket(url);
|
|
||||||
ws.onopen = () => window.location.reload();
|
|
||||||
ws.onclose = reload_upon_connect;
|
|
||||||
},
|
|
||||||
poll_interval);
|
|
||||||
};
|
|
||||||
|
|
||||||
var ws = new WebSocket(url);
|
|
||||||
ws.onmessage = (ev) => {
|
|
||||||
const msg = JSON.parse(ev.data);
|
|
||||||
if (msg.reload) {
|
|
||||||
window.location.reload();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
ws.onclose = reload_upon_connect;
|
|
||||||
})()
|
|
||||||
</script></body></html>
|
|
||||||
BIN
dist/r-dashboard-190d13071c713371_bg.wasm
vendored
BIN
dist/r-dashboard-190d13071c713371_bg.wasm
vendored
Binary file not shown.
File diff suppressed because it is too large
Load Diff
BIN
dist/r-dashboard-5519b63f005514a8_bg.wasm
vendored
Normal file
BIN
dist/r-dashboard-5519b63f005514a8_bg.wasm
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user