feat(dashboard): breakpilot branding and the portal's ledger design #357
No files matched your search
+1
-1
@@ -4,7 +4,7 @@ default_platform = "web"
|
||||
asset_dir = "assets"
|
||||
|
||||
[web.app]
|
||||
title = "Compliance Scanner Dashboard"
|
||||
title = "Prüfwerk · Breakpilot"
|
||||
|
||||
[web.watcher]
|
||||
reload_html = true
|
||||
|
||||
@@ -1,28 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
|
||||
<defs>
|
||||
<linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" stop-color="#0f172a"/>
|
||||
<stop offset="100%" stop-color="#1e293b"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="shield" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" stop-color="#38bdf8"/>
|
||||
<stop offset="100%" stop-color="#818cf8"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="96" height="96" rx="18" fill="url(#bg)"/>
|
||||
<!-- Shield outline -->
|
||||
<path d="M48 14 L28 26 L28 48 C28 62 37 74 48 78 C59 74 68 62 68 48 L68 26 Z"
|
||||
fill="none" stroke="url(#shield)" stroke-width="3" stroke-linejoin="round"/>
|
||||
<!-- Inner shield fill (subtle) -->
|
||||
<path d="M48 18 L31 28.5 L31 47 C31 59.5 39 70 48 74 C57 70 65 59.5 65 47 L65 28.5 Z"
|
||||
fill="url(#shield)" opacity="0.1"/>
|
||||
<!-- Magnifying glass -->
|
||||
<circle cx="45" cy="44" r="10" fill="none" stroke="#38bdf8" stroke-width="2.5"/>
|
||||
<line x1="52" y1="51" x2="60" y2="59" stroke="#38bdf8" stroke-width="2.5" stroke-linecap="round"/>
|
||||
<!-- Checkmark inside magnifier -->
|
||||
<path d="M40 44 L43.5 47.5 L50 41" fill="none" stroke="#22c55e" stroke-width="2.5"
|
||||
stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<!-- Scan lines (decorative) -->
|
||||
<line x1="34" y1="32" x2="46" y2="32" stroke="#38bdf8" stroke-width="1.5" opacity="0.4" stroke-linecap="round"/>
|
||||
<line x1="34" y1="36" x2="42" y2="36" stroke="#38bdf8" stroke-width="1.5" opacity="0.3" stroke-linecap="round"/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<!-- The breakpilot mark: a mono "B" on the brand violet. -->
|
||||
<rect width="32" height="32" rx="6" fill="#6d3fe0"/>
|
||||
<text x="16" y="22" text-anchor="middle" font-family="ui-monospace, 'SF Mono', Menlo, monospace" font-size="18" font-weight="600" fill="#ffffff">B</text>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 343 B |
File diff suppressed because it is too large.
Load diff
@@ -144,7 +144,7 @@ pub fn HelpChat() -> Element {
|
||||
div { class: "help-chat-messages",
|
||||
if messages().is_empty() {
|
||||
div { class: "help-chat-empty",
|
||||
p { "Ask me anything about the Compliance Scanner." }
|
||||
p { "Ask me anything about Prüfwerk." }
|
||||
p { class: "help-chat-hint",
|
||||
"e.g. \"How do I add a repository?\" or \"What is SBOM?\""
|
||||
}
|
||||
|
||||
@@ -31,7 +31,8 @@ struct NavItem {
|
||||
#[component]
|
||||
pub fn Sidebar() -> Element {
|
||||
let current_route = use_route::<Route>();
|
||||
let mut collapsed = use_signal(|| true);
|
||||
// Open, like the portal's nav rail; the toggle collapses it.
|
||||
let mut collapsed = use_signal(|| false);
|
||||
let source_only = use_source_only();
|
||||
let lang = use_lang()();
|
||||
|
||||
@@ -98,10 +99,15 @@ pub fn Sidebar() -> Element {
|
||||
|
||||
rsx! {
|
||||
nav { class: "{sidebar_class}",
|
||||
// The breakpilot brand, as the portal shows it; Prüfwerk is the
|
||||
// product within it.
|
||||
div { class: "sidebar-header",
|
||||
Icon { icon: BsShieldCheck, width: 24, height: 24 }
|
||||
span { class: "brand-mark", aria_hidden: "true", "B" }
|
||||
if !collapsed() {
|
||||
h1 { "Prüfwerk" }
|
||||
div { class: "brand-text",
|
||||
span { class: "brand-name", "Breakpilot" }
|
||||
span { class: "brand-sub", "Prüfwerk" }
|
||||
}
|
||||
}
|
||||
}
|
||||
div { class: "sidebar-nav",
|
||||
|
||||
@@ -31,13 +31,13 @@ pub fn ThemeToggle(collapsed: bool) -> Element {
|
||||
let lang = use_lang()();
|
||||
let label = if collapsed {
|
||||
""
|
||||
} else if is_dark().unwrap_or(true) {
|
||||
} else if is_dark().unwrap_or(false) {
|
||||
nav::LIGHT_MODE.get(lang)
|
||||
} else {
|
||||
nav::DARK_MODE.get(lang)
|
||||
};
|
||||
|
||||
let title = if is_dark().unwrap_or(true) {
|
||||
let title = if is_dark().unwrap_or(false) {
|
||||
nav::SWITCH_TO_LIGHT.get(lang)
|
||||
} else {
|
||||
nav::SWITCH_TO_DARK.get(lang)
|
||||
@@ -50,11 +50,11 @@ pub fn ThemeToggle(collapsed: bool) -> Element {
|
||||
title: "{title}",
|
||||
"aria-label": "{title}",
|
||||
onclick: move |_| {
|
||||
let next_dark = !is_dark().unwrap_or(true);
|
||||
let next_dark = !is_dark().unwrap_or(false);
|
||||
is_dark.set(Some(next_dark));
|
||||
apply_theme(next_dark);
|
||||
},
|
||||
if is_dark().unwrap_or(true) {
|
||||
if is_dark().unwrap_or(false) {
|
||||
Icon { icon: BsSun, width: 16, height: 16 }
|
||||
} else {
|
||||
Icon { icon: BsMoonStars, width: 16, height: 16 }
|
||||
@@ -68,7 +68,7 @@ pub fn ThemeToggle(collapsed: bool) -> Element {
|
||||
|
||||
/// Returns `(is_dark, from_storage)`. `from_storage` is true when an explicit
|
||||
/// user choice is in localStorage; false when we fell back to OS preference
|
||||
/// (or to the dark default).
|
||||
/// (or to light, the ledger default, as the breakpilot portal).
|
||||
#[cfg(feature = "web")]
|
||||
fn initial_theme() -> (bool, bool) {
|
||||
if let Some(window) = web_sys::window() {
|
||||
@@ -81,12 +81,12 @@ fn initial_theme() -> (bool, bool) {
|
||||
return (mql.matches(), false);
|
||||
}
|
||||
}
|
||||
(true, false)
|
||||
(false, false)
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "web"))]
|
||||
fn initial_theme() -> (bool, bool) {
|
||||
(true, false)
|
||||
(false, false)
|
||||
}
|
||||
|
||||
#[cfg(feature = "web")]
|
||||
|
||||
@@ -186,7 +186,7 @@ pub fn FindingDetailPage(id: String) -> Element {
|
||||
let label = tx::status(&status).get(lang);
|
||||
rsx! {
|
||||
button {
|
||||
class: if current { "btn btn-primary" } else { "btn btn-ghost" },
|
||||
class: if current { "btn btn-primary btn-current" } else { "btn btn-ghost" },
|
||||
title: "{label}",
|
||||
disabled: current,
|
||||
onclick: move |_| {
|
||||
|
||||
@@ -68,22 +68,22 @@ pub fn OverviewPage() -> Element {
|
||||
StatCard {
|
||||
label: common::CRITICAL.get(lang),
|
||||
value: s.critical_findings.to_string(),
|
||||
color: "var(--danger)",
|
||||
color: "var(--sev-critical)",
|
||||
}
|
||||
StatCard {
|
||||
label: common::HIGH.get(lang),
|
||||
value: s.high_findings.to_string(),
|
||||
color: "#f97316",
|
||||
color: "var(--sev-high)",
|
||||
}
|
||||
StatCard {
|
||||
label: common::MEDIUM.get(lang),
|
||||
value: s.medium_findings.to_string(),
|
||||
color: "var(--warning)",
|
||||
color: "var(--sev-medium)",
|
||||
}
|
||||
StatCard {
|
||||
label: common::LOW.get(lang),
|
||||
value: s.low_findings.to_string(),
|
||||
color: "var(--success)",
|
||||
color: "var(--sev-low)",
|
||||
}
|
||||
StatCard { label: overview::DEPENDENCIES.get(lang), value: s.total_sbom_entries.to_string() }
|
||||
StatCard { label: overview::CVE_ALERTS.get(lang), value: s.total_cve_alerts.to_string() }
|
||||
@@ -93,10 +93,10 @@ pub fn OverviewPage() -> Element {
|
||||
div { class: "card",
|
||||
div { class: "card-header", {overview::SEVERITY_DISTRIBUTION.get(lang)} }
|
||||
div { class: "severity-chart",
|
||||
SeverityBar { label: common::CRITICAL.get(lang), count: s.critical_findings, max: s.total_findings, color: "var(--danger)" }
|
||||
SeverityBar { label: common::HIGH.get(lang), count: s.high_findings, max: s.total_findings, color: "var(--orange)" }
|
||||
SeverityBar { label: common::MEDIUM.get(lang), count: s.medium_findings, max: s.total_findings, color: "var(--warning)" }
|
||||
SeverityBar { label: common::LOW.get(lang), count: s.low_findings, max: s.total_findings, color: "var(--success)" }
|
||||
SeverityBar { label: common::CRITICAL.get(lang), count: s.critical_findings, max: s.total_findings, color: "var(--sev-critical)" }
|
||||
SeverityBar { label: common::HIGH.get(lang), count: s.high_findings, max: s.total_findings, color: "var(--sev-high)" }
|
||||
SeverityBar { label: common::MEDIUM.get(lang), count: s.medium_findings, max: s.total_findings, color: "var(--sev-medium)" }
|
||||
SeverityBar { label: common::LOW.get(lang), count: s.low_findings, max: s.total_findings, color: "var(--sev-low)" }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user