Add graph explorer components, API handlers, and dependency updates
Adds code inspector, file tree components, graph visualization JS, graph API handlers, sidebar navigation updates, and misc improvements. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@ struct NavItem {
|
||||
#[component]
|
||||
pub fn Sidebar() -> Element {
|
||||
let current_route = use_route::<Route>();
|
||||
let mut collapsed = use_signal(|| true);
|
||||
|
||||
let nav_items = [
|
||||
NavItem {
|
||||
@@ -57,11 +58,15 @@ pub fn Sidebar() -> Element {
|
||||
},
|
||||
];
|
||||
|
||||
let sidebar_class = if collapsed() { "sidebar collapsed" } else { "sidebar" };
|
||||
|
||||
rsx! {
|
||||
nav { class: "sidebar",
|
||||
nav { class: "{sidebar_class}",
|
||||
div { class: "sidebar-header",
|
||||
Icon { icon: BsShieldCheck, width: 24, height: 24 }
|
||||
h1 { "Compliance Scanner" }
|
||||
if !collapsed() {
|
||||
h1 { "Compliance Scanner" }
|
||||
}
|
||||
}
|
||||
div { class: "sidebar-nav",
|
||||
for item in nav_items {
|
||||
@@ -82,15 +87,25 @@ pub fn Sidebar() -> Element {
|
||||
to: item.route.clone(),
|
||||
class: class,
|
||||
{item.icon}
|
||||
span { "{item.label}" }
|
||||
if !collapsed() {
|
||||
span { "{item.label}" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
div {
|
||||
style: "padding: 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-secondary);",
|
||||
"v0.1.0"
|
||||
button {
|
||||
class: "sidebar-toggle",
|
||||
onclick: move |_| collapsed.set(!collapsed()),
|
||||
if collapsed() {
|
||||
Icon { icon: BsChevronRight, width: 14, height: 14 }
|
||||
} else {
|
||||
Icon { icon: BsChevronLeft, width: 14, height: 14 }
|
||||
}
|
||||
}
|
||||
if !collapsed() {
|
||||
div { class: "sidebar-footer", "v0.1.0" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user