agent links: use matching emoji for every built-in icon
mara, #3762: stats already used a real emoji, the rest used plain unicode arrow/hexagon glyphs — mixed style, and some of those glyphs don't even render reliably (hexagon showed as a plain circle in one repro). Picked a small matching set: compass/bar-chart/desktop/ hammer/gear. Operator-declared dashboardLinks extras keep their own emoji unchanged.
This commit is contained in:
parent
5fcd2a9387
commit
c18c79fbcc
2 changed files with 12 additions and 6 deletions
|
|
@ -8,7 +8,7 @@
|
||||||
// stats/screen/forge/config + any `hyperhive.dashboardLinks` extras,
|
// stats/screen/forge/config + any `hyperhive.dashboardLinks` extras,
|
||||||
// sourced from the backend's `agent_links()` (the single source of
|
// sourced from the backend's `agent_links()` (the single source of
|
||||||
// truth — same list also feeds the dashboard card's icon strip) — plus
|
// truth — same list also feeds the dashboard card's icon strip) — plus
|
||||||
// a `↑ dashboard` back-link, formerly the overflow menu's job (mara:
|
// a `🧭 dashboard` back-link, formerly the overflow menu's job (mara:
|
||||||
// "remove rebuild button, move link to dashboards into links menu" —
|
// "remove rebuild button, move link to dashboards into links menu" —
|
||||||
// the overflow `⋯` trigger existed for exactly two items, dashboard-
|
// the overflow `⋯` trigger existed for exactly two items, dashboard-
|
||||||
// link and rebuild; rebuild's gone outright, the dashboard's own
|
// link and rebuild; rebuild's gone outright, the dashboard's own
|
||||||
|
|
@ -43,7 +43,7 @@ export interface MetaNavProps {
|
||||||
links: AgentLink[];
|
links: AgentLink[];
|
||||||
forgePublicUrl: string | null;
|
forgePublicUrl: string | null;
|
||||||
/** Absolute base URL of the host dashboard (`resolveDashboardBase`)
|
/** Absolute base URL of the host dashboard (`resolveDashboardBase`)
|
||||||
* — the `↑ dashboard` item links to `${dashboardBase}dashboard.html`. */
|
* — the `🧭 dashboard` item links to `${dashboardBase}dashboard.html`. */
|
||||||
dashboardBase: string;
|
dashboardBase: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -95,7 +95,7 @@ export function MetaNav({ links, forgePublicUrl, dashboardBase }: MetaNavProps)
|
||||||
role="menuitem"
|
role="menuitem"
|
||||||
onClick={() => setOpen(false)}
|
onClick={() => setOpen(false)}
|
||||||
>
|
>
|
||||||
↑ dashboard
|
🧭 dashboard
|
||||||
</a>
|
</a>
|
||||||
{visible.map((lnk) => {
|
{visible.map((lnk) => {
|
||||||
const href = lnk.kind === 'forge' ? `${forgePublicUrl}${lnk.url}` : lnk.url;
|
const href = lnk.kind === 'forge' ? `${forgePublicUrl}${lnk.url}` : lnk.url;
|
||||||
|
|
|
||||||
|
|
@ -305,6 +305,12 @@ fn read_own_status() -> (Option<String>, Option<i64>) {
|
||||||
/// operator's browser host. See
|
/// operator's browser host. See
|
||||||
/// [`docs/web-ui/dashboard.md::Container row`](../../../docs/web-ui/dashboard.md) for
|
/// [`docs/web-ui/dashboard.md::Container row`](../../../docs/web-ui/dashboard.md) for
|
||||||
/// the resolver + how `deployed:<sha>` ships alongside.
|
/// the resolver + how `deployed:<sha>` ships alongside.
|
||||||
|
///
|
||||||
|
/// Icons are real emoji, not unicode arrow/geometric glyphs — mara:
|
||||||
|
/// operator-declared `dashboardLinks` extras are already free-choice
|
||||||
|
/// emoji, so the built-ins should read as the same family rather than
|
||||||
|
/// mixing in plain text glyphs (which also don't reliably render as a
|
||||||
|
/// hexagon/arrow across fonts to begin with).
|
||||||
fn agent_links(label: &str, gui_enabled: bool) -> Vec<AgentLink> {
|
fn agent_links(label: &str, gui_enabled: bool) -> Vec<AgentLink> {
|
||||||
let mut links = Vec::new();
|
let mut links = Vec::new();
|
||||||
|
|
||||||
|
|
@ -318,7 +324,7 @@ fn agent_links(label: &str, gui_enabled: bool) -> Vec<AgentLink> {
|
||||||
if gui_enabled {
|
if gui_enabled {
|
||||||
links.push(AgentLink {
|
links.push(AgentLink {
|
||||||
url: "screen.html".to_owned(),
|
url: "screen.html".to_owned(),
|
||||||
icon: "🖥".to_owned(),
|
icon: "🖥️".to_owned(),
|
||||||
label: "screen".to_owned(),
|
label: "screen".to_owned(),
|
||||||
kind: AgentLinkKind::Container,
|
kind: AgentLinkKind::Container,
|
||||||
});
|
});
|
||||||
|
|
@ -327,13 +333,13 @@ fn agent_links(label: &str, gui_enabled: bool) -> Vec<AgentLink> {
|
||||||
if crate::paths::state_dir().join("forge-token").is_file() {
|
if crate::paths::state_dir().join("forge-token").is_file() {
|
||||||
links.push(AgentLink {
|
links.push(AgentLink {
|
||||||
url: format!("/{label}"),
|
url: format!("/{label}"),
|
||||||
icon: "⬡".to_owned(),
|
icon: "🔨".to_owned(),
|
||||||
label: "forge".to_owned(),
|
label: "forge".to_owned(),
|
||||||
kind: AgentLinkKind::Forge,
|
kind: AgentLinkKind::Forge,
|
||||||
});
|
});
|
||||||
links.push(AgentLink {
|
links.push(AgentLink {
|
||||||
url: format!("/agent-configs/{label}"),
|
url: format!("/agent-configs/{label}"),
|
||||||
icon: "↳".to_owned(),
|
icon: "⚙️".to_owned(),
|
||||||
label: "config".to_owned(),
|
label: "config".to_owned(),
|
||||||
kind: AgentLinkKind::Forge,
|
kind: AgentLinkKind::Forge,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue