This commit is contained in:
Plucky
2022-10-17 10:42:18 +08:00
parent 7e4e9f150d
commit 2eac75baa1
6 changed files with 580 additions and 639 deletions

View File

@@ -12,3 +12,9 @@ dioxus-html-macro = "0.2"
tracing = "0"
tracing-wasm = "0"
[profile.release]
opt-level = 3
lto = true
strip = true

33
dist/index.html vendored
View File

@@ -6,38 +6,11 @@
<!-- <link rel="stylesheet" href="https://rsms.me/inter/inter.css"> -->
<title>R-Dashboard</title>
<link rel="preload" href="/r-dashboard-190d13071c713371_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="/r-dashboard-190d13071c713371.js"></head>
<link rel="preload" href="/r-dashboard-5519b63f005514a8_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="/r-dashboard-5519b63f005514a8.js"></head>
<body>
<div id="main"></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 () {
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>
<script type="module">import init from '/r-dashboard-5519b63f005514a8.js';init('/r-dashboard-5519b63f005514a8_bg.wasm');</script></body></html>

Binary file not shown.

Binary file not shown.

View File

@@ -10,3 +10,4 @@ by rust + dioxus + tailwindcss
https://github.com/wobsoriano/v-dashboard/
![screenshot](static/screenshot.jpg)