app: reorganize and add a page to change the password

This commit is contained in:
Valentin Tolmer
2021-09-12 11:54:47 +02:00
committed by nitnelave
parent a184cce38f
commit 005e18472e
15 changed files with 355 additions and 88 deletions
+24
View File
@@ -0,0 +1,24 @@
use yew_router::{
components::{RouterAnchor, RouterButton},
Switch,
};
#[derive(Switch, Debug, Clone)]
pub enum AppRoute {
#[to = "/login"]
Login,
#[to = "/users"]
ListUsers,
#[to = "/users/create"]
CreateUser,
#[to = "/user/{user_id}/password"]
ChangePassword(String),
#[to = "/user/{user_id}"]
UserDetails(String),
#[to = "/"]
Index,
}
pub type Link = RouterAnchor<AppRoute>;
pub type NavButton = RouterButton<AppRoute>;