radars and vehicles

This commit is contained in:
LinlyBoi
2022-12-25 13:10:38 +02:00
parent 298b35af4c
commit f9dfb4bf64
11 changed files with 133 additions and 25 deletions

View File

@@ -204,6 +204,9 @@ function makeMutClosure(arg0, arg1, dtor, f) {
return real;
}
function __wbg_adapter_18(arg0, arg1, arg2) {
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h414630ac9216cad4(arg0, arg1, addHeapObject(arg2));
}
let stack_pointer = 32;
@@ -212,7 +215,7 @@ function addBorrowedObject(obj) {
heap[--stack_pointer] = obj;
return stack_pointer;
}
function __wbg_adapter_18(arg0, arg1, arg2) {
function __wbg_adapter_21(arg0, arg1, arg2) {
try {
wasm._dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9380123c3ed0eddb(arg0, arg1, addBorrowedObject(arg2));
} finally {
@@ -220,10 +223,6 @@ function __wbg_adapter_18(arg0, arg1, arg2) {
}
}
function __wbg_adapter_21(arg0, arg1, arg2) {
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h414630ac9216cad4(arg0, arg1, addHeapObject(arg2));
}
let cachedUint32Memory0 = new Uint32Array();
function getUint32Memory0() {
@@ -616,12 +615,12 @@ function getImports() {
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
throw new Error(getStringFromWasm0(arg0, arg1));
};
imports.wbg.__wbindgen_closure_wrapper3547 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 236, __wbg_adapter_18);
imports.wbg.__wbindgen_closure_wrapper4152 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 287, __wbg_adapter_18);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper6208 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 263, __wbg_adapter_21);
imports.wbg.__wbindgen_closure_wrapper4211 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 303, __wbg_adapter_21);
return addHeapObject(ret);
};
@@ -659,7 +658,7 @@ function initSync(module) {
async function init(input) {
if (typeof input === 'undefined') {
input = new URL('db-frontend-5a949c39a51fa2c9_bg.wasm', import.meta.url);
input = new URL('db-frontend-c0621f030a0450bc_bg.wasm', import.meta.url);
}
const imports = getImports();

Binary file not shown.

View File

@@ -2,10 +2,10 @@
<meta charset="utf-8">
<title>Ze greatest</title>
<link rel="preload" href="/db-frontend-5a949c39a51fa2c9_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="/db-frontend-5a949c39a51fa2c9.js"></head>
<link rel="preload" href="/db-frontend-c0621f030a0450bc_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="/db-frontend-c0621f030a0450bc.js"></head>
<body>
<script type="module">import init from '/db-frontend-5a949c39a51fa2c9.js';init('/db-frontend-5a949c39a51fa2c9_bg.wasm');</script><script>(function () {
<script type="module">import init from '/db-frontend-c0621f030a0450bc.js';init('/db-frontend-c0621f030a0450bc_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;

View File

@@ -114,7 +114,9 @@ impl Component for RandomCommit {
</>
},
FetchState::Fetching => html! { "Fetching" },
FetchState::Success(data) => html! { <p> {data} </p> },
FetchState::Success(data) => {
html! { <> <h2> {"Commit Header:"} </h2> {data}</> }
}
FetchState::Failed(err) => html! { err },
}
}
@@ -177,7 +179,7 @@ impl Component for Driver {
</>
},
FetchState::Fetching => html! { "Fetching" },
FetchState::Success(data) => html! { <p> {data} </p> },
FetchState::Success(data) => html! { <> <h2> {"Driver"} </h2> {data} </> },
FetchState::Failed(err) => html! { err },
}
}
@@ -232,7 +234,8 @@ async fn fetch_driver(url: &'static str) -> Result<String, FetchError> {
let mut opts = RequestInit::new();
opts.method("GET");
opts.mode(RequestMode::Cors); //Cors is required for fetch to work
//initialise request
//initialise request
let request = Request::new_with_str_and_init(url, &opts)?;
let window = gloo::utils::window();
let resp_value = JsFuture::from(window.fetch_with_request(&request)).await?;