lldap/app/src/components/router.rs

33 lines
681 B
Rust
Raw Normal View History

use yew_router::{
components::{RouterAnchor, RouterButton},
Switch,
};
#[derive(Switch, Debug, Clone)]
pub enum AppRoute {
#[to = "/login"]
Login,
#[to = "/reset-password/step1"]
StartResetPassword,
#[to = "/users/create"]
CreateUser,
2021-09-19 17:44:53 +00:00
#[to = "/users"]
ListUsers,
#[to = "/user/{user_id}/password"]
ChangePassword(String),
#[to = "/user/{user_id}"]
UserDetails(String),
2021-10-11 16:54:53 +00:00
#[to = "/groups/create"]
CreateGroup,
#[to = "/groups"]
ListGroups,
#[to = "/group/{group_id}"]
GroupDetails(i64),
#[to = "/"]
Index,
}
pub type Link = RouterAnchor<AppRoute>;
pub type NavButton = RouterButton<AppRoute>;