lldap/app/src/components/router.rs

31 lines
784 B
Rust
Raw Normal View History

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")]
2021-09-19 17:44:53 +00:00
ListUsers,
#[at("/user/:user_id/password")]
ChangePassword { user_id: String },
#[at("/user/:user_id")]
UserDetails { user_id: String },
#[at("/groups/create")]
2021-10-11 16:54:53 +00:00
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>;