diff --git a/assets/style.css b/assets/style.css new file mode 100644 index 0000000..76d5bc7 --- /dev/null +++ b/assets/style.css @@ -0,0 +1,8 @@ +.body-content { + max-width: 700px; + margin: 50px auto; +} + +.body-content .card-header { + font-weight: bold; +} \ No newline at end of file diff --git a/src/server/web_ui.rs b/src/server/web_ui.rs index bcd61bc..7769c32 100644 --- a/src/server/web_ui.rs +++ b/src/server/web_ui.rs @@ -31,6 +31,7 @@ pub async fn static_file(path: web::Path) -> HttpResult { #[template(path = "index.html")] struct HomeTemplate { name: String, + matrix_token: String, } /// Main route @@ -55,7 +56,14 @@ pub async fn home(session: Session) -> HttpResult { Ok(HttpResponse::Ok() .insert_header(("content-type", "text/html")) - .body(HomeTemplate { name: user.name }.render().unwrap())) + .body( + HomeTemplate { + name: user.name, + matrix_token: "TODO".to_string(), + } + .render() + .unwrap(), + )) } #[derive(serde::Deserialize)] diff --git a/templates/index.html b/templates/index.html index b73c274..1781b39 100644 --- a/templates/index.html +++ b/templates/index.html @@ -6,6 +6,7 @@ + @@ -23,12 +24,48 @@ +
+ +
+
Matrix authentication token
+
+

To obtain a new Matrix authentication token:

+
    +
  1. Sign in to Element from a private browser window
  2. +
  3. Open All settings and access the Help & About tag
  4. +
  5. Expand Access Token and copy the value
  6. +
  7. Paste the copied value below
  8. +
  9. Close the private browser window without signing out!
  10. +
+ +

You should not need to replace this value unless you explicitly signed out the associated browser + session.

+ +

Tip: you can rename the session to easily identify it among all your other sessions!

+ +
+
+ + + Changing this value will reset all active + connections + to Matrix Gateways. +
+ + +
+
+
+
+ + \ No newline at end of file