, req: Request) -> AxumResponse {
let root = options.site_root.clone();
let res = get_static_file(uri.clone(), &root).await.unwrap();
diff --git a/src/features/command_line/mod.rs b/src/features/command_line/mod.rs
index c7a5aac..14ec610 100644
--- a/src/features/command_line/mod.rs
+++ b/src/features/command_line/mod.rs
@@ -22,7 +22,7 @@ pub fn CommandLineModal(cx: Scope) -> impl IntoView {
if !hidden.get() {
view! { cx, }
} else {
- view! { cx, }
+ view! { cx, }.into_view(cx)
}
}}
}
@@ -39,7 +39,7 @@ pub fn CommandLine(cx: Scope, children: Children) -> impl IntoView {
if event.ctrl_key() {
match event.code().as_str() {
"KeyK" => {
- set_hidden(!hidden.get());
+ //set_hidden(!hidden.get());
log!("toggle command")
}
_ => {}
diff --git a/src/features/dashboard_list_view/dashboard_list_view.rs b/src/features/dashboard_list_view/dashboard_list_view.rs
index 7a93266..0b1505d 100644
--- a/src/features/dashboard_list_view/dashboard_list_view.rs
+++ b/src/features/dashboard_list_view/dashboard_list_view.rs
@@ -62,19 +62,19 @@ pub fn DashboardListView(
.filter(|project| !project.items.is_empty())
.map(|project| {
view! { cx,
-
-
- {&project
- .items
- .clone()
- .into_iter()
- .map(|item| {
- view! { cx, }
- })
- .collect::>()
- .into_view(cx)}
-
- }
+
+
+ {&project
+ .items
+ .clone()
+ .into_iter()
+ .map(|item| {
+ view! { cx, }
+ })
+ .collect::>()
+ .into_view(cx)}
+
+ }
.into_any()
})
.collect::>()
diff --git a/src/features/navbar_projects/navbar_projects.rs b/src/features/navbar_projects/navbar_projects.rs
index d3f077e..3c74ea4 100644
--- a/src/features/navbar_projects/navbar_projects.rs
+++ b/src/features/navbar_projects/navbar_projects.rs
@@ -30,7 +30,6 @@ pub fn NavbarProjectsView(
) -> impl IntoView {
let projects_view = move || {
projects.with(cx, |projects| {
-
if projects.is_empty() {
return vec![view! { cx, "No projects"
}.into_any()];
}
@@ -40,9 +39,6 @@ pub fn NavbarProjectsView(
.map(|project| {
view! { cx,
-
-
-
{&project.name}
diff --git a/src/main.rs b/src/main.rs
index 7c760c8..c90c2f9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -24,9 +24,9 @@ async fn main() {
let app = Router::new()
.route("/api/*fn_name", post(leptos_axum::handle_server_fns))
- .leptos_routes(leptos_options.clone(), routes, |cx| view! { cx, })
+ .leptos_routes(&leptos_options.clone(), routes, |cx| view! { cx, })
.fallback(file_and_error_handler)
- .layer(Extension(Arc::new(leptos_options)));
+ .with_state(leptos_options);
// run our app with hyper
// `axum::Server` is a re-export of `hyper::Server`
diff --git a/src/routes/features_view.rs b/src/routes/features_view.rs
index 639fe91..1dcddb6 100644
--- a/src/routes/features_view.rs
+++ b/src/routes/features_view.rs
@@ -1,11 +1,12 @@
-use leptos::*;
+use leptos::{ev, html::*, *};
use uuid::Uuid;
use crate::features::navbar_projects::gen::queries::get_projects_list_view::GetProjectsListViewGetProjects;
-use crate::features::navbar_projects::NavbarProjectsView;
+use crate::features::navbar_projects::{
+ NavbarProjects, NavbarProjectsProps, NavbarProjectsView, NavbarProjectsViewProps,
+};
-#[component]
-pub fn FeaturesView(cx: Scope) -> impl IntoView {
+pub fn features_view(cx: Scope) -> impl IntoView {
let projects = create_local_resource(
cx,
|| (),
@@ -26,19 +27,22 @@ pub fn FeaturesView(cx: Scope) -> impl IntoView {
let emptyProjects: Resource<(), Vec> =
create_local_resource(cx, || (), |_| async { Vec::new() });
- view! { cx,
-
-
-
"NavbarProjects"
-
"Projects"
-
-
-
-
"no projects"
-
-
-
-
-
- }
+ return div(cx).child(
+ div(cx)
+ .classes("space-y-5 p-2")
+ .child(h1(cx).child("NavbarProjects"))
+ .child(h2(cx).child("Projects"))
+ .child(
+ div(cx)
+ .classes("feature-case")
+ .child(NavbarProjectsView(cx, NavbarProjectsViewProps { projects })),
+ )
+ .child(h2(cx).child("no projects"))
+ .child(div(cx).classes("feature-case").child(NavbarProjectsView(
+ cx,
+ NavbarProjectsViewProps {
+ projects: emptyProjects,
+ },
+ ))),
+ );
}
diff --git a/style/output.css b/style/output.css
index 353ca4d..88a832a 100644
--- a/style/output.css
+++ b/style/output.css
@@ -1,5 +1,5 @@
/*
-! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com
+! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com
*/
/*
@@ -191,6 +191,10 @@ select,
textarea {
font-family: inherit;
/* 1 */
+ font-feature-settings: inherit;
+ /* 1 */
+ font-variation-settings: inherit;
+ /* 1 */
font-size: 100%;
/* 1 */
font-weight: inherit;
@@ -341,6 +345,14 @@ menu {
padding: 0;
}
+/*
+Reset default styling for dialogs.
+*/
+
+dialog {
+ padding: 0;
+}
+
/*
Prevent resizing textareas horizontally by default.
*/
@@ -558,6 +570,10 @@ video {
height: 100vh;
}
+.max-h-screen {
+ max-height: 100vh;
+}
+
.min-w-\[200px\] {
min-width: 200px;
}
@@ -618,6 +634,10 @@ video {
margin-bottom: calc(1.25rem * var(--tw-space-y-reverse));
}
+.overflow-auto {
+ overflow: auto;
+}
+
.rounded-md {
border-radius: 0.375rem;
}