mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-24 04:57:00 +01:00
20220104 resolve yew render issues (#632)
This commit is contained in:
parent
c8468199fc
commit
2a282f8a89
|
@ -150,13 +150,15 @@ async fn index_view(_req: tide::Request<AppState>) -> tide::Result {
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8"/>
|
||||||
<title>Kanidm</title>
|
<title>Kanidm</title>
|
||||||
|
<link rel="stylesheet" href="/pkg/external/bootstrap.min.css" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"/>
|
||||||
|
<link rel="stylesheet" href="/pkg/style.css"/>
|
||||||
|
<script src="/pkg/external/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"></script>
|
||||||
|
<script src="/pkg/external/confetti.js"></script>
|
||||||
<script src="/pkg/bundle.js" defer></script>
|
<script src="/pkg/bundle.js" defer></script>
|
||||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🦀</text></svg>">
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🦀</text></svg>" />
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -36,6 +36,10 @@ features = [
|
||||||
"CredentialCreationOptions",
|
"CredentialCreationOptions",
|
||||||
"CredentialRequestOptions",
|
"CredentialRequestOptions",
|
||||||
"CredentialsContainer",
|
"CredentialsContainer",
|
||||||
|
"DomTokenList",
|
||||||
|
"Element",
|
||||||
|
"Event",
|
||||||
|
"FocusEvent",
|
||||||
"Headers",
|
"Headers",
|
||||||
"HtmlDocument",
|
"HtmlDocument",
|
||||||
"Navigator",
|
"Navigator",
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
wasm-pack build --no-typescript --release --target web && \
|
|
||||||
rollup ./src/main.js --format iife --file ./pkg/bundle.js && \
|
|
||||||
cp ./src/style.css ./pkg/style.css && \
|
|
||||||
cp -a ./src/external ./pkg/external && \
|
|
||||||
rm ./pkg/.gitignore
|
|
||||||
|
|
||||||
|
|
1
kanidmd_web_ui/build_wasm.sh
Symbolic link
1
kanidmd_web_ui/build_wasm.sh
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
build_wasm_release.sh
|
8
kanidmd_web_ui/build_wasm_dev.sh
Executable file
8
kanidmd_web_ui/build_wasm_dev.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
wasm-pack build --dev --target web && \
|
||||||
|
rollup ./src/main.js --format iife --file ./pkg/bundle.js && \
|
||||||
|
cp ./src/style.css ./pkg/style.css && \
|
||||||
|
cp -a ./src/external ./pkg/external && \
|
||||||
|
rm ./pkg/.gitignore
|
||||||
|
|
||||||
|
|
8
kanidmd_web_ui/build_wasm_release.sh
Executable file
8
kanidmd_web_ui/build_wasm_release.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
wasm-pack build --no-typescript --release --target web && \
|
||||||
|
rollup ./src/main.js --format iife --file ./pkg/bundle.js && \
|
||||||
|
cp ./src/style.css ./pkg/style.css && \
|
||||||
|
cp -a ./src/external ./pkg/external && \
|
||||||
|
rm ./pkg/.gitignore
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,35 @@
|
||||||
|
|
||||||
let wasm;
|
let wasm;
|
||||||
|
|
||||||
|
const heap = new Array(32).fill(undefined);
|
||||||
|
|
||||||
|
heap.push(undefined, null, true, false);
|
||||||
|
|
||||||
|
function getObject(idx) { return heap[idx]; }
|
||||||
|
|
||||||
|
let heap_next = heap.length;
|
||||||
|
|
||||||
|
function dropObject(idx) {
|
||||||
|
if (idx < 36) return;
|
||||||
|
heap[idx] = heap_next;
|
||||||
|
heap_next = idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
function takeObject(idx) {
|
||||||
|
const ret = getObject(idx);
|
||||||
|
dropObject(idx);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
function addHeapObject(obj) {
|
||||||
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
||||||
|
const idx = heap_next;
|
||||||
|
heap_next = heap[idx];
|
||||||
|
|
||||||
|
heap[idx] = obj;
|
||||||
|
return idx;
|
||||||
|
}
|
||||||
|
|
||||||
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
||||||
|
|
||||||
cachedTextDecoder.decode();
|
cachedTextDecoder.decode();
|
||||||
|
@ -19,35 +48,6 @@
|
||||||
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
||||||
}
|
}
|
||||||
|
|
||||||
const heap = new Array(32).fill(undefined);
|
|
||||||
|
|
||||||
heap.push(undefined, null, true, false);
|
|
||||||
|
|
||||||
let heap_next = heap.length;
|
|
||||||
|
|
||||||
function addHeapObject(obj) {
|
|
||||||
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
||||||
const idx = heap_next;
|
|
||||||
heap_next = heap[idx];
|
|
||||||
|
|
||||||
heap[idx] = obj;
|
|
||||||
return idx;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getObject(idx) { return heap[idx]; }
|
|
||||||
|
|
||||||
function dropObject(idx) {
|
|
||||||
if (idx < 36) return;
|
|
||||||
heap[idx] = heap_next;
|
|
||||||
heap_next = idx;
|
|
||||||
}
|
|
||||||
|
|
||||||
function takeObject(idx) {
|
|
||||||
const ret = getObject(idx);
|
|
||||||
dropObject(idx);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
let WASM_VECTOR_LEN = 0;
|
let WASM_VECTOR_LEN = 0;
|
||||||
|
|
||||||
let cachedTextEncoder = new TextEncoder('utf-8');
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
||||||
|
@ -103,10 +103,6 @@
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isLikeNone(x) {
|
|
||||||
return x === undefined || x === null;
|
|
||||||
}
|
|
||||||
|
|
||||||
let cachegetInt32Memory0 = null;
|
let cachegetInt32Memory0 = null;
|
||||||
function getInt32Memory0() {
|
function getInt32Memory0() {
|
||||||
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
|
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
|
||||||
|
@ -115,6 +111,10 @@
|
||||||
return cachegetInt32Memory0;
|
return cachegetInt32Memory0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isLikeNone(x) {
|
||||||
|
return x === undefined || x === null;
|
||||||
|
}
|
||||||
|
|
||||||
let cachegetFloat64Memory0 = null;
|
let cachegetFloat64Memory0 = null;
|
||||||
function getFloat64Memory0() {
|
function getFloat64Memory0() {
|
||||||
if (cachegetFloat64Memory0 === null || cachegetFloat64Memory0.buffer !== wasm.memory.buffer) {
|
if (cachegetFloat64Memory0 === null || cachegetFloat64Memory0.buffer !== wasm.memory.buffer) {
|
||||||
|
@ -222,7 +222,7 @@
|
||||||
}
|
}
|
||||||
function __wbg_adapter_30(arg0, arg1, arg2) {
|
function __wbg_adapter_30(arg0, arg1, arg2) {
|
||||||
try {
|
try {
|
||||||
wasm._dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hdc2ddc54c8a3c664(arg0, arg1, addBorrowedObject(arg2));
|
wasm._dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5b943b18d2a1ef55(arg0, arg1, addBorrowedObject(arg2));
|
||||||
} finally {
|
} finally {
|
||||||
heap[stack_pointer++] = undefined;
|
heap[stack_pointer++] = undefined;
|
||||||
}
|
}
|
||||||
|
@ -250,7 +250,7 @@
|
||||||
return real;
|
return real;
|
||||||
}
|
}
|
||||||
function __wbg_adapter_33(arg0, arg1, arg2) {
|
function __wbg_adapter_33(arg0, arg1, arg2) {
|
||||||
wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h003394d482a337fe(arg0, arg1, addHeapObject(arg2));
|
wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1f3d1795f4b3ca23(arg0, arg1, addHeapObject(arg2));
|
||||||
}
|
}
|
||||||
|
|
||||||
function __wbg_adapter_36(arg0, arg1, arg2) {
|
function __wbg_adapter_36(arg0, arg1, arg2) {
|
||||||
|
@ -326,10 +326,6 @@
|
||||||
}
|
}
|
||||||
const imports = {};
|
const imports = {};
|
||||||
imports.wbg = {};
|
imports.wbg = {};
|
||||||
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
||||||
var ret = getStringFromWasm0(arg0, arg1);
|
|
||||||
return addHeapObject(ret);
|
|
||||||
};
|
|
||||||
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
||||||
takeObject(arg0);
|
takeObject(arg0);
|
||||||
};
|
};
|
||||||
|
@ -337,13 +333,9 @@
|
||||||
var ret = getObject(arg0);
|
var ret = getObject(arg0);
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
||||||
const obj = getObject(arg1);
|
var ret = getStringFromWasm0(arg0, arg1);
|
||||||
var ret = typeof(obj) === 'string' ? obj : undefined;
|
return addHeapObject(ret);
|
||||||
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
||||||
var len0 = WASM_VECTOR_LEN;
|
|
||||||
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
||||||
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
||||||
};
|
};
|
||||||
imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
|
imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
|
||||||
const obj = getObject(arg1);
|
const obj = getObject(arg1);
|
||||||
|
@ -353,6 +345,14 @@
|
||||||
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
||||||
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
||||||
};
|
};
|
||||||
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
||||||
|
const obj = getObject(arg1);
|
||||||
|
var ret = typeof(obj) === 'string' ? obj : undefined;
|
||||||
|
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||||
|
var len0 = WASM_VECTOR_LEN;
|
||||||
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
||||||
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
||||||
|
};
|
||||||
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
||||||
const obj = takeObject(arg0).original;
|
const obj = takeObject(arg0).original;
|
||||||
if (obj.cnt-- == 1) {
|
if (obj.cnt-- == 1) {
|
||||||
|
@ -445,10 +445,6 @@
|
||||||
var ret = getObject(arg0).fetch(getObject(arg1));
|
var ret = getObject(arg0).fetch(getObject(arg1));
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
imports.wbg.__wbg_documentElement_f68af1ca898aebe4 = function(arg0) {
|
|
||||||
var ret = getObject(arg0).documentElement;
|
|
||||||
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
||||||
};
|
|
||||||
imports.wbg.__wbg_body_78ae4fd43b446013 = function(arg0) {
|
imports.wbg.__wbg_body_78ae4fd43b446013 = function(arg0) {
|
||||||
var ret = getObject(arg0).body;
|
var ret = getObject(arg0).body;
|
||||||
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
||||||
|
@ -483,26 +479,6 @@
|
||||||
imports.wbg.__wbg_set_5357fedb30848723 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
imports.wbg.__wbg_set_5357fedb30848723 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
||||||
getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
||||||
}, arguments) };
|
}, arguments) };
|
||||||
imports.wbg.__wbg_instanceof_Response_e1b11afbefa5b563 = function(arg0) {
|
|
||||||
var ret = getObject(arg0) instanceof Response;
|
|
||||||
return ret;
|
|
||||||
};
|
|
||||||
imports.wbg.__wbg_status_6d8bb444ddc5a7b2 = function(arg0) {
|
|
||||||
var ret = getObject(arg0).status;
|
|
||||||
return ret;
|
|
||||||
};
|
|
||||||
imports.wbg.__wbg_headers_5ffa990806e04cfc = function(arg0) {
|
|
||||||
var ret = getObject(arg0).headers;
|
|
||||||
return addHeapObject(ret);
|
|
||||||
};
|
|
||||||
imports.wbg.__wbg_json_88cc6d5cf8f61121 = function() { return handleError(function (arg0) {
|
|
||||||
var ret = getObject(arg0).json();
|
|
||||||
return addHeapObject(ret);
|
|
||||||
}, arguments) };
|
|
||||||
imports.wbg.__wbg_text_8279d34d73e43c68 = function() { return handleError(function (arg0) {
|
|
||||||
var ret = getObject(arg0).text();
|
|
||||||
return addHeapObject(ret);
|
|
||||||
}, arguments) };
|
|
||||||
imports.wbg.__wbg_pathname_3570d699aa5b91aa = function(arg0, arg1) {
|
imports.wbg.__wbg_pathname_3570d699aa5b91aa = function(arg0, arg1) {
|
||||||
var ret = getObject(arg1).pathname;
|
var ret = getObject(arg1).pathname;
|
||||||
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||||
|
@ -524,6 +500,32 @@
|
||||||
imports.wbg.__wbg_setvalue_0a07023245efa3cc = function(arg0, arg1, arg2) {
|
imports.wbg.__wbg_setvalue_0a07023245efa3cc = function(arg0, arg1, arg2) {
|
||||||
getObject(arg0).value = getStringFromWasm0(arg1, arg2);
|
getObject(arg0).value = getStringFromWasm0(arg1, arg2);
|
||||||
};
|
};
|
||||||
|
imports.wbg.__wbg_instanceof_Response_e1b11afbefa5b563 = function(arg0) {
|
||||||
|
var ret = getObject(arg0) instanceof Response;
|
||||||
|
return ret;
|
||||||
|
};
|
||||||
|
imports.wbg.__wbg_status_6d8bb444ddc5a7b2 = function(arg0) {
|
||||||
|
var ret = getObject(arg0).status;
|
||||||
|
return ret;
|
||||||
|
};
|
||||||
|
imports.wbg.__wbg_headers_5ffa990806e04cfc = function(arg0) {
|
||||||
|
var ret = getObject(arg0).headers;
|
||||||
|
return addHeapObject(ret);
|
||||||
|
};
|
||||||
|
imports.wbg.__wbg_json_88cc6d5cf8f61121 = function() { return handleError(function (arg0) {
|
||||||
|
var ret = getObject(arg0).json();
|
||||||
|
return addHeapObject(ret);
|
||||||
|
}, arguments) };
|
||||||
|
imports.wbg.__wbg_text_8279d34d73e43c68 = function() { return handleError(function (arg0) {
|
||||||
|
var ret = getObject(arg0).text();
|
||||||
|
return addHeapObject(ret);
|
||||||
|
}, arguments) };
|
||||||
|
imports.wbg.__wbg_add_f36d97e1d70d27b0 = function() { return handleError(function (arg0, arg1, arg2) {
|
||||||
|
getObject(arg0).add(getStringFromWasm0(arg1, arg2));
|
||||||
|
}, arguments) };
|
||||||
|
imports.wbg.__wbg_remove_89670e56a41482a8 = function() { return handleError(function (arg0, arg1, arg2) {
|
||||||
|
getObject(arg0).remove(getStringFromWasm0(arg1, arg2));
|
||||||
|
}, arguments) };
|
||||||
imports.wbg.__wbg_get_49ddec76fecb886f = function() { return handleError(function (arg0, arg1) {
|
imports.wbg.__wbg_get_49ddec76fecb886f = function() { return handleError(function (arg0, arg1) {
|
||||||
var ret = getObject(arg0).get(getObject(arg1));
|
var ret = getObject(arg0).get(getObject(arg1));
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
|
@ -575,10 +577,6 @@
|
||||||
imports.wbg.__wbg_preventDefault_9866c9fd51eecfb6 = function(arg0) {
|
imports.wbg.__wbg_preventDefault_9866c9fd51eecfb6 = function(arg0) {
|
||||||
getObject(arg0).preventDefault();
|
getObject(arg0).preventDefault();
|
||||||
};
|
};
|
||||||
imports.wbg.__wbg_getClientExtensionResults_73fef7f1197950fb = function(arg0) {
|
|
||||||
var ret = getObject(arg0).getClientExtensionResults();
|
|
||||||
return addHeapObject(ret);
|
|
||||||
};
|
|
||||||
imports.wbg.__wbg_instanceof_HtmlDocument_1faa18f5a2da6fb3 = function(arg0) {
|
imports.wbg.__wbg_instanceof_HtmlDocument_1faa18f5a2da6fb3 = function(arg0) {
|
||||||
var ret = getObject(arg0) instanceof HTMLDocument;
|
var ret = getObject(arg0) instanceof HTMLDocument;
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -590,8 +588,8 @@
|
||||||
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
||||||
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
||||||
}, arguments) };
|
}, arguments) };
|
||||||
imports.wbg.__wbg_credentials_5339e35d156d6605 = function(arg0) {
|
imports.wbg.__wbg_getClientExtensionResults_73fef7f1197950fb = function(arg0) {
|
||||||
var ret = getObject(arg0).credentials;
|
var ret = getObject(arg0).getClientExtensionResults();
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
imports.wbg.__wbg_instanceof_Element_97d85e53f1805b82 = function(arg0) {
|
imports.wbg.__wbg_instanceof_Element_97d85e53f1805b82 = function(arg0) {
|
||||||
|
@ -605,6 +603,10 @@
|
||||||
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
||||||
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
||||||
};
|
};
|
||||||
|
imports.wbg.__wbg_classList_b666640fdfbcc8ab = function(arg0) {
|
||||||
|
var ret = getObject(arg0).classList;
|
||||||
|
return addHeapObject(ret);
|
||||||
|
};
|
||||||
imports.wbg.__wbg_removeAttribute_eea03ed128669b8f = function() { return handleError(function (arg0, arg1, arg2) {
|
imports.wbg.__wbg_removeAttribute_eea03ed128669b8f = function() { return handleError(function (arg0, arg1, arg2) {
|
||||||
getObject(arg0).removeAttribute(getStringFromWasm0(arg1, arg2));
|
getObject(arg0).removeAttribute(getStringFromWasm0(arg1, arg2));
|
||||||
}, arguments) };
|
}, arguments) };
|
||||||
|
@ -624,6 +626,13 @@
|
||||||
imports.wbg.__wbg_removeEventListener_24d5a7c12c3f3c39 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
imports.wbg.__wbg_removeEventListener_24d5a7c12c3f3c39 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
||||||
getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), arg4 !== 0);
|
getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), arg4 !== 0);
|
||||||
}, arguments) };
|
}, arguments) };
|
||||||
|
imports.wbg.__wbg_credentials_5339e35d156d6605 = function(arg0) {
|
||||||
|
var ret = getObject(arg0).credentials;
|
||||||
|
return addHeapObject(ret);
|
||||||
|
};
|
||||||
|
imports.wbg.__wbg_pushState_f772e11155235e9c = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
||||||
|
getObject(arg0).pushState(getObject(arg1), getStringFromWasm0(arg2, arg3), arg4 === 0 ? undefined : getStringFromWasm0(arg4, arg5));
|
||||||
|
}, arguments) };
|
||||||
imports.wbg.__wbg_parentElement_0253a5d6c3ff0ba5 = function(arg0) {
|
imports.wbg.__wbg_parentElement_0253a5d6c3ff0ba5 = function(arg0) {
|
||||||
var ret = getObject(arg0).parentElement;
|
var ret = getObject(arg0).parentElement;
|
||||||
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
||||||
|
@ -647,9 +656,6 @@
|
||||||
var ret = getObject(arg0).removeChild(getObject(arg1));
|
var ret = getObject(arg0).removeChild(getObject(arg1));
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
}, arguments) };
|
}, arguments) };
|
||||||
imports.wbg.__wbg_pushState_f772e11155235e9c = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
||||||
getObject(arg0).pushState(getObject(arg1), getStringFromWasm0(arg2, arg3), arg4 === 0 ? undefined : getStringFromWasm0(arg4, arg5));
|
|
||||||
}, arguments) };
|
|
||||||
imports.wbg.__wbg_pathname_32da720074d17e34 = function() { return handleError(function (arg0, arg1) {
|
imports.wbg.__wbg_pathname_32da720074d17e34 = function() { return handleError(function (arg0, arg1) {
|
||||||
var ret = getObject(arg1).pathname;
|
var ret = getObject(arg1).pathname;
|
||||||
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||||
|
@ -793,16 +799,16 @@
|
||||||
var ret = wasm.memory;
|
var ret = wasm.memory;
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
imports.wbg.__wbindgen_closure_wrapper1171 = function(arg0, arg1, arg2) {
|
imports.wbg.__wbindgen_closure_wrapper1165 = function(arg0, arg1, arg2) {
|
||||||
var ret = makeMutClosure(arg0, arg1, 487, __wbg_adapter_30);
|
var ret = makeMutClosure(arg0, arg1, 484, __wbg_adapter_30);
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
imports.wbg.__wbindgen_closure_wrapper1361 = function(arg0, arg1, arg2) {
|
imports.wbg.__wbindgen_closure_wrapper1355 = function(arg0, arg1, arg2) {
|
||||||
var ret = makeClosure(arg0, arg1, 532, __wbg_adapter_33);
|
var ret = makeClosure(arg0, arg1, 529, __wbg_adapter_33);
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
imports.wbg.__wbindgen_closure_wrapper1498 = function(arg0, arg1, arg2) {
|
imports.wbg.__wbindgen_closure_wrapper1491 = function(arg0, arg1, arg2) {
|
||||||
var ret = makeMutClosure(arg0, arg1, 571, __wbg_adapter_36);
|
var ret = makeMutClosure(arg0, arg1, 568, __wbg_adapter_36);
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,35 @@
|
||||||
|
|
||||||
let wasm;
|
let wasm;
|
||||||
|
|
||||||
|
const heap = new Array(32).fill(undefined);
|
||||||
|
|
||||||
|
heap.push(undefined, null, true, false);
|
||||||
|
|
||||||
|
function getObject(idx) { return heap[idx]; }
|
||||||
|
|
||||||
|
let heap_next = heap.length;
|
||||||
|
|
||||||
|
function dropObject(idx) {
|
||||||
|
if (idx < 36) return;
|
||||||
|
heap[idx] = heap_next;
|
||||||
|
heap_next = idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
function takeObject(idx) {
|
||||||
|
const ret = getObject(idx);
|
||||||
|
dropObject(idx);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
function addHeapObject(obj) {
|
||||||
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
||||||
|
const idx = heap_next;
|
||||||
|
heap_next = heap[idx];
|
||||||
|
|
||||||
|
heap[idx] = obj;
|
||||||
|
return idx;
|
||||||
|
}
|
||||||
|
|
||||||
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
||||||
|
|
||||||
cachedTextDecoder.decode();
|
cachedTextDecoder.decode();
|
||||||
|
@ -17,35 +46,6 @@ function getStringFromWasm0(ptr, len) {
|
||||||
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
||||||
}
|
}
|
||||||
|
|
||||||
const heap = new Array(32).fill(undefined);
|
|
||||||
|
|
||||||
heap.push(undefined, null, true, false);
|
|
||||||
|
|
||||||
let heap_next = heap.length;
|
|
||||||
|
|
||||||
function addHeapObject(obj) {
|
|
||||||
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
||||||
const idx = heap_next;
|
|
||||||
heap_next = heap[idx];
|
|
||||||
|
|
||||||
heap[idx] = obj;
|
|
||||||
return idx;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getObject(idx) { return heap[idx]; }
|
|
||||||
|
|
||||||
function dropObject(idx) {
|
|
||||||
if (idx < 36) return;
|
|
||||||
heap[idx] = heap_next;
|
|
||||||
heap_next = idx;
|
|
||||||
}
|
|
||||||
|
|
||||||
function takeObject(idx) {
|
|
||||||
const ret = getObject(idx);
|
|
||||||
dropObject(idx);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
let WASM_VECTOR_LEN = 0;
|
let WASM_VECTOR_LEN = 0;
|
||||||
|
|
||||||
let cachedTextEncoder = new TextEncoder('utf-8');
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
||||||
|
@ -101,10 +101,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isLikeNone(x) {
|
|
||||||
return x === undefined || x === null;
|
|
||||||
}
|
|
||||||
|
|
||||||
let cachegetInt32Memory0 = null;
|
let cachegetInt32Memory0 = null;
|
||||||
function getInt32Memory0() {
|
function getInt32Memory0() {
|
||||||
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
|
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
|
||||||
|
@ -113,6 +109,10 @@ function getInt32Memory0() {
|
||||||
return cachegetInt32Memory0;
|
return cachegetInt32Memory0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isLikeNone(x) {
|
||||||
|
return x === undefined || x === null;
|
||||||
|
}
|
||||||
|
|
||||||
let cachegetFloat64Memory0 = null;
|
let cachegetFloat64Memory0 = null;
|
||||||
function getFloat64Memory0() {
|
function getFloat64Memory0() {
|
||||||
if (cachegetFloat64Memory0 === null || cachegetFloat64Memory0.buffer !== wasm.memory.buffer) {
|
if (cachegetFloat64Memory0 === null || cachegetFloat64Memory0.buffer !== wasm.memory.buffer) {
|
||||||
|
@ -220,7 +220,7 @@ function addBorrowedObject(obj) {
|
||||||
}
|
}
|
||||||
function __wbg_adapter_30(arg0, arg1, arg2) {
|
function __wbg_adapter_30(arg0, arg1, arg2) {
|
||||||
try {
|
try {
|
||||||
wasm._dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hdc2ddc54c8a3c664(arg0, arg1, addBorrowedObject(arg2));
|
wasm._dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5b943b18d2a1ef55(arg0, arg1, addBorrowedObject(arg2));
|
||||||
} finally {
|
} finally {
|
||||||
heap[stack_pointer++] = undefined;
|
heap[stack_pointer++] = undefined;
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,7 @@ function makeClosure(arg0, arg1, dtor, f) {
|
||||||
return real;
|
return real;
|
||||||
}
|
}
|
||||||
function __wbg_adapter_33(arg0, arg1, arg2) {
|
function __wbg_adapter_33(arg0, arg1, arg2) {
|
||||||
wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h003394d482a337fe(arg0, arg1, addHeapObject(arg2));
|
wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1f3d1795f4b3ca23(arg0, arg1, addHeapObject(arg2));
|
||||||
}
|
}
|
||||||
|
|
||||||
function __wbg_adapter_36(arg0, arg1, arg2) {
|
function __wbg_adapter_36(arg0, arg1, arg2) {
|
||||||
|
@ -324,10 +324,6 @@ async function init(input) {
|
||||||
}
|
}
|
||||||
const imports = {};
|
const imports = {};
|
||||||
imports.wbg = {};
|
imports.wbg = {};
|
||||||
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
||||||
var ret = getStringFromWasm0(arg0, arg1);
|
|
||||||
return addHeapObject(ret);
|
|
||||||
};
|
|
||||||
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
||||||
takeObject(arg0);
|
takeObject(arg0);
|
||||||
};
|
};
|
||||||
|
@ -335,13 +331,9 @@ async function init(input) {
|
||||||
var ret = getObject(arg0);
|
var ret = getObject(arg0);
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
||||||
const obj = getObject(arg1);
|
var ret = getStringFromWasm0(arg0, arg1);
|
||||||
var ret = typeof(obj) === 'string' ? obj : undefined;
|
return addHeapObject(ret);
|
||||||
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
||||||
var len0 = WASM_VECTOR_LEN;
|
|
||||||
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
||||||
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
||||||
};
|
};
|
||||||
imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
|
imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
|
||||||
const obj = getObject(arg1);
|
const obj = getObject(arg1);
|
||||||
|
@ -351,6 +343,14 @@ async function init(input) {
|
||||||
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
||||||
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
||||||
};
|
};
|
||||||
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
||||||
|
const obj = getObject(arg1);
|
||||||
|
var ret = typeof(obj) === 'string' ? obj : undefined;
|
||||||
|
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||||
|
var len0 = WASM_VECTOR_LEN;
|
||||||
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
||||||
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
||||||
|
};
|
||||||
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
||||||
const obj = takeObject(arg0).original;
|
const obj = takeObject(arg0).original;
|
||||||
if (obj.cnt-- == 1) {
|
if (obj.cnt-- == 1) {
|
||||||
|
@ -443,10 +443,6 @@ async function init(input) {
|
||||||
var ret = getObject(arg0).fetch(getObject(arg1));
|
var ret = getObject(arg0).fetch(getObject(arg1));
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
imports.wbg.__wbg_documentElement_f68af1ca898aebe4 = function(arg0) {
|
|
||||||
var ret = getObject(arg0).documentElement;
|
|
||||||
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
||||||
};
|
|
||||||
imports.wbg.__wbg_body_78ae4fd43b446013 = function(arg0) {
|
imports.wbg.__wbg_body_78ae4fd43b446013 = function(arg0) {
|
||||||
var ret = getObject(arg0).body;
|
var ret = getObject(arg0).body;
|
||||||
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
||||||
|
@ -481,26 +477,6 @@ async function init(input) {
|
||||||
imports.wbg.__wbg_set_5357fedb30848723 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
imports.wbg.__wbg_set_5357fedb30848723 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
||||||
getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
||||||
}, arguments) };
|
}, arguments) };
|
||||||
imports.wbg.__wbg_instanceof_Response_e1b11afbefa5b563 = function(arg0) {
|
|
||||||
var ret = getObject(arg0) instanceof Response;
|
|
||||||
return ret;
|
|
||||||
};
|
|
||||||
imports.wbg.__wbg_status_6d8bb444ddc5a7b2 = function(arg0) {
|
|
||||||
var ret = getObject(arg0).status;
|
|
||||||
return ret;
|
|
||||||
};
|
|
||||||
imports.wbg.__wbg_headers_5ffa990806e04cfc = function(arg0) {
|
|
||||||
var ret = getObject(arg0).headers;
|
|
||||||
return addHeapObject(ret);
|
|
||||||
};
|
|
||||||
imports.wbg.__wbg_json_88cc6d5cf8f61121 = function() { return handleError(function (arg0) {
|
|
||||||
var ret = getObject(arg0).json();
|
|
||||||
return addHeapObject(ret);
|
|
||||||
}, arguments) };
|
|
||||||
imports.wbg.__wbg_text_8279d34d73e43c68 = function() { return handleError(function (arg0) {
|
|
||||||
var ret = getObject(arg0).text();
|
|
||||||
return addHeapObject(ret);
|
|
||||||
}, arguments) };
|
|
||||||
imports.wbg.__wbg_pathname_3570d699aa5b91aa = function(arg0, arg1) {
|
imports.wbg.__wbg_pathname_3570d699aa5b91aa = function(arg0, arg1) {
|
||||||
var ret = getObject(arg1).pathname;
|
var ret = getObject(arg1).pathname;
|
||||||
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||||
|
@ -522,6 +498,32 @@ async function init(input) {
|
||||||
imports.wbg.__wbg_setvalue_0a07023245efa3cc = function(arg0, arg1, arg2) {
|
imports.wbg.__wbg_setvalue_0a07023245efa3cc = function(arg0, arg1, arg2) {
|
||||||
getObject(arg0).value = getStringFromWasm0(arg1, arg2);
|
getObject(arg0).value = getStringFromWasm0(arg1, arg2);
|
||||||
};
|
};
|
||||||
|
imports.wbg.__wbg_instanceof_Response_e1b11afbefa5b563 = function(arg0) {
|
||||||
|
var ret = getObject(arg0) instanceof Response;
|
||||||
|
return ret;
|
||||||
|
};
|
||||||
|
imports.wbg.__wbg_status_6d8bb444ddc5a7b2 = function(arg0) {
|
||||||
|
var ret = getObject(arg0).status;
|
||||||
|
return ret;
|
||||||
|
};
|
||||||
|
imports.wbg.__wbg_headers_5ffa990806e04cfc = function(arg0) {
|
||||||
|
var ret = getObject(arg0).headers;
|
||||||
|
return addHeapObject(ret);
|
||||||
|
};
|
||||||
|
imports.wbg.__wbg_json_88cc6d5cf8f61121 = function() { return handleError(function (arg0) {
|
||||||
|
var ret = getObject(arg0).json();
|
||||||
|
return addHeapObject(ret);
|
||||||
|
}, arguments) };
|
||||||
|
imports.wbg.__wbg_text_8279d34d73e43c68 = function() { return handleError(function (arg0) {
|
||||||
|
var ret = getObject(arg0).text();
|
||||||
|
return addHeapObject(ret);
|
||||||
|
}, arguments) };
|
||||||
|
imports.wbg.__wbg_add_f36d97e1d70d27b0 = function() { return handleError(function (arg0, arg1, arg2) {
|
||||||
|
getObject(arg0).add(getStringFromWasm0(arg1, arg2));
|
||||||
|
}, arguments) };
|
||||||
|
imports.wbg.__wbg_remove_89670e56a41482a8 = function() { return handleError(function (arg0, arg1, arg2) {
|
||||||
|
getObject(arg0).remove(getStringFromWasm0(arg1, arg2));
|
||||||
|
}, arguments) };
|
||||||
imports.wbg.__wbg_get_49ddec76fecb886f = function() { return handleError(function (arg0, arg1) {
|
imports.wbg.__wbg_get_49ddec76fecb886f = function() { return handleError(function (arg0, arg1) {
|
||||||
var ret = getObject(arg0).get(getObject(arg1));
|
var ret = getObject(arg0).get(getObject(arg1));
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
|
@ -573,10 +575,6 @@ async function init(input) {
|
||||||
imports.wbg.__wbg_preventDefault_9866c9fd51eecfb6 = function(arg0) {
|
imports.wbg.__wbg_preventDefault_9866c9fd51eecfb6 = function(arg0) {
|
||||||
getObject(arg0).preventDefault();
|
getObject(arg0).preventDefault();
|
||||||
};
|
};
|
||||||
imports.wbg.__wbg_getClientExtensionResults_73fef7f1197950fb = function(arg0) {
|
|
||||||
var ret = getObject(arg0).getClientExtensionResults();
|
|
||||||
return addHeapObject(ret);
|
|
||||||
};
|
|
||||||
imports.wbg.__wbg_instanceof_HtmlDocument_1faa18f5a2da6fb3 = function(arg0) {
|
imports.wbg.__wbg_instanceof_HtmlDocument_1faa18f5a2da6fb3 = function(arg0) {
|
||||||
var ret = getObject(arg0) instanceof HTMLDocument;
|
var ret = getObject(arg0) instanceof HTMLDocument;
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -588,8 +586,8 @@ async function init(input) {
|
||||||
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
||||||
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
||||||
}, arguments) };
|
}, arguments) };
|
||||||
imports.wbg.__wbg_credentials_5339e35d156d6605 = function(arg0) {
|
imports.wbg.__wbg_getClientExtensionResults_73fef7f1197950fb = function(arg0) {
|
||||||
var ret = getObject(arg0).credentials;
|
var ret = getObject(arg0).getClientExtensionResults();
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
imports.wbg.__wbg_instanceof_Element_97d85e53f1805b82 = function(arg0) {
|
imports.wbg.__wbg_instanceof_Element_97d85e53f1805b82 = function(arg0) {
|
||||||
|
@ -603,6 +601,10 @@ async function init(input) {
|
||||||
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
||||||
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
||||||
};
|
};
|
||||||
|
imports.wbg.__wbg_classList_b666640fdfbcc8ab = function(arg0) {
|
||||||
|
var ret = getObject(arg0).classList;
|
||||||
|
return addHeapObject(ret);
|
||||||
|
};
|
||||||
imports.wbg.__wbg_removeAttribute_eea03ed128669b8f = function() { return handleError(function (arg0, arg1, arg2) {
|
imports.wbg.__wbg_removeAttribute_eea03ed128669b8f = function() { return handleError(function (arg0, arg1, arg2) {
|
||||||
getObject(arg0).removeAttribute(getStringFromWasm0(arg1, arg2));
|
getObject(arg0).removeAttribute(getStringFromWasm0(arg1, arg2));
|
||||||
}, arguments) };
|
}, arguments) };
|
||||||
|
@ -622,6 +624,13 @@ async function init(input) {
|
||||||
imports.wbg.__wbg_removeEventListener_24d5a7c12c3f3c39 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
imports.wbg.__wbg_removeEventListener_24d5a7c12c3f3c39 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
||||||
getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), arg4 !== 0);
|
getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), arg4 !== 0);
|
||||||
}, arguments) };
|
}, arguments) };
|
||||||
|
imports.wbg.__wbg_credentials_5339e35d156d6605 = function(arg0) {
|
||||||
|
var ret = getObject(arg0).credentials;
|
||||||
|
return addHeapObject(ret);
|
||||||
|
};
|
||||||
|
imports.wbg.__wbg_pushState_f772e11155235e9c = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
||||||
|
getObject(arg0).pushState(getObject(arg1), getStringFromWasm0(arg2, arg3), arg4 === 0 ? undefined : getStringFromWasm0(arg4, arg5));
|
||||||
|
}, arguments) };
|
||||||
imports.wbg.__wbg_parentElement_0253a5d6c3ff0ba5 = function(arg0) {
|
imports.wbg.__wbg_parentElement_0253a5d6c3ff0ba5 = function(arg0) {
|
||||||
var ret = getObject(arg0).parentElement;
|
var ret = getObject(arg0).parentElement;
|
||||||
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
||||||
|
@ -645,9 +654,6 @@ async function init(input) {
|
||||||
var ret = getObject(arg0).removeChild(getObject(arg1));
|
var ret = getObject(arg0).removeChild(getObject(arg1));
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
}, arguments) };
|
}, arguments) };
|
||||||
imports.wbg.__wbg_pushState_f772e11155235e9c = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
||||||
getObject(arg0).pushState(getObject(arg1), getStringFromWasm0(arg2, arg3), arg4 === 0 ? undefined : getStringFromWasm0(arg4, arg5));
|
|
||||||
}, arguments) };
|
|
||||||
imports.wbg.__wbg_pathname_32da720074d17e34 = function() { return handleError(function (arg0, arg1) {
|
imports.wbg.__wbg_pathname_32da720074d17e34 = function() { return handleError(function (arg0, arg1) {
|
||||||
var ret = getObject(arg1).pathname;
|
var ret = getObject(arg1).pathname;
|
||||||
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||||
|
@ -791,16 +797,16 @@ async function init(input) {
|
||||||
var ret = wasm.memory;
|
var ret = wasm.memory;
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
imports.wbg.__wbindgen_closure_wrapper1171 = function(arg0, arg1, arg2) {
|
imports.wbg.__wbindgen_closure_wrapper1165 = function(arg0, arg1, arg2) {
|
||||||
var ret = makeMutClosure(arg0, arg1, 487, __wbg_adapter_30);
|
var ret = makeMutClosure(arg0, arg1, 484, __wbg_adapter_30);
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
imports.wbg.__wbindgen_closure_wrapper1361 = function(arg0, arg1, arg2) {
|
imports.wbg.__wbindgen_closure_wrapper1355 = function(arg0, arg1, arg2) {
|
||||||
var ret = makeClosure(arg0, arg1, 532, __wbg_adapter_33);
|
var ret = makeClosure(arg0, arg1, 529, __wbg_adapter_33);
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
imports.wbg.__wbindgen_closure_wrapper1498 = function(arg0, arg1, arg2) {
|
imports.wbg.__wbindgen_closure_wrapper1491 = function(arg0, arg1, arg2) {
|
||||||
var ret = makeMutClosure(arg0, arg1, 571, __wbg_adapter_36);
|
var ret = makeMutClosure(arg0, arg1, 568, __wbg_adapter_36);
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -4,7 +4,7 @@
|
||||||
"William Brown <william@blackhats.net.au>"
|
"William Brown <william@blackhats.net.au>"
|
||||||
],
|
],
|
||||||
"description": "Kanidm Server Web User Interface",
|
"description": "Kanidm Server Web User Interface",
|
||||||
"version": "1.1.0-alpha.6",
|
"version": "1.1.0-alpha.7",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
.html-body {
|
html,
|
||||||
|
body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-body {
|
.form-signin-body {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-top: 40px;
|
padding-top: 40px;
|
||||||
|
|
|
@ -13,6 +13,6 @@ mod views;
|
||||||
|
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
pub fn run_app() -> Result<(), JsValue> {
|
pub fn run_app() -> Result<(), JsValue> {
|
||||||
yew::start_app_as_body::<manager::ManagerApp>();
|
yew::start_app::<manager::ManagerApp>();
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,7 +183,11 @@ impl LoginApp {
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<form
|
<form
|
||||||
onsubmit={ ctx.link().callback(|_| LoginAppMsg::Begin) }
|
onsubmit={ ctx.link().callback(|e: FocusEvent| {
|
||||||
|
console::log!("login::view_state -> Init - prevent_default()");
|
||||||
|
e.prevent_default();
|
||||||
|
LoginAppMsg::Begin
|
||||||
|
} ) }
|
||||||
action="javascript:void(0);"
|
action="javascript:void(0);"
|
||||||
>
|
>
|
||||||
<input id="autofocus"
|
<input id="autofocus"
|
||||||
|
@ -231,7 +235,11 @@ impl LoginApp {
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<form
|
<form
|
||||||
onsubmit={ ctx.link().callback(|_| LoginAppMsg::PasswordSubmit) }
|
onsubmit={ ctx.link().callback(|e: FocusEvent| {
|
||||||
|
console::log!("login::view_state -> Password - prevent_default()");
|
||||||
|
e.prevent_default();
|
||||||
|
LoginAppMsg::PasswordSubmit
|
||||||
|
} ) }
|
||||||
action="javascript:void(0);"
|
action="javascript:void(0);"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
|
@ -258,7 +266,11 @@ impl LoginApp {
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<form
|
<form
|
||||||
onsubmit={ ctx.link().callback(|_| LoginAppMsg::BackupCodeSubmit) }
|
onsubmit={ ctx.link().callback(|e: FocusEvent| {
|
||||||
|
console::log!("login::view_state -> BackupCode - prevent_default()");
|
||||||
|
e.prevent_default();
|
||||||
|
LoginAppMsg::BackupCodeSubmit
|
||||||
|
} ) }
|
||||||
action="javascript:void(0);"
|
action="javascript:void(0);"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
|
@ -286,7 +298,11 @@ impl LoginApp {
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<form
|
<form
|
||||||
onsubmit={ ctx.link().callback(|_| LoginAppMsg::TotpSubmit) }
|
onsubmit={ ctx.link().callback(|e: FocusEvent| {
|
||||||
|
console::log!("login::view_state -> Totp - prevent_default()");
|
||||||
|
e.prevent_default();
|
||||||
|
LoginAppMsg::TotpSubmit
|
||||||
|
} ) }
|
||||||
action="javascript:void(0);"
|
action="javascript:void(0);"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
|
@ -419,6 +435,10 @@ impl Component for LoginApp {
|
||||||
let state = LoginState::Init(true);
|
let state = LoginState::Init(true);
|
||||||
// startConfetti();
|
// startConfetti();
|
||||||
|
|
||||||
|
if let Err(e) = crate::utils::body().class_list().add_1("form-signin-body") {
|
||||||
|
console::log!(format!("class_list add error -> {:?}", e).as_str());
|
||||||
|
};
|
||||||
|
|
||||||
LoginApp {
|
LoginApp {
|
||||||
inputvalue,
|
inputvalue,
|
||||||
session_id: "".to_string(),
|
session_id: "".to_string(),
|
||||||
|
@ -688,6 +708,7 @@ impl Component for LoginApp {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn view(&self, ctx: &Context<Self>) -> Html {
|
fn view(&self, ctx: &Context<Self>) -> Html {
|
||||||
|
console::log!("login::view");
|
||||||
// How do we add a top level theme?
|
// How do we add a top level theme?
|
||||||
/*
|
/*
|
||||||
let (width, height): (u32, u32) = if let Some(win) = web_sys::window() {
|
let (width, height): (u32, u32) = if let Some(win) = web_sys::window() {
|
||||||
|
@ -704,15 +725,26 @@ impl Component for LoginApp {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// <canvas id="confetti-canvas" style="position:absolute" width=width height=height></canvas>
|
// <canvas id="confetti-canvas" style="position:absolute" width=width height=height></canvas>
|
||||||
|
|
||||||
|
// May need to set these classes?
|
||||||
|
// <body class="html-body form-body">
|
||||||
html! {
|
html! {
|
||||||
<body class="html-body form-body">
|
|
||||||
<main class="form-signin">
|
<main class="form-signin">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2>{ "Kanidm Alpha 🦀 " }</h2>
|
<h2>{ "Kanidm Alpha 🦀 " }</h2>
|
||||||
</div>
|
</div>
|
||||||
{ self.view_state(ctx) }
|
{ self.view_state(ctx) }
|
||||||
</main>
|
</main>
|
||||||
</body>
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn destroy(&mut self, _ctx: &Context<Self>) {
|
||||||
|
console::log!("login::destroy");
|
||||||
|
if let Err(e) = crate::utils::body()
|
||||||
|
.class_list()
|
||||||
|
.remove_1("form-signin-body")
|
||||||
|
{
|
||||||
|
console::log!(format!("class_list remove error -> {:?}", e).as_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ pub enum Route {
|
||||||
fn landing() -> Html {
|
fn landing() -> Html {
|
||||||
// Do this to allow use_history to work because lol.
|
// Do this to allow use_history to work because lol.
|
||||||
use_history().unwrap().push(Route::Index);
|
use_history().unwrap().push(Route::Index);
|
||||||
html! { <body></body> }
|
html! { <main></main> }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn switch(routes: &Route) -> Html {
|
fn switch(routes: &Route) -> Html {
|
||||||
|
@ -49,28 +49,26 @@ fn switch(routes: &Route) -> Html {
|
||||||
Route::Oauth2 => html! { <Oauth2App /> },
|
Route::Oauth2 => html! { <Oauth2App /> },
|
||||||
Route::NotFound => {
|
Route::NotFound => {
|
||||||
html! {
|
html! {
|
||||||
<body>
|
<main>
|
||||||
<h1>{ "404" }</h1>
|
<h1>{ "404" }</h1>
|
||||||
<Link<Route> to={ Route::Index }>
|
<Link<Route> to={ Route::Index }>
|
||||||
{ "Home" }
|
{ "Home" }
|
||||||
</Link<Route>>
|
</Link<Route>>
|
||||||
</body>
|
</main>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct ManagerApp {
|
pub struct ManagerApp {}
|
||||||
is_ready: bool,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Component for ManagerApp {
|
impl Component for ManagerApp {
|
||||||
type Message = bool;
|
type Message = ();
|
||||||
type Properties = ();
|
type Properties = ();
|
||||||
|
|
||||||
fn create(_ctx: &Context<Self>) -> Self {
|
fn create(_ctx: &Context<Self>) -> Self {
|
||||||
console::log!("manager::create");
|
console::log!("manager::create");
|
||||||
ManagerApp { is_ready: false }
|
ManagerApp {}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn changed(&mut self, _ctx: &Context<Self>) -> bool {
|
fn changed(&mut self, _ctx: &Context<Self>) -> bool {
|
||||||
|
@ -78,47 +76,22 @@ impl Component for ManagerApp {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update(&mut self, _ctx: &Context<Self>, msg: Self::Message) -> bool {
|
fn update(&mut self, _ctx: &Context<Self>, _msg: Self::Message) -> bool {
|
||||||
console::log!("manager::update");
|
console::log!("manager::update");
|
||||||
self.is_ready = msg;
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
fn rendered(&mut self, ctx: &Context<Self>, first_render: bool) {
|
fn rendered(&mut self, _ctx: &Context<Self>, _first_render: bool) {
|
||||||
console::log!("manager::rendered");
|
console::log!("manager::rendered");
|
||||||
if first_render {
|
|
||||||
// Can only access the current_route AFTER it renders.
|
// Can only access the current_route AFTER it renders.
|
||||||
// console::log!(format!("{:?}", yew_router::current_route::<Route>()).as_str())
|
// console::log!(format!("{:?}", yew_router::current_route::<Route>()).as_str())
|
||||||
ctx.link().send_message(first_render)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn view(&self, _ctx: &Context<Self>) -> Html {
|
fn view(&self, _ctx: &Context<Self>) -> Html {
|
||||||
html! {
|
|
||||||
<>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
<title>{ "Kanidm" }</title>
|
|
||||||
<link rel="stylesheet" href="/pkg/external/bootstrap.min.css" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"/>
|
|
||||||
<link rel="stylesheet" href="/pkg/style.css"/>
|
|
||||||
<script src="/pkg/external/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"></script>
|
|
||||||
<script src="/pkg/external/confetti.js"></script>
|
|
||||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🦀</text></svg>" />
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
{
|
|
||||||
if self.is_ready {
|
|
||||||
html! {
|
html! {
|
||||||
<BrowserRouter>
|
<BrowserRouter>
|
||||||
<Switch<Route> render={ Switch::render(switch) } />
|
<Switch<Route> render={ Switch::render(switch) } />
|
||||||
</BrowserRouter>
|
</BrowserRouter>
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
html! { <body></body> }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
pub fn get_bearer_token() -> Option<String> {
|
pub fn get_bearer_token() -> Option<String> {
|
||||||
let prev_session: Result<String, _> = PersistentStorage::get("kanidm_bearer_token");
|
let prev_session: Result<String, _> = PersistentStorage::get("kanidm_bearer_token");
|
||||||
console::log!(format!("prev_session -> {:?}", prev_session).as_str());
|
console::log!(format!("kanidm_bearer_token -> {:?}", prev_session).as_str());
|
||||||
|
|
||||||
prev_session.ok()
|
prev_session.ok()
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,6 +204,10 @@ impl Component for Oauth2App {
|
||||||
models::pop_oauth2_authorisation_request()
|
models::pop_oauth2_authorisation_request()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if let Err(e) = crate::utils::body().class_list().add_1("form-signin-body") {
|
||||||
|
console::log!(format!("class_list add error -> {:?}", e).as_str());
|
||||||
|
};
|
||||||
|
|
||||||
// If we have neither we need to say that we can not proceed at all.
|
// If we have neither we need to say that we can not proceed at all.
|
||||||
let query = match query {
|
let query = match query {
|
||||||
Some(q) => q,
|
Some(q) => q,
|
||||||
|
@ -355,49 +359,62 @@ impl Component for Oauth2App {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn view(&self, ctx: &Context<Self>) -> Html {
|
fn view(&self, ctx: &Context<Self>) -> Html {
|
||||||
|
console::log!("login::view");
|
||||||
match &self.state {
|
match &self.state {
|
||||||
State::LoginRequired => {
|
State::LoginRequired => {
|
||||||
|
// <body class="html-body form-body">
|
||||||
|
|
||||||
html! {
|
html! {
|
||||||
<body class="html-body form-body">
|
|
||||||
<main class="form-signin">
|
<main class="form-signin">
|
||||||
<form
|
<form
|
||||||
onsubmit={ ctx.link().callback(|_| Oauth2Msg::LoginProceed) }
|
onsubmit={ ctx.link().callback(|e: FocusEvent| {
|
||||||
|
console::log!("oauth2::view -> LoginRequired - prevent_default()");
|
||||||
|
e.prevent_default();
|
||||||
|
Oauth2Msg::LoginProceed
|
||||||
|
} ) }
|
||||||
action="javascript:void(0);"
|
action="javascript:void(0);"
|
||||||
>
|
>
|
||||||
<h1 class="h3 mb-3 fw-normal">{" Sign in to proceed" }</h1>
|
<h1 class="h3 mb-3 fw-normal">{" Sign in to proceed" }</h1>
|
||||||
<button id="autofocus" class="w-100 btn btn-lg btn-primary" type="submit">{ "Sign in" }</button>
|
<button id="autofocus" class="w-100 btn btn-lg btn-primary" type="submit">{ "Sign in" }</button>
|
||||||
</form>
|
</form>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
State::Consent(_, query) => {
|
State::Consent(_, query) => {
|
||||||
let client_name = query.client_name.clone();
|
let client_name = query.client_name.clone();
|
||||||
|
// <body class="html-body form-body">
|
||||||
html! {
|
html! {
|
||||||
<body class="html-body form-body">
|
|
||||||
<main class="form-signin">
|
<main class="form-signin">
|
||||||
<form
|
<form
|
||||||
onsubmit={ ctx.link().callback(|_| Oauth2Msg::ConsentGranted) }
|
onsubmit={ ctx.link().callback(|e: FocusEvent| {
|
||||||
|
console::log!("oauth2::view -> Consent - prevent_default()");
|
||||||
|
e.prevent_default();
|
||||||
|
Oauth2Msg::ConsentGranted
|
||||||
|
} ) }
|
||||||
action="javascript:void(0);"
|
action="javascript:void(0);"
|
||||||
>
|
>
|
||||||
<h1 class="h3 mb-3 fw-normal">{"Consent to Proceed to " }{ client_name }</h1>
|
<h1 class="h3 mb-3 fw-normal">{"Consent to Proceed to " }{ client_name }</h1>
|
||||||
<button id="autofocus" class="w-100 btn btn-lg btn-primary" type="submit">{ "Proceed" }</button>
|
<button id="autofocus" class="w-100 btn btn-lg btn-primary" type="submit">{ "Proceed" }</button>
|
||||||
</form>
|
</form>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
State::ConsentGranted | State::SubmitAuthReq(_) | State::TokenCheck(_) => {
|
State::ConsentGranted | State::SubmitAuthReq(_) | State::TokenCheck(_) => {
|
||||||
html! { <body> <h1>{ " ... " }</h1> </body> }
|
html! { <div> <h1>{ " ... " }</h1> </div> }
|
||||||
}
|
}
|
||||||
State::ErrInvalidRequest => {
|
State::ErrInvalidRequest => {
|
||||||
html! { <body> <h1>{ " ❌ " }</h1> </body> }
|
html! { <div> <h1>{ " ❌ " }</h1> </div> }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn destroy(&mut self, _ctx: &Context<Self>) {
|
fn destroy(&mut self, _ctx: &Context<Self>) {
|
||||||
console::log!("oauth2::destroy");
|
console::log!("oauth2::destroy");
|
||||||
|
if let Err(e) = crate::utils::body()
|
||||||
|
.class_list()
|
||||||
|
.remove_1("form-signin-body")
|
||||||
|
{
|
||||||
|
console::log!(format!("class_list remove error -> {:?}", e).as_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
.html-body {
|
html,
|
||||||
|
body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-body {
|
.form-signin-body {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-top: 40px;
|
padding-top: 40px;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use gloo::console;
|
use gloo::console;
|
||||||
use wasm_bindgen::{JsCast, UnwrapThrowExt};
|
use wasm_bindgen::{JsCast, UnwrapThrowExt};
|
||||||
pub use web_sys::InputEvent;
|
pub use web_sys::InputEvent;
|
||||||
use web_sys::{Document, Event, HtmlInputElement, Window};
|
use web_sys::{Document, Event, HtmlElement, HtmlInputElement, Window};
|
||||||
|
|
||||||
pub fn window() -> Window {
|
pub fn window() -> Window {
|
||||||
web_sys::window().expect("Unable to retrieve window")
|
web_sys::window().expect("Unable to retrieve window")
|
||||||
|
@ -11,6 +11,10 @@ pub fn document() -> Document {
|
||||||
window().document().expect("Unable to retrieve document")
|
window().document().expect("Unable to retrieve document")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn body() -> HtmlElement {
|
||||||
|
document().body().expect("Unable to retrieve body")
|
||||||
|
}
|
||||||
|
|
||||||
pub fn autofocus() {
|
pub fn autofocus() {
|
||||||
// Once rendered if an element with id autofocus exists, focus it.
|
// Once rendered if an element with id autofocus exists, focus it.
|
||||||
let doc = document();
|
let doc = document();
|
||||||
|
|
|
@ -70,8 +70,9 @@ impl Component for ViewsApp {
|
||||||
|
|
||||||
impl ViewsApp {
|
impl ViewsApp {
|
||||||
fn view_authenticated(&self, ctx: &Context<Self>) -> Html {
|
fn view_authenticated(&self, ctx: &Context<Self>) -> Html {
|
||||||
|
// WARN set dash-body against body here?
|
||||||
html! {
|
html! {
|
||||||
<body class="dash-body">
|
<div class="dash-body">
|
||||||
<header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
|
<header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
|
||||||
<a class="navbar-brand col-md-3 col-lg-2 me-0 px-3" href="#">{ "Kanidm" }</a>
|
<a class="navbar-brand col-md-3 col-lg-2 me-0 px-3" href="#">{ "Kanidm" }</a>
|
||||||
<button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
@ -133,7 +134,7 @@ impl ViewsApp {
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue