feat: Status der Modelle als Symbol, Tabelle schmaler; Version 0.1.15-rc4

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 16:04:46 +01:00
parent 5518ccaa99
commit 7304cd4245
7 changed files with 38 additions and 16 deletions

View File

@ -236,6 +236,27 @@ pub(super) fn zustand(art: &str, text: &str) -> String {
)
}
/// Freigabe eines Modells als Symbol (Lucide `circle-check` und `lock`): freigegeben (grün) oder gesperrt (rot).
/// Der Text steht im Hinweis und für Screenreader; der Tabellenfilter liest ihn aus `data-sort`.
pub(super) fn freigabe(enabled: bool) -> String {
let (text, farbe, pfade) = if enabled {
(
"freigegeben",
"z-ok",
"<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m9 12 2 2 4-4\"/>",
)
} else {
(
"gesperrt",
"z-fehler",
"<rect width=\"18\" height=\"11\" x=\"3\" y=\"11\" rx=\"2\" ry=\"2\"/><path d=\"M7 11V7a5 5 0 0 1 10 0v4\"/>",
)
};
format!(
"<svg class=\"fsym gemeldet {farbe}\" viewBox=\"0 0 24 24\" role=\"img\" aria-label=\"{text}\"><title>{text}</title>{pfade}</svg>"
)
}
/// GPU-Nummern („0, 1“) als Chip-Symbole mit Nummer.
pub(super) fn gpu_symbole(gpus: &str) -> String {
gpus.split(',')