feat(app): status rings on panels + sidebar aggregate badge from state events
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import type { SurfaceState } from "./layoutTypes";
|
||||
|
||||
const COLOR: Record<SurfaceState, string> = {
|
||||
work: "#4C8DFF",
|
||||
wait: "#F2B84B",
|
||||
done: "#3FB950",
|
||||
error: "#F4544E",
|
||||
idle: "#5A6573",
|
||||
};
|
||||
|
||||
export function StatusRing({ state, running }: { state: SurfaceState; running: boolean }) {
|
||||
const color = running ? COLOR[state] : "#5A6573";
|
||||
return (
|
||||
<span
|
||||
title={running ? state : "stopped"}
|
||||
style={{
|
||||
display: "inline-block",
|
||||
width: 10,
|
||||
height: 10,
|
||||
borderRadius: "50%",
|
||||
border: `2px solid ${color}`,
|
||||
boxSizing: "border-box",
|
||||
opacity: running ? 1 : 0.5,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user