mirror of
https://github.com/multica-ai/multica.git
synced 2026-08-03 11:10:23 +02:00
- Create NavigationAdapter interface (push, replace, back, pathname, searchParams) - Create AppLink component replacing next/link in 4 files - Replace useRouter → useNavigation in 3 files (issue-detail, create-issue, create-workspace) - Create WebNavigationProvider wrapping Next.js useRouter/usePathname/useSearchParams - Move ~85 feature UI files (issues, editor, modals, my-issues, skills, runtimes) to packages/views/ - Add store singleton registration pattern (registerAuthStore, registerWorkspaceStore) - Create data-aware wrappers in packages/views/common/ (ActorAvatar, Markdown) - Update all app-layer imports to @multica/views/* - Add @source directive for Tailwind to scan views package - packages/views/ has zero next/* imports Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
58 lines
1.3 KiB
TypeScript
58 lines
1.3 KiB
TypeScript
import { Monitor, Cloud, Wifi, WifiOff } from "lucide-react";
|
|
import { Badge } from "@multica/ui/components/ui/badge";
|
|
|
|
export function RuntimeModeIcon({ mode }: { mode: string }) {
|
|
return mode === "cloud" ? (
|
|
<Cloud className="h-3.5 w-3.5" />
|
|
) : (
|
|
<Monitor className="h-3.5 w-3.5" />
|
|
);
|
|
}
|
|
|
|
export function StatusBadge({ status }: { status: string }) {
|
|
const isOnline = status === "online";
|
|
return (
|
|
<Badge
|
|
variant="secondary"
|
|
className={isOnline ? "bg-success/10 text-success" : ""}
|
|
>
|
|
{isOnline ? (
|
|
<Wifi className="h-3 w-3" />
|
|
) : (
|
|
<WifiOff className="h-3 w-3" />
|
|
)}
|
|
{isOnline ? "Online" : "Offline"}
|
|
</Badge>
|
|
);
|
|
}
|
|
|
|
export function InfoField({
|
|
label,
|
|
value,
|
|
mono,
|
|
}: {
|
|
label: string;
|
|
value: string;
|
|
mono?: boolean;
|
|
}) {
|
|
return (
|
|
<div>
|
|
<div className="text-xs text-muted-foreground">{label}</div>
|
|
<div
|
|
className={`mt-0.5 text-sm truncate ${mono ? "font-mono text-xs" : ""}`}
|
|
>
|
|
{value}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export function TokenCard({ label, value }: { label: string; value: string }) {
|
|
return (
|
|
<div className="rounded-lg border px-3 py-2">
|
|
<div className="text-xs text-muted-foreground">{label}</div>
|
|
<div className="mt-0.5 text-sm font-semibold tabular-nums">{value}</div>
|
|
</div>
|
|
);
|
|
}
|