fix: update from main
This commit is contained in:
parent
8b9299ec1c
commit
c928406c5e
14 changed files with 5517 additions and 1 deletions
40
examples/api/dist/index.html
vendored
Normal file
40
examples/api/dist/index.html
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE html><html><head>
|
||||
<meta charset="utf-8">
|
||||
<title>Tauri + Yew App</title>
|
||||
<link rel="stylesheet" href="/style-5fb26c3cb7f627df.css">
|
||||
|
||||
|
||||
<link rel="preload" href="/tauri-app-ui-4e8c54440496f9dd_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
|
||||
<link rel="modulepreload" href="/tauri-app-ui-4e8c54440496f9dd.js"></head>
|
||||
<body>
|
||||
<!--app-html-->
|
||||
|
||||
|
||||
<script type="module">import init from '/tauri-app-ui-4e8c54440496f9dd.js';init('/tauri-app-ui-4e8c54440496f9dd_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>
|
Loading…
Add table
Add a link
Reference in a new issue