Stacks exclues : icone (cercle barre) et couleur propres
- icone BanIcon (cercle barre) en badge a cote du nom de toute stack exclue, quel que soit son etat (a jour, arretee, erreur, mise a jour dispo) ; - couleur dediee (magenta, --excl) distincte de "Arretee" (gris) : pastille "Exclue" et liseret gauche quand une mise a jour est ignoree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LNfwm4C4dXa9nz3NDoyEot
This commit is contained in:
1 parent
adf58d5021
commit
9bf2500ad2
3 files changed
+42
-9
No files matched your search
@@ -2,7 +2,7 @@ import { useMemo, useState } from "react";
|
||||
import { api, type Me, type Fleet, type Scan, type Server, type Stack, type StackStatus, type Target } from "./api";
|
||||
import { ConfirmDialog } from "./Dialogs";
|
||||
import { fmtRelative, plural } from "./format";
|
||||
import { ArrowUpIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ClockIcon, EditIcon, KeyIcon, PlusIcon, RefreshIcon, SearchIcon, ServerIcon, WarningIcon } from "./icons";
|
||||
import { ArrowUpIcon, BanIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ClockIcon, EditIcon, KeyIcon, PlusIcon, RefreshIcon, SearchIcon, ServerIcon, WarningIcon } from "./icons";
|
||||
|
||||
type Filter = "all" | "updates" | "problems";
|
||||
|
||||
@@ -281,9 +281,9 @@ function TargetBlock({ server, target, scan, me, keep, filtering, onCheck, onApp
|
||||
const isOpen = !!open[st.dir];
|
||||
const [late, total] = [st.services?.filter((s) => s.state === "update").length ?? 0, st.services?.length ?? 0];
|
||||
const applying = !!applyingDir && applyingDir === st.dir;
|
||||
// Stack exclue avec une mise à jour disponible : statut neutre, sans bouton.
|
||||
// Stack exclue avec une mise à jour disponible : statut « Exclue » (couleur propre), sans bouton.
|
||||
const ignored = !applying && !!st.excluded && st.status === "updates";
|
||||
const status = applying ? "applying" : ignored ? "stopped" : st.status;
|
||||
const status = applying ? "applying" : ignored ? "excluded" : st.status;
|
||||
return (
|
||||
<li key={st.dir} className={`stack st-${status} ${isOpen ? "open" : ""}`}>
|
||||
<div className="stack-row" onClick={() => setOpen({ ...open, [st.dir]: !isOpen })}>
|
||||
@@ -294,6 +294,7 @@ function TargetBlock({ server, target, scan, me, keep, filtering, onCheck, onApp
|
||||
{applying && <RefreshIcon size={13} className="spin" />}
|
||||
{!applying && st.status === "uptodate" && <CheckIcon size={13} />}
|
||||
{!applying && !ignored && st.status === "updates" && <ArrowUpIcon size={13} />}
|
||||
{ignored && <BanIcon size={13} />}
|
||||
{!applying && st.status === "error" && <WarningIcon size={13} />}
|
||||
{applying ? "Mise à jour en cours" : ignored ? "Exclue" : statusLabel[st.status]}
|
||||
</span>
|
||||
@@ -301,12 +302,9 @@ function TargetBlock({ server, target, scan, me, keep, filtering, onCheck, onApp
|
||||
<strong>
|
||||
{st.name}
|
||||
{st.excluded && (
|
||||
<>
|
||||
{" "}
|
||||
<span className="pill" title="Exclue des mises à jour (réactivable dans le détail de la stack)">
|
||||
exclue
|
||||
</span>
|
||||
</>
|
||||
<span className="excl-badge" title="Exclue des mises à jour (réactivable dans le détail de la stack)" aria-label="Exclue des mises à jour">
|
||||
<BanIcon size={12} />
|
||||
</span>
|
||||
)}
|
||||
</strong>
|
||||
<small className="muted">{st.dir}</small>
|
||||
|
||||
@@ -71,6 +71,14 @@ const line = (children: ReactNode) =>
|
||||
);
|
||||
};
|
||||
|
||||
/** Stack exclue des mises à jour : cercle barré. */
|
||||
export const BanIcon = line(
|
||||
<>
|
||||
<circle cx="12" cy="12" r="8.5" />
|
||||
<path d="M6 6l12 12" />
|
||||
</>,
|
||||
);
|
||||
|
||||
/** Icône Papicons avec une pastille en bas à droite (le fond est évidé autour de la pastille). */
|
||||
const badged = (base: PapPath[], badge: PapPath[]) =>
|
||||
function Icon({ size }: IconProps) {
|
||||
|
||||
@@ -1252,3 +1252,30 @@ button.copy-ko {
|
||||
border-color: var(--danger);
|
||||
background: var(--danger-soft);
|
||||
}
|
||||
|
||||
/* Stacks exclues des mises a jour : couleur et icone propres, distinctes de "Arretee" */
|
||||
:root {
|
||||
--excl: #c026d3;
|
||||
}
|
||||
:root[data-theme="dark"] {
|
||||
--excl: #e879f9;
|
||||
}
|
||||
.stack.st-excluded {
|
||||
box-shadow: inset 3px 0 0 var(--excl);
|
||||
}
|
||||
.status-pill.st-excluded {
|
||||
color: var(--excl);
|
||||
background: color-mix(in srgb, var(--excl) 15%, transparent);
|
||||
}
|
||||
.excl-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
margin-left: 0.4rem;
|
||||
border-radius: 50%;
|
||||
color: var(--excl);
|
||||
background: color-mix(in srgb, var(--excl) 15%, transparent);
|
||||
vertical-align: -0.25rem;
|
||||
}
|
||||
Reference in new issue
Block a user