lldap/app/src/components/router.rs
Valentin Tolmer b2cfc0ed03 app: update yew to 0.19
This is a massive change to all the components, since the interface
changed.

There are opportunities to greatly simplify some components by turning
them into functional_components, but this work has tried to stay as
mechanical as possible.
2023-03-20 12:11:34 +01:00

31 lines
784 B
Rust

use yew_router::Routable;
#[derive(Routable, Debug, Clone, PartialEq)]
pub enum AppRoute {
#[at("/login")]
Login,
#[at("/reset-password/step1")]
StartResetPassword,
#[at("/reset-password/step2/:token")]
FinishResetPassword { token: String },
#[at("/users/create")]
CreateUser,
#[at("/users")]
ListUsers,
#[at("/user/:user_id/password")]
ChangePassword { user_id: String },
#[at("/user/:user_id")]
UserDetails { user_id: String },
#[at("/groups/create")]
CreateGroup,
#[at("/groups")]
ListGroups,
#[at("/group/:group_id")]
GroupDetails { group_id: i64 },
#[at("/")]
Index,
}
pub type Link = yew_router::components::Link<AppRoute>;
pub type Redirect = yew_router::components::Redirect<AppRoute>;