diff --git a/app/src/components/app.rs b/app/src/components/app.rs index b9856c0..b0a11c5 100644 --- a/app/src/components/app.rs +++ b/app/src/components/app.rs @@ -1,5 +1,6 @@ use crate::{ components::{ + banner::Banner, change_password::ChangePasswordForm, create_group::CreateGroupForm, create_group_attribute::CreateGroupAttributeForm, @@ -9,7 +10,6 @@ use crate::{ group_schema_table::ListGroupSchema, group_table::GroupTable, login::LoginForm, - logout::LogoutButton, reset_password_step1::ResetPasswordStep1Form, reset_password_step2::ResetPasswordStep2Form, router::{AppRoute, Link, Redirect}, @@ -21,7 +21,6 @@ use crate::{ }; use gloo_console::error; -use wasm_bindgen::prelude::*; use yew::{ function_component, html::Scope, @@ -34,25 +33,6 @@ use yew_router::{ BrowserRouter, Switch, }; -#[wasm_bindgen] -extern "C" { - #[wasm_bindgen(js_namespace = darkmode)] - fn toggleDarkMode(doSave: bool); - - #[wasm_bindgen] - fn inDarkMode() -> bool; -} - -#[function_component(DarkModeToggle)] -pub fn dark_mode_toggle() -> Html { - html! { -
- - -
- } -} - #[function_component(AppContainer)] pub fn app_container() -> Html { html! { @@ -139,10 +119,11 @@ impl Component for App { fn view(&self, ctx: &Context) -> Html { let link = ctx.link().clone(); let is_admin = self.is_admin(); + let username = self.user_info.clone().map(|(username, _)| username); let password_reset_enabled = self.password_reset_enabled; html! {
- {self.view_banner(ctx)} +
@@ -279,107 +260,6 @@ impl App { } } - fn view_banner(&self, ctx: &Context) -> Html { - html! { -
-
-
- -

{"LLDAP"}

-
- - - { self.view_user_menu(ctx) } - -
-
-
- } - } - - fn view_user_menu(&self, ctx: &Context) -> Html { - if let Some((user_id, _)) = &self.user_info { - let link = ctx.link(); - html! { - - } - } else { - html! {} - } - } - fn view_footer(&self) -> Html { html! {