diff --git a/artwork/logo-login.svg b/artwork/logo-login.svg
new file mode 100644
index 000000000..1740e503d
--- /dev/null
+++ b/artwork/logo-login.svg
@@ -0,0 +1,219 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PASSPORT
+ AUTHSTRALIA
+ KANIDM
+
+
+
+
+
diff --git a/artwork/logo-square.svg b/artwork/logo-square.svg
index 37257597c..dca55c5f2 100644
--- a/artwork/logo-square.svg
+++ b/artwork/logo-square.svg
@@ -1,14 +1,17 @@
+
+
+ Kanidm Square Logo
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ inkscape:deskcolor="#d1d1d1"
+ showgrid="false"
+ showguides="true"
+ inkscape:zoom="1"
+ inkscape:cx="234.5"
+ inkscape:cy="304.5"
+ inkscape:window-width="1389"
+ inkscape:window-height="847"
+ inkscape:window-x="51"
+ inkscape:window-y="25"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg1084">
+ inkscape:label="vertical_middle"
+ inkscape:color="rgb(0,134,229)" />
+ inkscape:label=""
+ inkscape:color="rgb(0,134,229)" />
+
+
+
+ id="defs1081" />
+ id="metadata330">
- image/svg+xml
-
+ Kanidm Square Logo
+
+
-
-
+ d="m 100.24698,67.21217 c -1.308628,-0.01556 -2.560878,2.352773 -4.890668,6.986654 -7.05187,-7.755768 -7.41258,-7.849666 -9.84229,2.649966 -0.11364,0.04758 -0.22709,0.0959 -0.34055,0.144695 -8.88231,-5.324406 -9.34124,-5.366051 -8.66717,5.041551 -0.21569,0.159933 -0.43121,0.322088 -0.64596,0.486794 -9.102,-3.605578 -9.49555,-3.378386 -7.19232,6.611477 -0.10784,0.11671 -0.21599,0.23284 -0.3235,0.35089 -9.27685,-2.506375 -9.53641,-2.129764 -6.07663,7.65845 -0.14847,0.21295 -0.29578,0.42957 -0.44338,0.64544 -10.45618,-1.11775 -10.67098,-0.91353 -5.35523,8.828413 -0.026,0.0482 -0.0526,0.0943 -0.0786,0.14263 -4.28381,2.04782 -5.70197,4.54381 -7.73183,7.89409 -0.15756,6.64457 6.9544,12.37105 17.18035,18.87895 -3.51325,-6.5113 -9.00735,-9.81207 -10.0614,-17.88832 1.54367,-2.90538 4.16877,-3.90901 6.42286,-5.21622 24.61995,14.36815 50.615808,14.53471 76.550928,-0.55035 2.26015,1.31503 4.90084,2.31509 6.45076,5.23224 -1.05405,8.07624 -6.54866,11.3765 -10.06191,17.8878 10.22594,-6.5079 17.33842,-12.23387 17.18086,-18.87844 -1.97354,-3.25733 -3.37677,-5.706 -7.38973,-7.72149 5.01291,-9.218263 4.53571,-9.305023 -5.98567,-8.177293 -0.0891,-0.1152 -0.17795,-0.23186 -0.26717,-0.34623 3.63467,-10.261532 3.40665,-10.529692 -6.39186,-7.87136 2.47993,-10.705895 2.14854,-10.749554 -7.77938,-6.803718 0.74781,-11.285018 0.47993,-11.261581 -8.88835,-5.642548 -2.49815,-10.818768 -2.79293,-10.786576 -9.94048,-2.924887 -2.68846,-4.933638 -4.10296,-7.403383 -5.43173,-7.419184 z"
+ style="display:inline;fill:#ff6600;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ transform="translate(-2.3193819,-7.5517449)"
+ style="display:inline">
-
-
-
-
+
+
+
+
+
+
+
+
-
-
- AUTHSTRALIA
- PASSPORT
+ id="path5389"
+ d="m 75.334492,106.8255 c -0.51041,0.004 -0.85068,0.0544 -0.79478,0.0889 0,0 -9.13406,11.93611 0.31006,18.65881 a 9.7471106,8.2770874 37.793943 0 0 1.43712,9.42372 9.7471106,8.2770874 37.793943 0 0 10.56473,3.9672 l -3.56412,-8.60569 9.19685,0.73536 a 9.7471106,8.2770874 37.793943 0 0 -7.02645,-8.91057 9.7471106,8.2770874 37.793943 0 0 -7.00784,0.009 c -1.86231,-1.36401 -4.6287,-4.92596 -0.0408,-12.47521 1.51807,-2.49795 -1.54349,-2.90314 -3.07475,-2.89129 z"
+ style="display:inline;fill:#ff6600;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ transform="translate(-12.063571,-65.570169)"
+ id="g5751"
+ style="display:inline">
+ style="display:inline;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 142.55119,137.92594 27.3632,-15.27364 21.39613,38.33184 -27.36321,15.27364 z"
+ id="path5730" />
-
+ id="path5734"
+ d="m 142.55119,137.92594 27.3632,-15.27364 21.39613,38.33184 -27.36321,15.27364 -6.27068,-11.23547 c 3.50932,-3.1137 4.19635,-7.01138 3.17635,-11.38324 l -7.39141,3.83317 z"
+ style="display:inline;opacity:1;fill:#2a3455;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PASSPORT
+ AUTHSTRALIA
+ KANIDM
- KANIDM
+ d="m 145.61485,98.730679 c 3.50932,-3.1137 4.19635,-7.01138 3.17635,-11.38324 l -7.3914,3.83317 z"
+ style="display:inline;fill:#2a3455;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path523" />
+ d="m 136.84733,83.996879 c -2.18137,1.42401 -3.84498,3.66555 -4.59874,6.19631 -0.99138,3.35068 -0.25622,6.742 1.91889,8.85192 -3.57942,9.769591 -10.05414,6.555411 -10.19096,6.426891 -1.10017,-0.85629 -5.17794,3.63047 0.53268,5.22929 8.92019,2.49747 12.77572,-5.47478 14.1562,-9.67038 2.45132,0.18756 5.02004,-0.78148 7.05239,-2.660471 3.06875,-2.84546 4.34444,-7.22212 3.15795,-10.83433 l -8.31186,4.20365 0.005,-1.29218 z"
+ style="display:inline;fill:#ff6600;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
diff --git a/kanidm_book/src/accounts_and_groups.md b/kanidm_book/src/accounts_and_groups.md
index 070d2d1c6..5b4cfa5e1 100644
--- a/kanidm_book/src/accounts_and_groups.md
+++ b/kanidm_book/src/accounts_and_groups.md
@@ -27,24 +27,21 @@ and sensitive data), group management, and more.
## Recovering the Initial idm_admin Account
By default the idm_admin user has no password, and can not be accessed. You should recover it with the
-admin (system admin) account. We recommend the use of the "recover_account" functionality as it provides a high strength, random password.
+admin (system admin) account.
-
-
-
-
-
-Warning: The server must not be running at this point, as it requires exclusive access to the database.
-
-
+{{#template
+ templates/kani-warning.md
+ text=Warning: The server must not be running at this point, as it requires exclusive access to the database.
+}}
+We recommend the use of the "recover_account" functionality as it provides a high strength, random password.
```shell
kanidmd recover_account -c /etc/kanidm/server.toml -n idm_admin
Successfully recovered account 'idm_admin' - password reset to -> j9YUv...
```
-To do this in Docker, you'll neeD to stop the existing container and run it with "bash" as the "command" argument, to get a shell, then run the `kanidmd` command above.
+To do this in Docker, you'll need to stop the existing container and run it with `bash` as the "command" argument, to get a shell, then run the `kanidmd` command above.
For example, if I'm using the developer image in my test environment:
diff --git a/kanidm_tools/src/cli/account.rs b/kanidm_tools/src/cli/account.rs
index 81092d08c..e626aa432 100644
--- a/kanidm_tools/src/cli/account.rs
+++ b/kanidm_tools/src/cli/account.rs
@@ -190,6 +190,7 @@ impl AccountOpt {
{
// TODO: JSON output for account person extend.
Ok(_) => {
+ result_output.status = kanidm_proto::messages::MessageStatus::Success;
result_output.result = format!(
"Successfully extended the user {}.",
aopt.aopts.account_id
diff --git a/kanidmd/score/src/https/manifest.rs b/kanidmd/score/src/https/manifest.rs
new file mode 100644
index 000000000..f4d271d66
--- /dev/null
+++ b/kanidmd/score/src/https/manifest.rs
@@ -0,0 +1,189 @@
+///! Builds a Progressive Web App Manifest page.
+// Thanks to the webmanifest crate for a lot of this code
+use crate::https::{AppState, RequestExtensions};
+use serde::{Deserialize, Serialize};
+
+/// The MIME type for `.webmanifest` files.
+const MIME_TYPE_MANIFEST: &str = "application/manifest+json";
+
+/// Create a new manifest builder.
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct Manifest<'s> {
+ name: &'s str,
+ short_name: &'s str,
+ start_url: &'s str,
+ #[serde(rename = "display")]
+ display_mode: DisplayMode,
+ background_color: &'s str,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ description: Option<&'s str>,
+ #[serde(rename = "dir")]
+ direction: Direction,
+ // direction: Option,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ orientation: Option,
+ // orientation: Option,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ lang: Option<&'s str>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ scope: Option<&'s str>,
+ // #[serde(skip_serializing_if = "Option::is_none")]
+ theme_color: &'s str,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ prefer_related_applications: Option,
+ // #[serde(borrow)]
+ // #[serde(skip_serializing_if = "Option::is_none")]
+ icons: Vec,
+ // icons: Vec>,
+ // #[serde(borrow)]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ related_applications: Option>,
+ // related_applications: Vec>,
+}
+
+#[derive(Clone, Debug, Serialize, Deserialize)]
+struct ManifestIcon {
+ src: String,
+ #[serde(rename = "type")]
+ mime_type: String,
+ sizes: String,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ purpose: Option,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+enum Direction {
+ /// left-to-right
+ #[serde(rename = "ltr")]
+ Ltr,
+ /// right-to-left
+ #[serde(rename = "rtl")]
+ Rtl,
+ /// Hints to the browser to use the [Unicode bidirectional
+ /// algorithm](https://developer.mozilla.org/en-US/docs/Web/Localization/Unicode_Bidirectional_Text_Algorithm)
+ /// to make a best guess about the text's direction.
+ #[serde(rename = "auto")]
+ Auto,
+}
+
+/// Display modes from the Web app manifest definition
+///
+/// Ref: https://developer.mozilla.org/en-US/docs/Web/Manifest/display
+#[derive(Debug, Clone, Serialize, Deserialize)]
+enum DisplayMode {
+ /// All of the available display area is used and no user agent chrome is
+ /// shown.
+ #[serde(rename = "full-screen")]
+ FullScreen,
+ /// The application will look and feel like a standalone application. This can
+ /// include the application having a different window, its own icon in the
+ /// application launcher, etc. In this mode, the user agent will exclude UI
+ /// elements for controlling navigation, but can include other UI elements
+ /// such as a status bar.
+ #[serde(rename = "standalone")]
+ Standalone,
+ /// The application will look and feel like a standalone application, but will
+ /// have a minimal set of UI elements for controlling navigation. The elements
+ /// will vary by browser.
+ #[serde(rename = "minimal-ui")]
+ MinimalUi,
+ /// The application opens in a conventional browser tab or new window,
+ /// depending on the browser and platform. This is the default.
+ #[serde(rename = "browser")]
+ Browser,
+}
+
+/// Generates a manifest.json file for progressive web app usag
+pub async fn manifest(req: tide::Request) -> tide::Result {
+ let mut res = tide::Response::new(200);
+ let (eventid, _) = req.new_eventid();
+ let domain_display_name = req.state().qe_r_ref.get_domain_display_name(eventid).await;
+
+ let icons = vec![
+ ManifestIcon {
+ sizes: String::from("512x512"),
+ src: String::from("/pkg/img/logo-square.svg"),
+ mime_type: String::from("image/svg+xml"),
+ purpose: None,
+ },
+ ManifestIcon {
+ sizes: String::from("512x512"),
+ src: String::from("/pkg/img/logo-512.png"),
+ mime_type: String::from("image/png"),
+ purpose: Some(String::from("maskable")),
+ },
+ ManifestIcon {
+ sizes: String::from("192x192"),
+ src: String::from("/pkg/img/logo-192.png"),
+ mime_type: String::from("image/png"),
+ purpose: Some(String::from("maskable")),
+ },
+ ManifestIcon {
+ sizes: String::from("256x156"),
+ src: String::from("/pkg/img/logo-256.png"),
+ mime_type: String::from("image/png"),
+ purpose: Some(String::from("maskable")),
+ },
+ ];
+
+
+ let manifest_struct = Manifest {
+ short_name: domain_display_name.as_str(),
+ name: domain_display_name.as_str(),
+ start_url: "/", // TODO: this needs to be the frontend URL, can't get this yet
+ display_mode: DisplayMode::MinimalUi,
+ description: None,
+ orientation: None,
+ lang: Some("en"),
+ theme_color: "white",
+ background_color: "white",
+ direction: Direction::Auto,
+ scope: None,
+ prefer_related_applications: None,
+ icons,
+ related_applications: None,
+ };
+
+ let manifest_string = serde_json::to_string_pretty(&manifest_struct)?;
+
+ res.set_content_type(MIME_TYPE_MANIFEST);
+ res.set_body(manifest_string);
+
+ Ok(res)
+}
+
+// "start_url": "/?source=pwa",
+// "background_color": "#3367D6",
+// "display": "standalone",
+// "scope": "/",
+// "theme_color": "#3367D6",
+// "shortcuts": [
+// {
+// "name": "How's weather today?",
+// "short_name": "Today",
+// "description": "View weather information for today",
+// "url": "/today?source=pwa",
+// "icons": [{ "src": "/images/today.png", "sizes": "192x192" }]
+// },
+// {
+// "name": "How's weather tomorrow?",
+// "short_name": "Tomorrow",
+// "description": "View weather information for tomorrow",
+// "url": "/tomorrow?source=pwa",
+// "icons": [{ "src": "/images/tomorrow.png", "sizes": "192x192" }]
+// }
+// ],
+// "description": "Weather forecast information",
+// "screenshots": [
+// {
+// "src": "/images/screenshot1.png",
+// "type": "image/png",
+// "sizes": "540x720"
+// },
+// {
+// "src": "/images/screenshot2.jpg",
+// "type": "image/jpg",
+// "sizes": "540x720"
+// }
+// ]
+// }
diff --git a/kanidmd/score/src/https/middleware.rs b/kanidmd/score/src/https/middleware.rs
index b024a7d69..643403b97 100644
--- a/kanidmd/score/src/https/middleware.rs
+++ b/kanidmd/score/src/https/middleware.rs
@@ -1,48 +1,7 @@
-///! Middleware for the tide web server
-
-//TODO: decide if this is still needed
-// #[derive(Default)]
-// /// Injects the domain_display_name where it needs to
-// pub struct KanidmDisplayNameMiddleware {
-// domain_display_name: String,
-// }
-
-// // // TODO: finish this for #860
-// // #[async_trait::async_trait]
-// // impl tide::Middleware for KanidmDisplayNameMiddleware {
-// // async fn handle(
-// // &self,
-// // request: tide::Request,
-// // next: tide::Next<'_, State>,
-// // ) -> tide::Result {
-// // let mut response = next.run(request).await;
-// // // grab the body we're intending to return at this point
-// // let body_str = response.take_body().into_string().await?;
-// // // update it with the hash
-// // // TODO: #860 make this a const so we can change it and not typo it later
-// // response.set_body(body_str.replace(
-// // "===DOMAIN_DISPLAY_NAME===",
-// // self.domain_display_name.as_str(),
-// // ));
-// // Ok(response)
-// // }
-// // }
-
-// impl KanidmDisplayNameMiddleware {
-// /// Pulls the domain_display_name from the qs on web server start, so we can
-// /// set it in pages
-// pub fn new(domain_display_name: String) -> Self {
-// KanidmDisplayNameMiddleware {
-// // TODO: #860 work out how to get this out :D
-// domain_display_name: domain_display_name,
-// }
-// }
-// }
-
#[derive(Default)]
/// This tide MiddleWare adds headers like Content-Security-Policy
/// and similar families. If it keeps adding more things then
-/// probably rename the middlewre :)
+/// probably rename the middleware :)
pub struct UIContentSecurityPolicyResponseMiddleware {
// The sha384 hash of /pkg/wasmloader.js
pub integrity_wasmloader: String,
diff --git a/kanidmd/score/src/https/mod.rs b/kanidmd/score/src/https/mod.rs
index b98613251..1d32915c5 100644
--- a/kanidmd/score/src/https/mod.rs
+++ b/kanidmd/score/src/https/mod.rs
@@ -1,30 +1,29 @@
+mod manifest;
mod middleware;
mod oauth2;
mod v1;
+use self::manifest::manifest;
use self::middleware::*;
use self::oauth2::*;
use self::v1::*;
+use compact_jwt::{Jws, JwsSigner, JwsUnverified, JwsValidator};
use kanidm::actors::v1_read::QueryServerReadV1;
use kanidm::actors::v1_write::QueryServerWriteV1;
use kanidm::config::{ServerRole, TlsConfiguration};
use kanidm::prelude::*;
use kanidm::status::StatusActor;
-
+use kanidm::tracing_tree::TreeMiddleware;
use regex::Regex;
use serde::Serialize;
use std::fs::canonicalize;
use std::path::PathBuf;
use std::str::FromStr;
-use uuid::Uuid;
-
-use kanidm::tracing_tree::TreeMiddleware;
use tide_compress::CompressMiddleware;
use tide_openssl::TlsListener;
use tracing::{error, info};
-
-use compact_jwt::{Jws, JwsSigner, JwsUnverified, JwsValidator};
+use uuid::Uuid;
#[derive(Clone)]
pub struct AppState {
@@ -183,36 +182,65 @@ pub fn to_tide_response(
})
}
-// Handle the various end points we need to expose
+/// Returns a generic robots.txt
+async fn robots_txt(_req: tide::Request) -> tide::Result {
+ let mut res = tide::Response::new(200);
+
+ res.set_content_type("text/plain");
+ res.set_body(
+ r#"
+User-agent: *
+Disallow: /
+"#,
+ );
+ Ok(res)
+}
+
+/// The web UI at / for Kanidm
async fn index_view(req: tide::Request) -> tide::Result {
+ let mut res = tide::Response::new(200);
let (eventid, hvalue) = req.new_eventid();
let domain_display_name = req.state().qe_r_ref.get_domain_display_name(eventid).await;
-
- let mut res = tide::Response::new(200);
res.insert_header("X-KANIDM-OPID", hvalue);
res.set_content_type("text/html;charset=utf-8");
-
res.set_body(format!(r#"
-
-
-
-
-
- {}
-
-
-
-
+
+
+
+
+
+
+ {}
-
-
-
-
-
- "#, domain_display_name.as_str())
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Kanidm is loading, please wait...
+
+
+
+
+"#, domain_display_name.as_str()
+ )
);
Ok(res)
@@ -448,6 +476,8 @@ pub fn create_https_server(
static_tserver.with(compress_middleware.clone());
static_tserver.at("/").get(index_view);
+ static_tserver.at("/robots.txt").get(robots_txt);
+ static_tserver.at("/manifest.webmanifest").get(manifest);
static_tserver.at("/ui/").get(index_view);
static_tserver.at("/ui/*").get(index_view);
@@ -749,9 +779,6 @@ pub fn create_https_server(
let tlsl = TlsListener::new(address, x_ref);
*/
- // adds Content-Security-Policy Headers when running in HTTPS
- // TODO: make this only apply to /ui/
-
tokio::spawn(async move {
if let Err(e) = tserver.listen(tlsl).await {
error!(
diff --git a/kanidmd_web_ui/build_wasm_release.sh b/kanidmd_web_ui/build_wasm_release.sh
index f20cc75d7..c2f24e400 100755
--- a/kanidmd_web_ui/build_wasm_release.sh
+++ b/kanidmd_web_ui/build_wasm_release.sh
@@ -7,8 +7,8 @@ fi
wasm-pack build ${BUILD_FLAGS} --target web || exit 1
touch ./pkg/ANYTHING_HERE_WILL_BE_DELETED_ADD_TO_SRC && \
- rsync --delete-after -av ./src/img/ ./pkg/img/ && \
- rsync --delete-after -av ./src/external/ ./pkg/external/ && \
+ rsync --delete-after -r --copy-links -v ./src/img/ ./pkg/img/ && \
+ rsync --delete-after -r --copy-links -v ./src/external/ ./pkg/external/ && \
cp ./src/style.css ./pkg/style.css && \
cp ./src/wasmloader.js ./pkg/wasmloader.js && \
rm ./pkg/.gitignore
diff --git a/kanidmd_web_ui/pkg/img/apple-touch-icon.png b/kanidmd_web_ui/pkg/img/apple-touch-icon.png
new file mode 100644
index 000000000..984ab1c6e
Binary files /dev/null and b/kanidmd_web_ui/pkg/img/apple-touch-icon.png differ
diff --git a/kanidmd_web_ui/pkg/img/logo-180.png b/kanidmd_web_ui/pkg/img/logo-180.png
new file mode 100644
index 000000000..04dec4d0a
Binary files /dev/null and b/kanidmd_web_ui/pkg/img/logo-180.png differ
diff --git a/kanidmd_web_ui/pkg/img/logo-192.png b/kanidmd_web_ui/pkg/img/logo-192.png
new file mode 100644
index 000000000..d5d973a61
Binary files /dev/null and b/kanidmd_web_ui/pkg/img/logo-192.png differ
diff --git a/kanidmd_web_ui/pkg/img/logo-256.png b/kanidmd_web_ui/pkg/img/logo-256.png
new file mode 100644
index 000000000..984ab1c6e
Binary files /dev/null and b/kanidmd_web_ui/pkg/img/logo-256.png differ
diff --git a/kanidmd_web_ui/pkg/img/logo-512.png b/kanidmd_web_ui/pkg/img/logo-512.png
new file mode 100644
index 000000000..53e4ff8af
Binary files /dev/null and b/kanidmd_web_ui/pkg/img/logo-512.png differ
diff --git a/kanidmd_web_ui/pkg/img/logo-square.svg b/kanidmd_web_ui/pkg/img/logo-square.svg
index 334b289f1..dca55c5f2 100644
--- a/kanidmd_web_ui/pkg/img/logo-square.svg
+++ b/kanidmd_web_ui/pkg/img/logo-square.svg
@@ -1,15 +1,17 @@
+
+
+ Kanidm Square Logo
+ inkscape:zoom="1"
+ inkscape:cx="234.5"
+ inkscape:cy="304.5"
+ inkscape:window-width="1389"
+ inkscape:window-height="847"
+ inkscape:window-x="51"
+ inkscape:window-y="25"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg1084">
+ position="-52.916665,67.733332"
+ orientation="0,1"
+ id="guide145"
+ inkscape:locked="false"
+ inkscape:label="vertical_middle"
+ inkscape:color="rgb(0,134,229)" />
+ id="guide777"
+ inkscape:locked="false"
+ inkscape:label=""
+ inkscape:color="rgb(0,134,229)" />
+
+
+
+ id="defs1081" />
+ id="metadata330">
- image/svg+xml
-
+ Kanidm Square Logo
-
-
-
+ sodipodi:insensitive="true" />
+
-
-
+ d="m 100.24698,67.21217 c -1.308628,-0.01556 -2.560878,2.352773 -4.890668,6.986654 -7.05187,-7.755768 -7.41258,-7.849666 -9.84229,2.649966 -0.11364,0.04758 -0.22709,0.0959 -0.34055,0.144695 -8.88231,-5.324406 -9.34124,-5.366051 -8.66717,5.041551 -0.21569,0.159933 -0.43121,0.322088 -0.64596,0.486794 -9.102,-3.605578 -9.49555,-3.378386 -7.19232,6.611477 -0.10784,0.11671 -0.21599,0.23284 -0.3235,0.35089 -9.27685,-2.506375 -9.53641,-2.129764 -6.07663,7.65845 -0.14847,0.21295 -0.29578,0.42957 -0.44338,0.64544 -10.45618,-1.11775 -10.67098,-0.91353 -5.35523,8.828413 -0.026,0.0482 -0.0526,0.0943 -0.0786,0.14263 -4.28381,2.04782 -5.70197,4.54381 -7.73183,7.89409 -0.15756,6.64457 6.9544,12.37105 17.18035,18.87895 -3.51325,-6.5113 -9.00735,-9.81207 -10.0614,-17.88832 1.54367,-2.90538 4.16877,-3.90901 6.42286,-5.21622 24.61995,14.36815 50.615808,14.53471 76.550928,-0.55035 2.26015,1.31503 4.90084,2.31509 6.45076,5.23224 -1.05405,8.07624 -6.54866,11.3765 -10.06191,17.8878 10.22594,-6.5079 17.33842,-12.23387 17.18086,-18.87844 -1.97354,-3.25733 -3.37677,-5.706 -7.38973,-7.72149 5.01291,-9.218263 4.53571,-9.305023 -5.98567,-8.177293 -0.0891,-0.1152 -0.17795,-0.23186 -0.26717,-0.34623 3.63467,-10.261532 3.40665,-10.529692 -6.39186,-7.87136 2.47993,-10.705895 2.14854,-10.749554 -7.77938,-6.803718 0.74781,-11.285018 0.47993,-11.261581 -8.88835,-5.642548 -2.49815,-10.818768 -2.79293,-10.786576 -9.94048,-2.924887 -2.68846,-4.933638 -4.10296,-7.403383 -5.43173,-7.419184 z"
+ style="display:inline;fill:#ff6600;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ transform="translate(-2.3193819,-7.5517449)"
+ style="display:inline">
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+ id="path5389"
+ d="m 75.334492,106.8255 c -0.51041,0.004 -0.85068,0.0544 -0.79478,0.0889 0,0 -9.13406,11.93611 0.31006,18.65881 a 9.7471106,8.2770874 37.793943 0 0 1.43712,9.42372 9.7471106,8.2770874 37.793943 0 0 10.56473,3.9672 l -3.56412,-8.60569 9.19685,0.73536 a 9.7471106,8.2770874 37.793943 0 0 -7.02645,-8.91057 9.7471106,8.2770874 37.793943 0 0 -7.00784,0.009 c -1.86231,-1.36401 -4.6287,-4.92596 -0.0408,-12.47521 1.51807,-2.49795 -1.54349,-2.90314 -3.07475,-2.89129 z"
+ style="display:inline;fill:#ff6600;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ transform="translate(-12.063571,-65.570169)"
+ id="g5751"
+ style="display:inline">
+ style="display:inline;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 142.55119,137.92594 27.3632,-15.27364 21.39613,38.33184 -27.36321,15.27364 z"
+ id="path5730" />
-
-
-
-
-
-
-
-
+ id="path5734"
+ d="m 142.55119,137.92594 27.3632,-15.27364 21.39613,38.33184 -27.36321,15.27364 -6.27068,-11.23547 c 3.50932,-3.1137 4.19635,-7.01138 3.17635,-11.38324 l -7.39141,3.83317 z"
+ style="display:inline;opacity:1;fill:#2a3455;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PASSPORT
+ AUTHSTRALIA
+ KANIDM
- AUTHSTRALIA
- PASSPORT
-
-
-
-
-
- KANIDM
-
+ d="m 145.61485,98.730679 c 3.50932,-3.1137 4.19635,-7.01138 3.17635,-11.38324 l -7.3914,3.83317 z"
+ style="display:inline;fill:#2a3455;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path523" />
+ d="m 136.84733,83.996879 c -2.18137,1.42401 -3.84498,3.66555 -4.59874,6.19631 -0.99138,3.35068 -0.25622,6.742 1.91889,8.85192 -3.57942,9.769591 -10.05414,6.555411 -10.19096,6.426891 -1.10017,-0.85629 -5.17794,3.63047 0.53268,5.22929 8.92019,2.49747 12.77572,-5.47478 14.1562,-9.67038 2.45132,0.18756 5.02004,-0.78148 7.05239,-2.660471 3.06875,-2.84546 4.34444,-7.22212 3.15795,-10.83433 l -8.31186,4.20365 0.005,-1.29218 z"
+ style="display:inline;fill:#ff6600;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
diff --git a/kanidmd_web_ui/pkg/kanidmd_web_ui.d.ts b/kanidmd_web_ui/pkg/kanidmd_web_ui.d.ts
index fcf3d9a18..5b762a169 100644
--- a/kanidmd_web_ui/pkg/kanidmd_web_ui.d.ts
+++ b/kanidmd_web_ui/pkg/kanidmd_web_ui.d.ts
@@ -12,9 +12,9 @@ export interface InitOutput {
readonly __wbindgen_malloc: (a: number) => number;
readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
readonly __wbindgen_export_2: WebAssembly.Table;
- readonly _dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hab3be56b8155b388: (a: number, b: number, c: number) => void;
- readonly _dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h17af29331a011f5b: (a: number, b: number, c: number) => void;
- readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h67ec72bbd39c79bf: (a: number, b: number, c: number) => void;
+ readonly _dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8142cf0979e67d24: (a: number, b: number, c: number) => void;
+ readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfed1f3471f1b926f: (a: number, b: number, c: number) => void;
+ readonly _dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3b7aa7dd2123cac1: (a: number, b: number, c: number) => void;
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
readonly __wbindgen_free: (a: number, b: number) => void;
readonly __wbindgen_exn_store: (a: number) => void;
diff --git a/kanidmd_web_ui/pkg/kanidmd_web_ui.js b/kanidmd_web_ui/pkg/kanidmd_web_ui.js
index 341b4f8bb..076446b93 100644
--- a/kanidmd_web_ui/pkg/kanidmd_web_ui.js
+++ b/kanidmd_web_ui/pkg/kanidmd_web_ui.js
@@ -8,29 +8,6 @@ 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 WASM_VECTOR_LEN = 0;
let cachedUint8Memory0;
@@ -58,6 +35,8 @@ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
function passStringToWasm0(arg, malloc, realloc) {
+ if (typeof(arg) !== 'string') throw new Error('expected a string argument');
+
if (realloc === undefined) {
const buf = cachedTextEncoder.encode(arg);
const ptr = malloc(buf.length);
@@ -86,7 +65,7 @@ function passStringToWasm0(arg, malloc, realloc) {
ptr = realloc(ptr, len, len = offset + arg.length * 3);
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
const ret = encodeString(arg, view);
-
+ if (ret.read !== arg.length) throw new Error('failed to pass whole string');
offset += ret.written;
}
@@ -94,10 +73,6 @@ function passStringToWasm0(arg, malloc, realloc) {
return ptr;
}
-function isLikeNone(x) {
- return x === undefined || x === null;
-}
-
let cachedInt32Memory0;
function getInt32Memory0() {
if (cachedInt32Memory0.byteLength === 0) {
@@ -114,6 +89,33 @@ function getStringFromWasm0(ptr, len) {
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
}
+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];
+
+ if (typeof(heap_next) !== 'number') throw new Error('corrupt heap');
+
+ heap[idx] = obj;
+ return idx;
+}
+
+function isLikeNone(x) {
+ return x === undefined || x === null;
+}
+
+function _assertBoolean(n) {
+ if (typeof(n) !== 'boolean') {
+ throw new Error('expected a boolean argument');
+ }
+}
+
+function _assertNum(n) {
+ if (typeof(n) !== 'number') throw new Error('expected a number argument');
+}
+
let cachedFloat64Memory0;
function getFloat64Memory0() {
if (cachedFloat64Memory0.byteLength === 0) {
@@ -122,6 +124,18 @@ function getFloat64Memory0() {
return cachedFloat64Memory0;
}
+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 debugString(val) {
// primitive types
const type = typeof val;
@@ -187,6 +201,49 @@ function debugString(val) {
return className;
}
+function makeClosure(arg0, arg1, dtor, f) {
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
+ const real = (...args) => {
+ // First up with a closure we increment the internal reference
+ // count. This ensures that the Rust closure environment won't
+ // be deallocated while we're invoking it.
+ state.cnt++;
+ try {
+ return f(state.a, state.b, ...args);
+ } finally {
+ if (--state.cnt === 0) {
+ wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b);
+ state.a = 0;
+
+ }
+ }
+ };
+ real.original = state;
+
+ return real;
+}
+
+function logError(f, args) {
+ try {
+ return f.apply(this, args);
+ } catch (e) {
+ let error = (function () {
+ try {
+ return e instanceof Error ? `${e.message}\n\nStack:\n${e.stack}` : e.toString();
+ } catch(_) {
+ return "";
+ }
+ }());
+ console.error("wasm-bindgen: imported JS function that was not marked as `catch` threw an error:", error);
+ throw e;
+ }
+}
+function __wbg_adapter_30(arg0, arg1, arg2) {
+ _assertNum(arg0);
+ _assertNum(arg1);
+ wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8142cf0979e67d24(arg0, arg1, addHeapObject(arg2));
+}
+
function makeMutClosure(arg0, arg1, dtor, f) {
const state = { a: arg0, b: arg1, cnt: 1, dtor };
const real = (...args) => {
@@ -211,6 +268,11 @@ function makeMutClosure(arg0, arg1, dtor, f) {
return real;
}
+function __wbg_adapter_33(arg0, arg1, arg2) {
+ _assertNum(arg0);
+ _assertNum(arg1);
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfed1f3471f1b926f(arg0, arg1, addHeapObject(arg2));
+}
let stack_pointer = 32;
@@ -219,43 +281,16 @@ function addBorrowedObject(obj) {
heap[--stack_pointer] = obj;
return stack_pointer;
}
-function __wbg_adapter_30(arg0, arg1, arg2) {
+function __wbg_adapter_36(arg0, arg1, arg2) {
try {
- wasm._dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hab3be56b8155b388(arg0, arg1, addBorrowedObject(arg2));
+ _assertNum(arg0);
+ _assertNum(arg1);
+ wasm._dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3b7aa7dd2123cac1(arg0, arg1, addBorrowedObject(arg2));
} finally {
heap[stack_pointer++] = undefined;
}
}
-function makeClosure(arg0, arg1, dtor, f) {
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
- const real = (...args) => {
- // First up with a closure we increment the internal reference
- // count. This ensures that the Rust closure environment won't
- // be deallocated while we're invoking it.
- state.cnt++;
- try {
- return f(state.a, state.b, ...args);
- } finally {
- if (--state.cnt === 0) {
- wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b);
- state.a = 0;
-
- }
- }
- };
- real.original = state;
-
- return real;
-}
-function __wbg_adapter_33(arg0, arg1, arg2) {
- wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h17af29331a011f5b(arg0, arg1, addHeapObject(arg2));
-}
-
-function __wbg_adapter_36(arg0, arg1, arg2) {
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h67ec72bbd39c79bf(arg0, arg1, addHeapObject(arg2));
-}
-
/**
*/
export function run_app() {
@@ -332,11 +367,19 @@ async function load(module, imports) {
function getImports() {
const imports = {};
imports.wbg = {};
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
- takeObject(arg0);
+ imports.wbg.__wbg_modalhide_673016763df325bd = function() { return logError(function (arg0, arg1) {
+ modal_hide(getStringFromWasm0(arg0, arg1));
+ }, arguments) };
+ imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
+ const obj = getObject(arg1);
+ const ret = JSON.stringify(obj === undefined ? null : obj);
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
+ const len0 = WASM_VECTOR_LEN;
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
};
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
- const ret = getObject(arg0);
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
+ const ret = getStringFromWasm0(arg0, arg1);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
@@ -347,21 +390,59 @@ function getImports() {
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
};
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
- const ret = getStringFromWasm0(arg0, arg1);
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
+ const ret = getObject(arg0);
return addHeapObject(ret);
};
- imports.wbg.__wbg_modalhide_673016763df325bd = function(arg0, arg1) {
- modal_hide(getStringFromWasm0(arg0, arg1));
+ imports.wbg.__wbindgen_json_parse = function(arg0, arg1) {
+ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
+ return addHeapObject(ret);
};
- imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
+ const ret = getObject(arg0) === undefined;
+ _assertBoolean(ret);
+ return ret;
+ };
+ imports.wbg.__wbindgen_boolean_get = function(arg0) {
+ const v = getObject(arg0);
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
+ _assertNum(ret);
+ return ret;
+ };
+ imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
const obj = getObject(arg1);
- const ret = JSON.stringify(obj === undefined ? null : obj);
+ const ret = typeof(obj) === 'number' ? obj : undefined;
+ if (!isLikeNone(ret)) {
+ _assertNum(ret);
+ }
+ getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
+ getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
+ };
+ imports.wbg.__wbindgen_number_new = function(arg0) {
+ const ret = arg0;
+ return addHeapObject(ret);
+ };
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
+ takeObject(arg0);
+ };
+ imports.wbg.__wbg_error_09919627ac0992f5 = function() { return logError(function (arg0, arg1) {
+ try {
+ console.error(getStringFromWasm0(arg0, arg1));
+ } finally {
+ wasm.__wbindgen_free(arg0, arg1);
+ }
+ }, arguments) };
+ imports.wbg.__wbg_new_693216e109162396 = function() { return logError(function () {
+ const ret = new Error();
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_stack_0ddaca5d1abfb52f = function() { return logError(function (arg0, arg1) {
+ const ret = getObject(arg1).stack;
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
- };
+ }, arguments) };
imports.wbg.__wbindgen_cb_drop = function(arg0) {
const obj = takeObject(arg0).original;
if (obj.cnt-- == 1) {
@@ -369,79 +450,40 @@ function getImports() {
return true;
}
const ret = false;
+ _assertBoolean(ret);
return ret;
};
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
- const v = getObject(arg0);
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
- return ret;
- };
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
- const ret = getObject(arg0) === undefined;
- return ret;
- };
- imports.wbg.__wbindgen_json_parse = function(arg0, arg1) {
- const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
- return addHeapObject(ret);
- };
- imports.wbg.__wbindgen_number_new = function(arg0) {
- const ret = arg0;
- return addHeapObject(ret);
- };
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
- const obj = getObject(arg1);
- const ret = typeof(obj) === 'number' ? obj : undefined;
- getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
- };
- imports.wbg.__wbg_new_693216e109162396 = function() {
- const ret = new Error();
- return addHeapObject(ret);
- };
- imports.wbg.__wbg_stack_0ddaca5d1abfb52f = function(arg0, arg1) {
- const ret = getObject(arg1).stack;
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
- const len0 = WASM_VECTOR_LEN;
- getInt32Memory0()[arg0 / 4 + 1] = len0;
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
- };
- imports.wbg.__wbg_error_09919627ac0992f5 = function(arg0, arg1) {
- try {
- console.error(getStringFromWasm0(arg0, arg1));
- } finally {
- wasm.__wbindgen_free(arg0, arg1);
- }
- };
- imports.wbg.__wbg_log_06b7ffc63a0f8bee = function(arg0, arg1) {
+ imports.wbg.__wbg_log_06b7ffc63a0f8bee = function() { return logError(function (arg0, arg1) {
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
wasm.__wbindgen_free(arg0, arg1 * 4);
console.log(...v0);
- };
- imports.wbg.__wbg_warn_2aa0e7178e1d35f6 = function(arg0, arg1) {
+ }, arguments) };
+ imports.wbg.__wbg_warn_2aa0e7178e1d35f6 = function() { return logError(function (arg0, arg1) {
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
wasm.__wbindgen_free(arg0, arg1 * 4);
console.warn(...v0);
- };
- imports.wbg.__wbg_instanceof_Window_a2a08d3918d7d4d0 = function(arg0) {
+ }, arguments) };
+ imports.wbg.__wbg_instanceof_Window_a2a08d3918d7d4d0 = function() { return logError(function (arg0) {
const ret = getObject(arg0) instanceof Window;
+ _assertBoolean(ret);
return ret;
- };
- imports.wbg.__wbg_document_14a383364c173445 = function(arg0) {
+ }, arguments) };
+ imports.wbg.__wbg_document_14a383364c173445 = function() { return logError(function (arg0) {
const ret = getObject(arg0).document;
return isLikeNone(ret) ? 0 : addHeapObject(ret);
- };
- imports.wbg.__wbg_location_3b5031b281e8d218 = function(arg0) {
+ }, arguments) };
+ imports.wbg.__wbg_location_3b5031b281e8d218 = function() { return logError(function (arg0) {
const ret = getObject(arg0).location;
return addHeapObject(ret);
- };
+ }, arguments) };
imports.wbg.__wbg_history_138ac6c183c00847 = function() { return handleError(function (arg0) {
const ret = getObject(arg0).history;
return addHeapObject(ret);
}, arguments) };
- imports.wbg.__wbg_navigator_2d05aef684d827d8 = function(arg0) {
+ imports.wbg.__wbg_navigator_2d05aef684d827d8 = function() { return logError(function (arg0) {
const ret = getObject(arg0).navigator;
return addHeapObject(ret);
- };
+ }, arguments) };
imports.wbg.__wbg_localStorage_2409bbdfe5a4d2a7 = function() { return handleError(function (arg0) {
const ret = getObject(arg0).localStorage;
return isLikeNone(ret) ? 0 : addHeapObject(ret);
@@ -450,14 +492,14 @@ function getImports() {
const ret = getObject(arg0).sessionStorage;
return isLikeNone(ret) ? 0 : addHeapObject(ret);
}, arguments) };
- imports.wbg.__wbg_fetch_23507368eed8d838 = function(arg0, arg1) {
+ imports.wbg.__wbg_fetch_23507368eed8d838 = function() { return logError(function (arg0, arg1) {
const ret = getObject(arg0).fetch(getObject(arg1));
return addHeapObject(ret);
- };
- imports.wbg.__wbg_body_36a11f2467926b2b = function(arg0) {
+ }, arguments) };
+ imports.wbg.__wbg_body_36a11f2467926b2b = function() { return logError(function (arg0) {
const ret = getObject(arg0).body;
return isLikeNone(ret) ? 0 : addHeapObject(ret);
- };
+ }, arguments) };
imports.wbg.__wbg_createElement_2d8b75cffbd32c70 = function() { return handleError(function (arg0, arg1, arg2) {
const ret = getObject(arg0).createElement(getStringFromWasm0(arg1, arg2));
return addHeapObject(ret);
@@ -466,185 +508,18 @@ function getImports() {
const ret = getObject(arg0).createElementNS(arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
return addHeapObject(ret);
}, arguments) };
- imports.wbg.__wbg_createTextNode_cdbaccf3b941b486 = function(arg0, arg1, arg2) {
+ imports.wbg.__wbg_createTextNode_cdbaccf3b941b486 = function() { return logError(function (arg0, arg1, arg2) {
const ret = getObject(arg0).createTextNode(getStringFromWasm0(arg1, arg2));
return addHeapObject(ret);
- };
- imports.wbg.__wbg_getElementById_0c9415d96f5b9ec6 = function(arg0, arg1, arg2) {
+ }, arguments) };
+ imports.wbg.__wbg_getElementById_0c9415d96f5b9ec6 = function() { return logError(function (arg0, arg1, arg2) {
const ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2));
return isLikeNone(ret) ? 0 : addHeapObject(ret);
- };
+ }, arguments) };
imports.wbg.__wbg_querySelector_d5f2cd97210290fd = function() { return handleError(function (arg0, arg1, arg2) {
const ret = getObject(arg0).querySelector(getStringFromWasm0(arg1, arg2));
return isLikeNone(ret) ? 0 : addHeapObject(ret);
}, arguments) };
- imports.wbg.__wbg_get_053104ee983370de = function() { return handleError(function (arg0, arg1, arg2, arg3) {
- const ret = getObject(arg1).get(getStringFromWasm0(arg2, arg3));
- 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;
- }, arguments) };
- imports.wbg.__wbg_set_23d56ff06768e13b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
- getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
- }, arguments) };
- imports.wbg.__wbg_pathname_362af71fbfa579b5 = function(arg0, arg1) {
- const ret = getObject(arg1).pathname;
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
- const len0 = WASM_VECTOR_LEN;
- getInt32Memory0()[arg0 / 4 + 1] = len0;
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
- };
- imports.wbg.__wbg_new_f508102bcfd6feb6 = function() { return handleError(function (arg0, arg1) {
- const ret = new URL(getStringFromWasm0(arg0, arg1));
- return addHeapObject(ret);
- }, arguments) };
- imports.wbg.__wbg_value_92e4233a8e4ce8c1 = function(arg0, arg1) {
- const ret = getObject(arg1).value;
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
- const len0 = WASM_VECTOR_LEN;
- getInt32Memory0()[arg0 / 4 + 1] = len0;
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
- };
- imports.wbg.__wbg_setvalue_61440ce246b0279d = function(arg0, arg1, arg2) {
- getObject(arg0).value = getStringFromWasm0(arg1, arg2);
- };
- imports.wbg.__wbg_headers_3618f72dcec019b7 = function(arg0) {
- const ret = getObject(arg0).headers;
- return addHeapObject(ret);
- };
- imports.wbg.__wbg_newwithstrandinit_41c86e821f771b24 = function() { return handleError(function (arg0, arg1, arg2) {
- const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
- return addHeapObject(ret);
- }, arguments) };
- imports.wbg.__wbg_add_2c230dc2850cac52 = function() { return handleError(function (arg0, arg1, arg2) {
- getObject(arg0).add(getStringFromWasm0(arg1, arg2));
- }, arguments) };
- imports.wbg.__wbg_remove_1e3a41bd96b25c83 = function() { return handleError(function (arg0, arg1, arg2) {
- getObject(arg0).remove(getStringFromWasm0(arg1, arg2));
- }, arguments) };
- imports.wbg.__wbg_get_f93fc477a365e405 = function() { return handleError(function (arg0, arg1) {
- const ret = getObject(arg0).get(getObject(arg1));
- return addHeapObject(ret);
- }, arguments) };
- imports.wbg.__wbg_href_3e6228257a9ec234 = function(arg0, arg1) {
- const ret = getObject(arg1).href;
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
- const len0 = WASM_VECTOR_LEN;
- getInt32Memory0()[arg0 / 4 + 1] = len0;
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
- };
- imports.wbg.__wbg_instanceof_HtmlInputElement_756d5883770e3491 = function(arg0) {
- const ret = getObject(arg0) instanceof HTMLInputElement;
- return ret;
- };
- imports.wbg.__wbg_setchecked_5ce7b275aa2d0bbd = function(arg0, arg1) {
- getObject(arg0).checked = arg1 !== 0;
- };
- imports.wbg.__wbg_value_5573c798506a4119 = function(arg0, arg1) {
- const ret = getObject(arg1).value;
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
- const len0 = WASM_VECTOR_LEN;
- getInt32Memory0()[arg0 / 4 + 1] = len0;
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
- };
- imports.wbg.__wbg_setvalue_f3bd4ea96d361b70 = function(arg0, arg1, arg2) {
- getObject(arg0).value = getStringFromWasm0(arg1, arg2);
- };
- imports.wbg.__wbg_getClientExtensionResults_6f7de95bed8d48ef = function(arg0) {
- const ret = getObject(arg0).getClientExtensionResults();
- return addHeapObject(ret);
- };
- imports.wbg.__wbg_instanceof_Element_9a257409019cee1b = function(arg0) {
- const ret = getObject(arg0) instanceof Element;
- return ret;
- };
- imports.wbg.__wbg_namespaceURI_46712e5b566ccc37 = function(arg0, arg1) {
- const ret = getObject(arg1).namespaceURI;
- 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.__wbg_classList_69b08a61aad2445b = function(arg0) {
- const ret = getObject(arg0).classList;
- return addHeapObject(ret);
- };
- imports.wbg.__wbg_setinnerHTML_c3959ab1092c9bae = function(arg0, arg1, arg2) {
- getObject(arg0).innerHTML = getStringFromWasm0(arg1, arg2);
- };
- imports.wbg.__wbg_removeAttribute_8f6b6cf6fe7a2054 = function() { return handleError(function (arg0, arg1, arg2) {
- getObject(arg0).removeAttribute(getStringFromWasm0(arg1, arg2));
- }, arguments) };
- imports.wbg.__wbg_setAttribute_6091f6f3602fc299 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
- getObject(arg0).setAttribute(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
- }, arguments) };
- imports.wbg.__wbg_instanceof_HtmlElement_d2b7afdac18ee070 = function(arg0) {
- const ret = getObject(arg0) instanceof HTMLElement;
- return ret;
- };
- imports.wbg.__wbg_focus_c3aa381bd2a1b65c = function() { return handleError(function (arg0) {
- getObject(arg0).focus();
- }, arguments) };
- imports.wbg.__wbg_instanceof_Event_16c4141f82752987 = function(arg0) {
- const ret = getObject(arg0) instanceof Event;
- return ret;
- };
- imports.wbg.__wbg_target_98e6e332956ee051 = function(arg0) {
- const ret = getObject(arg0).target;
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
- };
- imports.wbg.__wbg_cancelBubble_050e4dd024a8d3f8 = function(arg0) {
- const ret = getObject(arg0).cancelBubble;
- return ret;
- };
- imports.wbg.__wbg_preventDefault_2e92eb64f38efc0d = function(arg0) {
- getObject(arg0).preventDefault();
- };
- imports.wbg.__wbg_credentials_544a26c31049992f = function(arg0) {
- const ret = getObject(arg0).credentials;
- return addHeapObject(ret);
- };
- imports.wbg.__wbg_instanceof_HtmlDocument_85f8820e092a58bd = function(arg0) {
- const ret = getObject(arg0) instanceof HTMLDocument;
- return ret;
- };
- imports.wbg.__wbg_cookie_6a5bd022c585a389 = function() { return handleError(function (arg0, arg1) {
- const ret = getObject(arg1).cookie;
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
- const len0 = WASM_VECTOR_LEN;
- getInt32Memory0()[arg0 / 4 + 1] = len0;
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
- }, arguments) };
- imports.wbg.__wbg_addEventListener_a77a92f38176616e = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
- getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), getObject(arg4));
- }, arguments) };
- imports.wbg.__wbg_removeEventListener_2882dfde82b5b4d9 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
- getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), arg4 !== 0);
- }, arguments) };
- imports.wbg.__wbg_parentElement_479f575ed7e67715 = function(arg0) {
- const ret = getObject(arg0).parentElement;
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
- };
- imports.wbg.__wbg_lastChild_0df6447e8b05813b = function(arg0) {
- const ret = getObject(arg0).lastChild;
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
- };
- imports.wbg.__wbg_setnodeValue_103010d70088271d = function(arg0, arg1, arg2) {
- getObject(arg0).nodeValue = arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2);
- };
- imports.wbg.__wbg_appendChild_e9d52952defb480f = function() { return handleError(function (arg0, arg1) {
- const ret = getObject(arg0).appendChild(getObject(arg1));
- return addHeapObject(ret);
- }, arguments) };
- imports.wbg.__wbg_insertBefore_8a88fe62c2fad6ca = function() { return handleError(function (arg0, arg1, arg2) {
- const ret = getObject(arg0).insertBefore(getObject(arg1), getObject(arg2));
- return addHeapObject(ret);
- }, arguments) };
- imports.wbg.__wbg_removeChild_67ab7410bea7e2cb = function() { return handleError(function (arg0, arg1) {
- const ret = getObject(arg0).removeChild(getObject(arg1));
- return addHeapObject(ret);
- }, arguments) };
imports.wbg.__wbg_pushState_54f843ea8212e98f = 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) };
@@ -665,18 +540,43 @@ function getImports() {
imports.wbg.__wbg_replace_22c22b6b59d0a5ff = function() { return handleError(function (arg0, arg1, arg2) {
getObject(arg0).replace(getStringFromWasm0(arg1, arg2));
}, arguments) };
- imports.wbg.__wbg_instanceof_Response_e928c54c1025470c = function(arg0) {
+ imports.wbg.__wbg_parentElement_479f575ed7e67715 = function() { return logError(function (arg0) {
+ const ret = getObject(arg0).parentElement;
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_lastChild_0df6447e8b05813b = function() { return logError(function (arg0) {
+ const ret = getObject(arg0).lastChild;
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_setnodeValue_103010d70088271d = function() { return logError(function (arg0, arg1, arg2) {
+ getObject(arg0).nodeValue = arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2);
+ }, arguments) };
+ imports.wbg.__wbg_appendChild_e9d52952defb480f = function() { return handleError(function (arg0, arg1) {
+ const ret = getObject(arg0).appendChild(getObject(arg1));
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_insertBefore_8a88fe62c2fad6ca = function() { return handleError(function (arg0, arg1, arg2) {
+ const ret = getObject(arg0).insertBefore(getObject(arg1), getObject(arg2));
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_removeChild_67ab7410bea7e2cb = function() { return handleError(function (arg0, arg1) {
+ const ret = getObject(arg0).removeChild(getObject(arg1));
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_instanceof_Response_e928c54c1025470c = function() { return logError(function (arg0) {
const ret = getObject(arg0) instanceof Response;
+ _assertBoolean(ret);
return ret;
- };
- imports.wbg.__wbg_status_5b4a574de7c5bbfe = function(arg0) {
+ }, arguments) };
+ imports.wbg.__wbg_status_5b4a574de7c5bbfe = function() { return logError(function (arg0) {
const ret = getObject(arg0).status;
+ _assertNum(ret);
return ret;
- };
- imports.wbg.__wbg_headers_1dc1ef92ba3d32b1 = function(arg0) {
+ }, arguments) };
+ imports.wbg.__wbg_headers_1dc1ef92ba3d32b1 = function() { return logError(function (arg0) {
const ret = getObject(arg0).headers;
return addHeapObject(ret);
- };
+ }, arguments) };
imports.wbg.__wbg_json_6416cf78642ce433 = function() { return handleError(function (arg0) {
const ret = getObject(arg0).json();
return addHeapObject(ret);
@@ -698,26 +598,219 @@ function getImports() {
imports.wbg.__wbg_setItem_04c4ba5c4a9c337f = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
getObject(arg0).setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
}, arguments) };
- imports.wbg.__wbg_new_2ab697f1555e0dbc = function() {
+ imports.wbg.__wbg_get_053104ee983370de = function() { return handleError(function (arg0, arg1, arg2, arg3) {
+ const ret = getObject(arg1).get(getStringFromWasm0(arg2, arg3));
+ 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;
+ }, arguments) };
+ imports.wbg.__wbg_set_23d56ff06768e13b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
+ getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
+ }, arguments) };
+ imports.wbg.__wbg_headers_3618f72dcec019b7 = function() { return logError(function (arg0) {
+ const ret = getObject(arg0).headers;
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_newwithstrandinit_41c86e821f771b24 = function() { return handleError(function (arg0, arg1, arg2) {
+ const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_pathname_362af71fbfa579b5 = function() { return logError(function (arg0, arg1) {
+ const ret = getObject(arg1).pathname;
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
+ const len0 = WASM_VECTOR_LEN;
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
+ }, arguments) };
+ imports.wbg.__wbg_new_f508102bcfd6feb6 = function() { return handleError(function (arg0, arg1) {
+ const ret = new URL(getStringFromWasm0(arg0, arg1));
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_get_f93fc477a365e405 = function() { return handleError(function (arg0, arg1) {
+ const ret = getObject(arg0).get(getObject(arg1));
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_add_2c230dc2850cac52 = function() { return handleError(function (arg0, arg1, arg2) {
+ getObject(arg0).add(getStringFromWasm0(arg1, arg2));
+ }, arguments) };
+ imports.wbg.__wbg_remove_1e3a41bd96b25c83 = function() { return handleError(function (arg0, arg1, arg2) {
+ getObject(arg0).remove(getStringFromWasm0(arg1, arg2));
+ }, arguments) };
+ imports.wbg.__wbg_value_92e4233a8e4ce8c1 = function() { return logError(function (arg0, arg1) {
+ const ret = getObject(arg1).value;
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
+ const len0 = WASM_VECTOR_LEN;
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
+ }, arguments) };
+ imports.wbg.__wbg_setvalue_61440ce246b0279d = function() { return logError(function (arg0, arg1, arg2) {
+ getObject(arg0).value = getStringFromWasm0(arg1, arg2);
+ }, arguments) };
+ imports.wbg.__wbg_instanceof_Element_9a257409019cee1b = function() { return logError(function (arg0) {
+ const ret = getObject(arg0) instanceof Element;
+ _assertBoolean(ret);
+ return ret;
+ }, arguments) };
+ imports.wbg.__wbg_namespaceURI_46712e5b566ccc37 = function() { return logError(function (arg0, arg1) {
+ const ret = getObject(arg1).namespaceURI;
+ 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;
+ }, arguments) };
+ imports.wbg.__wbg_classList_69b08a61aad2445b = function() { return logError(function (arg0) {
+ const ret = getObject(arg0).classList;
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_setinnerHTML_c3959ab1092c9bae = function() { return logError(function (arg0, arg1, arg2) {
+ getObject(arg0).innerHTML = getStringFromWasm0(arg1, arg2);
+ }, arguments) };
+ imports.wbg.__wbg_removeAttribute_8f6b6cf6fe7a2054 = function() { return handleError(function (arg0, arg1, arg2) {
+ getObject(arg0).removeAttribute(getStringFromWasm0(arg1, arg2));
+ }, arguments) };
+ imports.wbg.__wbg_setAttribute_6091f6f3602fc299 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
+ getObject(arg0).setAttribute(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
+ }, arguments) };
+ imports.wbg.__wbg_instanceof_HtmlElement_d2b7afdac18ee070 = function() { return logError(function (arg0) {
+ const ret = getObject(arg0) instanceof HTMLElement;
+ _assertBoolean(ret);
+ return ret;
+ }, arguments) };
+ imports.wbg.__wbg_focus_c3aa381bd2a1b65c = function() { return handleError(function (arg0) {
+ getObject(arg0).focus();
+ }, arguments) };
+ imports.wbg.__wbg_href_3e6228257a9ec234 = function() { return logError(function (arg0, arg1) {
+ const ret = getObject(arg1).href;
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
+ const len0 = WASM_VECTOR_LEN;
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
+ }, arguments) };
+ imports.wbg.__wbg_instanceof_HtmlInputElement_756d5883770e3491 = function() { return logError(function (arg0) {
+ const ret = getObject(arg0) instanceof HTMLInputElement;
+ _assertBoolean(ret);
+ return ret;
+ }, arguments) };
+ imports.wbg.__wbg_setchecked_5ce7b275aa2d0bbd = function() { return logError(function (arg0, arg1) {
+ getObject(arg0).checked = arg1 !== 0;
+ }, arguments) };
+ imports.wbg.__wbg_value_5573c798506a4119 = function() { return logError(function (arg0, arg1) {
+ const ret = getObject(arg1).value;
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
+ const len0 = WASM_VECTOR_LEN;
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
+ }, arguments) };
+ imports.wbg.__wbg_setvalue_f3bd4ea96d361b70 = function() { return logError(function (arg0, arg1, arg2) {
+ getObject(arg0).value = getStringFromWasm0(arg1, arg2);
+ }, arguments) };
+ imports.wbg.__wbg_getClientExtensionResults_6f7de95bed8d48ef = function() { return logError(function (arg0) {
+ const ret = getObject(arg0).getClientExtensionResults();
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_instanceof_Event_16c4141f82752987 = function() { return logError(function (arg0) {
+ const ret = getObject(arg0) instanceof Event;
+ _assertBoolean(ret);
+ return ret;
+ }, arguments) };
+ imports.wbg.__wbg_target_98e6e332956ee051 = function() { return logError(function (arg0) {
+ const ret = getObject(arg0).target;
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_cancelBubble_050e4dd024a8d3f8 = function() { return logError(function (arg0) {
+ const ret = getObject(arg0).cancelBubble;
+ _assertBoolean(ret);
+ return ret;
+ }, arguments) };
+ imports.wbg.__wbg_preventDefault_2e92eb64f38efc0d = function() { return logError(function (arg0) {
+ getObject(arg0).preventDefault();
+ }, arguments) };
+ imports.wbg.__wbg_credentials_544a26c31049992f = function() { return logError(function (arg0) {
+ const ret = getObject(arg0).credentials;
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_addEventListener_a77a92f38176616e = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
+ getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), getObject(arg4));
+ }, arguments) };
+ imports.wbg.__wbg_removeEventListener_2882dfde82b5b4d9 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
+ getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), arg4 !== 0);
+ }, arguments) };
+ imports.wbg.__wbg_instanceof_HtmlDocument_85f8820e092a58bd = function() { return logError(function (arg0) {
+ const ret = getObject(arg0) instanceof HTMLDocument;
+ _assertBoolean(ret);
+ return ret;
+ }, arguments) };
+ imports.wbg.__wbg_cookie_6a5bd022c585a389 = function() { return handleError(function (arg0, arg1) {
+ const ret = getObject(arg1).cookie;
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
+ const len0 = WASM_VECTOR_LEN;
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
+ }, arguments) };
+ imports.wbg.__wbg_new_2ab697f1555e0dbc = function() { return logError(function () {
const ret = new Array();
return addHeapObject(ret);
- };
- imports.wbg.__wbg_newnoargs_fc5356289219b93b = function(arg0, arg1) {
- const ret = new Function(getStringFromWasm0(arg0, arg1));
+ }, arguments) };
+ imports.wbg.__wbg_push_811c8b08bf4ff9d5 = function() { return logError(function (arg0, arg1) {
+ const ret = getObject(arg0).push(getObject(arg1));
+ _assertNum(ret);
+ return ret;
+ }, arguments) };
+ imports.wbg.__wbg_instanceof_Error_53fd3b982f19be06 = function() { return logError(function (arg0) {
+ const ret = getObject(arg0) instanceof Error;
+ _assertBoolean(ret);
+ return ret;
+ }, arguments) };
+ imports.wbg.__wbg_message_136debd54c3edfe4 = function() { return logError(function (arg0) {
+ const ret = getObject(arg0).message;
return addHeapObject(ret);
- };
- imports.wbg.__wbg_get_89247d3aeaa38cc5 = function() { return handleError(function (arg0, arg1) {
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
+ }, arguments) };
+ imports.wbg.__wbg_name_d0cc50bf0e4abe7f = function() { return logError(function (arg0) {
+ const ret = getObject(arg0).name;
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_toString_ef76a2af8f5bb98a = function() { return logError(function (arg0) {
+ const ret = getObject(arg0).toString();
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_newnoargs_fc5356289219b93b = function() { return logError(function (arg0, arg1) {
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_call_4573f605ca4b5f10 = function() { return handleError(function (arg0, arg1) {
const ret = getObject(arg0).call(getObject(arg1));
return addHeapObject(ret);
}, arguments) };
- imports.wbg.__wbg_new_306ce8d57919e6ae = function() {
+ imports.wbg.__wbg_valueOf_3520735ced6d6137 = function() { return logError(function (arg0) {
+ const ret = getObject(arg0).valueOf();
+ return ret;
+ }, arguments) };
+ imports.wbg.__wbg_is_aafa609b540ad47f = function() { return logError(function (arg0, arg1) {
+ const ret = Object.is(getObject(arg0), getObject(arg1));
+ _assertBoolean(ret);
+ return ret;
+ }, arguments) };
+ imports.wbg.__wbg_new_306ce8d57919e6ae = function() { return logError(function () {
const ret = new Object();
return addHeapObject(ret);
- };
+ }, arguments) };
+ imports.wbg.__wbg_resolve_f269ce174f88b294 = function() { return logError(function (arg0) {
+ const ret = Promise.resolve(getObject(arg0));
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_then_1c698eedca15eed6 = function() { return logError(function (arg0, arg1) {
+ const ret = getObject(arg0).then(getObject(arg1));
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_then_4debc41d4fc92ce5 = function() { return logError(function (arg0, arg1, arg2) {
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_globalThis_56d9c9f814daeeee = function() { return handleError(function () {
+ const ret = globalThis.globalThis;
+ return addHeapObject(ret);
+ }, arguments) };
imports.wbg.__wbg_self_ba1ddafe9ea7a3a2 = function() { return handleError(function () {
const ret = self.self;
return addHeapObject(ret);
@@ -726,75 +819,37 @@ function getImports() {
const ret = window.window;
return addHeapObject(ret);
}, arguments) };
- imports.wbg.__wbg_globalThis_56d9c9f814daeeee = function() { return handleError(function () {
- const ret = globalThis.globalThis;
- return addHeapObject(ret);
- }, arguments) };
imports.wbg.__wbg_global_8c35aeee4ac77f2b = function() { return handleError(function () {
const ret = global.global;
return addHeapObject(ret);
}, arguments) };
- imports.wbg.__wbg_push_811c8b08bf4ff9d5 = function(arg0, arg1) {
- const ret = getObject(arg0).push(getObject(arg1));
- return ret;
- };
- imports.wbg.__wbg_instanceof_Error_53fd3b982f19be06 = function(arg0) {
- const ret = getObject(arg0) instanceof Error;
- return ret;
- };
- imports.wbg.__wbg_message_136debd54c3edfe4 = function(arg0) {
- const ret = getObject(arg0).message;
- return addHeapObject(ret);
- };
- imports.wbg.__wbg_name_d0cc50bf0e4abe7f = function(arg0) {
- const ret = getObject(arg0).name;
- return addHeapObject(ret);
- };
- imports.wbg.__wbg_toString_ef76a2af8f5bb98a = function(arg0) {
- const ret = getObject(arg0).toString();
- return addHeapObject(ret);
- };
- imports.wbg.__wbg_valueOf_3520735ced6d6137 = function(arg0) {
- const ret = getObject(arg0).valueOf();
- return ret;
- };
- imports.wbg.__wbg_is_aafa609b540ad47f = function(arg0, arg1) {
- const ret = Object.is(getObject(arg0), getObject(arg1));
- return ret;
- };
- imports.wbg.__wbg_resolve_f269ce174f88b294 = function(arg0) {
- const ret = Promise.resolve(getObject(arg0));
- return addHeapObject(ret);
- };
- imports.wbg.__wbg_then_1c698eedca15eed6 = function(arg0, arg1) {
- const ret = getObject(arg0).then(getObject(arg1));
- return addHeapObject(ret);
- };
- imports.wbg.__wbg_then_4debc41d4fc92ce5 = function(arg0, arg1, arg2) {
- const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
- return addHeapObject(ret);
- };
- imports.wbg.__wbg_buffer_de1150f91b23aa89 = function(arg0) {
- const ret = getObject(arg0).buffer;
- return addHeapObject(ret);
- };
- imports.wbg.__wbg_newwithbyteoffsetandlength_9ca61320599a2c84 = function(arg0, arg1, arg2) {
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
- return addHeapObject(ret);
- };
- imports.wbg.__wbg_new_97cf52648830a70d = function(arg0) {
+ imports.wbg.__wbg_new_97cf52648830a70d = function() { return logError(function (arg0) {
const ret = new Uint8Array(getObject(arg0));
return addHeapObject(ret);
- };
- imports.wbg.__wbg_set_a0172b213e2469e9 = function(arg0, arg1, arg2) {
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
- };
- imports.wbg.__wbg_length_e09c0b925ab8de5d = function(arg0) {
+ }, arguments) };
+ imports.wbg.__wbg_newwithbyteoffsetandlength_9ca61320599a2c84 = function() { return logError(function (arg0, arg1, arg2) {
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_length_e09c0b925ab8de5d = function() { return logError(function (arg0) {
const ret = getObject(arg0).length;
+ _assertNum(ret);
return ret;
- };
+ }, arguments) };
+ imports.wbg.__wbg_set_a0172b213e2469e9 = function() { return logError(function (arg0, arg1, arg2) {
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
+ }, arguments) };
+ imports.wbg.__wbg_buffer_de1150f91b23aa89 = function() { return logError(function (arg0) {
+ const ret = getObject(arg0).buffer;
+ return addHeapObject(ret);
+ }, arguments) };
+ imports.wbg.__wbg_get_89247d3aeaa38cc5 = function() { return handleError(function (arg0, arg1) {
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
+ return addHeapObject(ret);
+ }, arguments) };
imports.wbg.__wbg_set_b12cd0ab82903c2f = function() { return handleError(function (arg0, arg1, arg2) {
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
+ _assertBoolean(ret);
return ret;
}, arguments) };
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
@@ -811,18 +866,18 @@ function getImports() {
const ret = wasm.memory;
return addHeapObject(ret);
};
- imports.wbg.__wbindgen_closure_wrapper2128 = function(arg0, arg1, arg2) {
- const ret = makeMutClosure(arg0, arg1, 871, __wbg_adapter_30);
+ imports.wbg.__wbindgen_closure_wrapper19331 = function() { return logError(function (arg0, arg1, arg2) {
+ const ret = makeClosure(arg0, arg1, 1306, __wbg_adapter_30);
return addHeapObject(ret);
- };
- imports.wbg.__wbindgen_closure_wrapper2356 = function(arg0, arg1, arg2) {
- const ret = makeClosure(arg0, arg1, 916, __wbg_adapter_33);
+ }, arguments) };
+ imports.wbg.__wbindgen_closure_wrapper23261 = function() { return logError(function (arg0, arg1, arg2) {
+ const ret = makeMutClosure(arg0, arg1, 1331, __wbg_adapter_33);
return addHeapObject(ret);
- };
- imports.wbg.__wbindgen_closure_wrapper2501 = function(arg0, arg1, arg2) {
- const ret = makeMutClosure(arg0, arg1, 959, __wbg_adapter_36);
+ }, arguments) };
+ imports.wbg.__wbindgen_closure_wrapper23862 = function() { return logError(function (arg0, arg1, arg2) {
+ const ret = makeMutClosure(arg0, arg1, 1357, __wbg_adapter_36);
return addHeapObject(ret);
- };
+ }, arguments) };
return imports;
}
diff --git a/kanidmd_web_ui/pkg/kanidmd_web_ui_bg.wasm b/kanidmd_web_ui/pkg/kanidmd_web_ui_bg.wasm
index 50f7951d4..89b533d5c 100644
Binary files a/kanidmd_web_ui/pkg/kanidmd_web_ui_bg.wasm and b/kanidmd_web_ui/pkg/kanidmd_web_ui_bg.wasm differ
diff --git a/kanidmd_web_ui/pkg/kanidmd_web_ui_bg.wasm.d.ts b/kanidmd_web_ui/pkg/kanidmd_web_ui_bg.wasm.d.ts
index 1be85344c..0c50c59fd 100644
--- a/kanidmd_web_ui/pkg/kanidmd_web_ui_bg.wasm.d.ts
+++ b/kanidmd_web_ui/pkg/kanidmd_web_ui_bg.wasm.d.ts
@@ -5,9 +5,9 @@ export function run_app(a: number): void;
export function __wbindgen_malloc(a: number): number;
export function __wbindgen_realloc(a: number, b: number, c: number): number;
export const __wbindgen_export_2: WebAssembly.Table;
-export function _dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hab3be56b8155b388(a: number, b: number, c: number): void;
-export function _dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h17af29331a011f5b(a: number, b: number, c: number): void;
-export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h67ec72bbd39c79bf(a: number, b: number, c: number): void;
+export function _dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8142cf0979e67d24(a: number, b: number, c: number): void;
+export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfed1f3471f1b926f(a: number, b: number, c: number): void;
+export function _dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3b7aa7dd2123cac1(a: number, b: number, c: number): void;
export function __wbindgen_add_to_stack_pointer(a: number): number;
export function __wbindgen_free(a: number, b: number): void;
export function __wbindgen_exn_store(a: number): void;
diff --git a/kanidmd_web_ui/pkg/style.css b/kanidmd_web_ui/pkg/style.css
index f1a9f294f..8f7a8fcc6 100644
--- a/kanidmd_web_ui/pkg/style.css
+++ b/kanidmd_web_ui/pkg/style.css
@@ -19,9 +19,8 @@ body {
}
.form-signin {
- width: 100%;
- max-width: 330px;
- padding: 15px;
+ /* width: 100%; */
+ max-width: 680px;
margin: auto;
}
diff --git a/kanidmd_web_ui/src/credential/reset.rs b/kanidmd_web_ui/src/credential/reset.rs
index 37899ba7f..cb9ecceca 100644
--- a/kanidmd_web_ui/src/credential/reset.rs
+++ b/kanidmd_web_ui/src/credential/reset.rs
@@ -150,7 +150,9 @@ impl Component for CredentialResetApp {
let next_state = match (msg, &self.state) {
(Msg::Ignore, _) => None,
(Msg::TokenSubmit, State::TokenInput) => {
- let token = utils::get_value_from_element_id("autofocus").expect("No token");
+ #[allow(clippy::expect_used)]
+ let token = utils::get_value_from_element_id("autofocus")
+ .expect("Unable to find autofocus element");
ctx.link().send_future(async {
match Self::exchange_intent_token(token).await {
diff --git a/kanidmd_web_ui/src/img/apple-touch-icon.png b/kanidmd_web_ui/src/img/apple-touch-icon.png
new file mode 100644
index 000000000..984ab1c6e
Binary files /dev/null and b/kanidmd_web_ui/src/img/apple-touch-icon.png differ
diff --git a/kanidmd_web_ui/src/img/logo-180.png b/kanidmd_web_ui/src/img/logo-180.png
new file mode 100644
index 000000000..04dec4d0a
Binary files /dev/null and b/kanidmd_web_ui/src/img/logo-180.png differ
diff --git a/kanidmd_web_ui/src/img/logo-192.png b/kanidmd_web_ui/src/img/logo-192.png
new file mode 100644
index 000000000..d5d973a61
Binary files /dev/null and b/kanidmd_web_ui/src/img/logo-192.png differ
diff --git a/kanidmd_web_ui/src/img/logo-256.png b/kanidmd_web_ui/src/img/logo-256.png
new file mode 100644
index 000000000..984ab1c6e
Binary files /dev/null and b/kanidmd_web_ui/src/img/logo-256.png differ
diff --git a/kanidmd_web_ui/src/img/logo-512.png b/kanidmd_web_ui/src/img/logo-512.png
new file mode 100644
index 000000000..53e4ff8af
Binary files /dev/null and b/kanidmd_web_ui/src/img/logo-512.png differ
diff --git a/kanidmd_web_ui/src/img/logo-square.svg b/kanidmd_web_ui/src/img/logo-square.svg
deleted file mode 100644
index 334b289f1..000000000
--- a/kanidmd_web_ui/src/img/logo-square.svg
+++ /dev/null
@@ -1,253 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- image/svg+xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AUTHSTRALIA
- PASSPORT
-
-
-
-
-
- KANIDM
-
-
-
-
diff --git a/kanidmd_web_ui/src/img/logo-square.svg b/kanidmd_web_ui/src/img/logo-square.svg
new file mode 120000
index 000000000..b07a7ddce
--- /dev/null
+++ b/kanidmd_web_ui/src/img/logo-square.svg
@@ -0,0 +1 @@
+../../../artwork/logo-square.svg
\ No newline at end of file
diff --git a/kanidmd_web_ui/src/login.rs b/kanidmd_web_ui/src/login.rs
index 5491d7fc3..4f14c01a5 100644
--- a/kanidmd_web_ui/src/login.rs
+++ b/kanidmd_web_ui/src/login.rs
@@ -43,6 +43,7 @@ enum LoginState {
Authenticated,
}
+const CLASSES_TO_ADD: &[&str] = &["flex-column", "d-flex", "h-100"];
pub enum LoginAppMsg {
Input(String),
Restart,
@@ -222,7 +223,7 @@ impl LoginApp {
-
+
{ for allowed.iter()
.enumerate()
.map(|(idx, allow)| self.render_auth_allowed(ctx, idx, allow)) }
@@ -240,7 +241,7 @@ impl LoginApp {
>
@@ -458,14 +465,16 @@ impl Component for LoginApp {
.cookie()
.expect_throw("failed to access page cookies");
console::log!("cookies".to_string());
- console::log!(cookie.to_string());
+ console::log!(cookie);
let state = LoginState::Init(true);
// startConfetti();
- if let Err(e) = crate::utils::body().class_list().add_1("form-signin-body") {
- console::log!(format!("class_list add error -> {:?}", e));
- };
+ for x in CLASSES_TO_ADD {
+ if let Err(e) = crate::utils::body().class_list().add_1(x) {
+ console::log!(format!("class_list add error -> {:?}", e));
+ };
+ }
LoginApp {
inputvalue,
@@ -767,26 +776,38 @@ impl Component for LoginApp {
// TODO: add the domain_display_name here
html! {
-
-
-
-
- { "Kanidm Alpha" }
-
-
+ <>
+
+
+
+ { "Kanidm idm.example.com" }
+
{ self.view_state(ctx) }
-
- }
+
+
+ >
+ }
}
fn destroy(&mut self, _ctx: &Context) {
console::log!("login::destroy".to_string());
- if let Err(e) = crate::utils::body()
- .class_list()
- .remove_1("form-signin-body")
- {
- console::log!(format!("class_list remove error -> {:?}", e));
+
+ for x in CLASSES_TO_ADD {
+ if let Err(e) = crate::utils::body().class_list().remove_1(x) {
+ console::log!(format!("class_list remove error -> {:?}", e));
+ };
}
+
+ // if let Err(e) = crate::utils::body()
+ // .class_list()
+ // .remove_1("form-signin-body")
+ // {
+ // console::log!(format!("class_list remove error -> {:?}", e));
+ // }
}
fn rendered(&mut self, _ctx: &Context, _first_render: bool) {
diff --git a/kanidmd_web_ui/src/style.css b/kanidmd_web_ui/src/style.css
index f1a9f294f..8f7a8fcc6 100644
--- a/kanidmd_web_ui/src/style.css
+++ b/kanidmd_web_ui/src/style.css
@@ -19,9 +19,8 @@ body {
}
.form-signin {
- width: 100%;
- max-width: 330px;
- padding: 15px;
+ /* width: 100%; */
+ max-width: 680px;
margin: auto;
}
diff --git a/kanidmd_web_ui/src/views/mod.rs b/kanidmd_web_ui/src/views/mod.rs
index 826026f32..bae7c0fd9 100644
--- a/kanidmd_web_ui/src/views/mod.rs
+++ b/kanidmd_web_ui/src/views/mod.rs
@@ -15,9 +15,11 @@ use web_sys::{Request, RequestInit, RequestMode, Response};
mod apps;
mod components;
+mod profile;
mod security;
use apps::AppsApp;
+use profile::ProfileApp;
use security::SecurityApp;
#[derive(Routable, PartialEq, Clone, Debug, Serialize, Deserialize)]
@@ -25,6 +27,9 @@ pub enum ViewRoute {
#[at("/ui/view/apps")]
Apps,
+ #[at("/ui/view/profile")]
+ Profile,
+
#[at("/ui/view/security")]
Security,
@@ -73,6 +78,7 @@ fn switch(route: &ViewRoute) -> Html {
match route {
ViewRoute::Apps => html! { },
+ ViewRoute::Profile => html! { },
ViewRoute::Security => html! { },
ViewRoute::NotFound => html! {
to={Route::NotFound}/>
@@ -221,6 +227,13 @@ impl ViewsApp {
>
+
+ classes="nav-link" to={ViewRoute::Profile}>
+
+ { "Profile" }
+ >
+
+
classes="nav-link" to={ViewRoute::Security}>
diff --git a/kanidmd_web_ui/src/views/profile.rs b/kanidmd_web_ui/src/views/profile.rs
new file mode 100644
index 000000000..8f47d7320
--- /dev/null
+++ b/kanidmd_web_ui/src/views/profile.rs
@@ -0,0 +1,125 @@
+// use crate::error::*;
+// use crate::models;
+// use crate::utils;
+use crate::views::ViewProps;
+
+use compact_jwt::{Jws, JwsUnverified};
+use gloo::console;
+use kanidm_proto::v1::UserAuthToken;
+use std::str::FromStr;
+use wasm_bindgen::UnwrapThrowExt;
+use yew::prelude::*;
+// use web_sys::{Request, RequestInit, RequestMode, Response};
+
+pub enum Msg {
+ // Nothing
+}
+
+// User Profile UI
+pub struct ProfileApp {}
+
+impl Component for ProfileApp {
+ type Message = Msg;
+ type Properties = ViewProps;
+
+ fn create(_ctx: &Context) -> Self {
+ console::log!("views::profile::create");
+ ProfileApp {}
+ }
+
+ fn changed(&mut self, _ctx: &Context) -> bool {
+ console::log!("views::profile::changed");
+ false
+ }
+
+ fn update(&mut self, _ctx: &Context, _msg: Self::Message) -> bool {
+ console::log!("views::profile::update");
+ /*
+ match msg {
+ ViewsMsg::Logout => {
+ }
+ }
+ */
+ true
+ }
+
+ fn rendered(&mut self, _ctx: &Context, _first_render: bool) {
+ console::log!("views::profile::rendered");
+ }
+
+ /// UI view for the user profile
+ fn view(&self, ctx: &Context) -> Html {
+ console::log!("views::profile::starting view");
+
+ // Submit a req to init the session.
+ // The uuid we want to submit against - hint, it's us.
+ let token = ctx.props().token.clone();
+ console::log!("token: ", &token);
+
+ let jwtu = JwsUnverified::from_str(&token).expect_throw("Invalid UAT, unable to parse");
+
+ let uat: Jws = jwtu
+ .unsafe_release_without_verification()
+ .expect_throw("Unvalid UAT, unable to release ");
+
+ let id = uat.inner.uuid.to_string();
+
+ console::log!("uuid:", id);
+ // let valid_token = ctx.link().send_future(async {
+ // match Self::fetch_token_valid(id, token).await {
+ // Ok(v) => v,
+ // Err(v) => v.into(),
+ // }
+ // });
+ // console::log!("valid_token: {:?}");
+
+ html! {
+ <>
+
+
{ "Profile" }
+
+
+ { "🦀 Kanidm is still in early Alpha, this interface is a placeholder! " }
+
+
+
+
+ { "Groups" }
+
+
+ {"Crab Admins"}
+ // the styling for this is broken because bootstrap's doing inline styles, boo
+ {"HP"}
+
+
+ {"Lobster Wranglers"}
+
+
+
+ { "SPN" }
+
+
+ {"@kanidm.example.com"}
+
+ >
+ }
+ }
+}
+
+impl ProfileApp {}