feat(ui): Symbol je Engine zeigt, ob sie eine Oberfläche mitbringt, und öffnet sie als Link (#1101)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmHhg3Td16J38kAyDLzb39
This commit is contained in:
@ -149,6 +149,7 @@ pub(super) async fn engines_page(
|
||||
.into_iter()
|
||||
.map(|(name, info, start)| {
|
||||
let kind = art(&info.capabilities).1;
|
||||
let fenster = super::faehigkeiten::oberflaeche(&state.runtime.engine_frontend(&name), viewer.admin());
|
||||
let models: Vec<&String> = rows
|
||||
.iter()
|
||||
.filter(|(_, engine)| engine.as_deref() == Some(name.as_str()))
|
||||
@ -167,7 +168,7 @@ pub(super) async fn engines_page(
|
||||
&& state.runtime.engine_ui_port(&name).is_some() {
|
||||
format!(" <a href=\"/ui/engine/{}/\">Engine-Oberfläche</a>", name.bytes().map(|b| if b.is_ascii_alphanumeric() || b"-._~".contains(&b) { (b as char).to_string() } else { format!("%{b:02X}") }).collect::<String>())
|
||||
} else { String::new() };
|
||||
summary.push_str(&format!("<tr><th>{}<br><span class=\"muted klein\">{kind}</span></th><td>{health} · Fehler seit Start: {errors}{surface}</td><td>{}</td></tr>", esc(&name),
|
||||
summary.push_str(&format!("<tr><th>{} {fenster}<br><span class=\"muted klein\">{kind}</span></th><td>{health} · Fehler seit Start: {errors}{surface}</td><td>{}</td></tr>", esc(&name),
|
||||
if links.is_empty() { "Keine Modelle registriert.".into() } else { links }));
|
||||
let installed = match &start.executable {
|
||||
Some(path) if path.exists() => {
|
||||
@ -218,7 +219,7 @@ pub(super) async fn engines_page(
|
||||
}));
|
||||
}
|
||||
format!(
|
||||
"<section class=\"card engine\"><div class=\"zeile\"><h2>{name}</h2>\
|
||||
"<section class=\"card engine\"><div class=\"zeile\"><h2>{name}</h2>{fenster}\
|
||||
<span class=\"chip accent\">{mode}</span><span class=\"chip\">{kind}</span>{installed}\
|
||||
<span class=\"rechts muted\">{n} Modelle registriert</span></div>\
|
||||
<div class=\"chips\">{caps}</div>{start_details}</section>",
|
||||
|
||||
Reference in New Issue
Block a user