Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
1
crates/como_web/src/routes/dash.rs
Normal file
1
crates/como_web/src/routes/dash.rs
Normal file
@@ -0,0 +1 @@
|
||||
pub mod home;
|
12
crates/como_web/src/routes/dash/home.rs
Normal file
12
crates/como_web/src/routes/dash/home.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use leptos::*;
|
||||
|
||||
use crate::features::dashboard_list_view::DashboardList;
|
||||
|
||||
#[component]
|
||||
pub fn DashHomePage() -> impl IntoView {
|
||||
view! {
|
||||
<div class="home-dash">
|
||||
<DashboardList/>
|
||||
</div>
|
||||
}
|
||||
}
|
43
crates/como_web/src/routes/features_view.rs
Normal file
43
crates/como_web/src/routes/features_view.rs
Normal file
@@ -0,0 +1,43 @@
|
||||
use leptos::*;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::features::navbar_projects::gen::queries::get_projects_list_view::GetProjectsListViewGetProjects;
|
||||
use crate::features::navbar_projects::NavbarProjectsView;
|
||||
|
||||
#[component]
|
||||
pub fn FeaturesView() -> impl IntoView {
|
||||
let projects = create_local_resource(
|
||||
|| (),
|
||||
|_| async {
|
||||
vec![
|
||||
GetProjectsListViewGetProjects {
|
||||
id: Uuid::new_v4(),
|
||||
name: "some-name".to_string(),
|
||||
},
|
||||
GetProjectsListViewGetProjects {
|
||||
id: Uuid::new_v4(),
|
||||
name: "some-other-name".to_string(),
|
||||
},
|
||||
]
|
||||
},
|
||||
);
|
||||
|
||||
let emptyProjects: Resource<(), Vec<GetProjectsListViewGetProjects>> =
|
||||
create_local_resource(|| (), |_| async { Vec::new() });
|
||||
|
||||
view! {
|
||||
<div>
|
||||
<div class="space-y-5 p-2">
|
||||
<h1>"NavbarProjects"</h1>
|
||||
<h2>"Projects"</h2>
|
||||
<div class="feature-case">
|
||||
<NavbarProjectsView projects=projects/>
|
||||
</div>
|
||||
<h2>"no projects"</h2>
|
||||
<div class="feature-case">
|
||||
<NavbarProjectsView projects=emptyProjects/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
27
crates/como_web/src/routes/home.rs
Normal file
27
crates/como_web/src/routes/home.rs
Normal file
@@ -0,0 +1,27 @@
|
||||
use leptos::*;
|
||||
|
||||
#[component]
|
||||
pub fn Navbar() -> impl IntoView {
|
||||
view! {
|
||||
<div class="flex flex-row justify-between items-center bg-gray-800 p-4">
|
||||
<div class="flex flex-row items-center">
|
||||
<div class="text-2xl text-white font-bold">"Como - Todo"</div>
|
||||
</div>
|
||||
<div class="flex flex-row items-center space-x-4">
|
||||
<div class="text-xl text-white font-bold cursor-pointer">
|
||||
<a href="http://localhost:3001/auth/zitadel?return_url=http://localhost:3000/dash/home">
|
||||
"Enter"
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
#[component]
|
||||
pub fn HomePage() -> impl IntoView {
|
||||
view! {
|
||||
<Navbar/>
|
||||
<h1 class="text-xl text-red-50">"Welcome to Leptos!"</h1>
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user