дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-06 10:07:11 +02:00
A Background Projects status bar item shows how many projects the MCP server holds open without a window, only while there are any (and never in a remote window). Its popup lists each project with its badge, state and path, opens one in its own window or unloads it, and offers Unload All and MCP Server Settings. The Settings page's Open now list uses the same rows. Co-authored-by: lleviathe <[email protected]>
16 рядки
711 B
TypeScript
16 рядки
711 B
TypeScript
import { useSyncExternalStore } from "react";
|
|
import clsx from "clsx";
|
|
import { projectInitials } from "./projectColor";
|
|
import { subscribeTabColors, tabColorOverride, tabColorVars, tabColorsVersion } from "./tabColors";
|
|
import styles from "./ProjectBadge.module.css";
|
|
|
|
/** Square project avatar for a two-line row: the title bar widget's colour and initials. */
|
|
export function ProjectBadge({ name, path, className }: { name: string; path: string; className?: string }) {
|
|
useSyncExternalStore(subscribeTabColors, tabColorsVersion);
|
|
return (
|
|
<span className={clsx(styles.badge, className)} style={tabColorVars(name, tabColorOverride(path))} aria-hidden>
|
|
{projectInitials(name)}
|
|
</span>
|
|
);
|
|
}
|