dashboard: add favicon (hyperhive mark)

The main dashboard had no favicon — PR #145 added them to the
per-agent pages but missed hive-c0re's index. Serve branding/
hyperhive.svg at /favicon.svg and declare it in the index head.
The dashboard represents the whole hive, so it uses the project
mark (per-agent pages keep their own configurable /icon).

closes #173
This commit is contained in:
iris 2026-05-21 18:58:05 +02:00
parent e28b0a1dab
commit d5009cd175
2 changed files with 12 additions and 0 deletions

View file

@ -3,6 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>hyperhive // h1ve-c0re</title> <title>hyperhive // h1ve-c0re</title>
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<link rel="stylesheet" href="/static/dashboard.css"> <link rel="stylesheet" href="/static/dashboard.css">
</head> </head>
<body> <body>

View file

@ -41,6 +41,7 @@ pub async fn serve(port: u16, coord: Arc<Coordinator>) -> Result<()> {
.route("/", get(serve_index)) .route("/", get(serve_index))
.route("/static/dashboard.css", get(serve_css)) .route("/static/dashboard.css", get(serve_css))
.route("/static/app.js", get(serve_app_js)) .route("/static/app.js", get(serve_app_js))
.route("/favicon.svg", get(serve_favicon))
.route("/api/state", get(api_state)) .route("/api/state", get(api_state))
.route("/approve/{id}", post(post_approve)) .route("/approve/{id}", post(post_approve))
.route("/deny/{id}", post(post_deny)) .route("/deny/{id}", post(post_deny))
@ -140,6 +141,16 @@ async fn serve_app_js() -> impl IntoResponse {
) )
} }
/// Dashboard favicon — the hyperhive mark. Static: the dashboard
/// represents the whole hive, so it always uses the project logo
/// (per-agent pages serve their own configurable `/icon` instead).
async fn serve_favicon() -> impl IntoResponse {
(
[("content-type", "image/svg+xml")],
include_str!("../../branding/hyperhive.svg"),
)
}
async fn serve_shared_js() -> impl IntoResponse { async fn serve_shared_js() -> impl IntoResponse {
( (
[("content-type", "application/javascript")], [("content-type", "application/javascript")],