2023-03-08 17:05:08 +00:00
|
|
|
use yew_router::Routable;
|
2021-09-12 09:54:47 +00:00
|
|
|
|
2023-03-08 17:05:08 +00:00
|
|
|
#[derive(Routable, Debug, Clone, PartialEq)]
|
2021-09-12 09:54:47 +00:00
|
|
|
pub enum AppRoute {
|
2023-03-08 17:05:08 +00:00
|
|
|
#[at("/login")]
|
2021-09-12 09:54:47 +00:00
|
|
|
Login,
|
2023-03-08 17:05:08 +00:00
|
|
|
#[at("/reset-password/step1")]
|
2021-11-22 22:04:09 +00:00
|
|
|
StartResetPassword,
|
2023-03-08 17:05:08 +00:00
|
|
|
#[at("/reset-password/step2/:token")]
|
|
|
|
FinishResetPassword { token: String },
|
|
|
|
#[at("/users/create")]
|
2021-09-12 09:54:47 +00:00
|
|
|
CreateUser,
|
2023-03-08 17:05:08 +00:00
|
|
|
#[at("/users")]
|
2021-09-19 17:44:53 +00:00
|
|
|
ListUsers,
|
2023-03-08 17:05:08 +00:00
|
|
|
#[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,
|
2023-03-08 17:05:08 +00:00
|
|
|
#[at("/groups")]
|
2021-09-28 13:00:39 +00:00
|
|
|
ListGroups,
|
2023-03-08 17:05:08 +00:00
|
|
|
#[at("/group/:group_id")]
|
|
|
|
GroupDetails { group_id: i64 },
|
|
|
|
#[at("/")]
|
2021-09-12 09:54:47 +00:00
|
|
|
Index,
|
|
|
|
}
|
|
|
|
|
2023-03-08 17:05:08 +00:00
|
|
|
pub type Link = yew_router::components::Link<AppRoute>;
|
|
|
|
pub type Redirect = yew_router::components::Redirect<AppRoute>;
|