mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-22 08:15:53 +00:00
style: 完成所有文件的lint
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { Environment } from "../types";
|
||||
import { StatusBadge } from "./Navbar";
|
||||
import { esc, formatTime } from "../lib/utils";
|
||||
import type { Environment } from '../types';
|
||||
import { StatusBadge } from './Navbar';
|
||||
import { esc, formatTime } from '../lib/utils';
|
||||
|
||||
interface EnvironmentListProps {
|
||||
environments: Environment[];
|
||||
@@ -18,10 +18,10 @@ export function EnvironmentList({ environments, onSelectEnvironment }: Environme
|
||||
|
||||
return (
|
||||
<div className="space-y-2">
|
||||
{environments.map((env) => {
|
||||
const isAcp = env.worker_type === "acp";
|
||||
const typeLabel = isAcp ? "ACP Agent" : "Claude Code";
|
||||
const typeColor = isAcp ? "bg-brand/15 text-brand" : "bg-status-running/15 text-status-running";
|
||||
{environments.map(env => {
|
||||
const isAcp = env.worker_type === 'acp';
|
||||
const typeLabel = isAcp ? 'ACP Agent' : 'Claude Code';
|
||||
const typeColor = isAcp ? 'bg-brand/15 text-brand' : 'bg-status-running/15 text-status-running';
|
||||
|
||||
return (
|
||||
<button
|
||||
@@ -29,26 +29,20 @@ export function EnvironmentList({ environments, onSelectEnvironment }: Environme
|
||||
type="button"
|
||||
onClick={() => onSelectEnvironment?.(env)}
|
||||
disabled={isAcp}
|
||||
className={`flex w-full items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 text-left transition-colors ${isAcp ? "cursor-default opacity-80" : "hover:border-border-light cursor-pointer"}`}
|
||||
className={`flex w-full items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 text-left transition-colors ${isAcp ? 'cursor-default opacity-80' : 'hover:border-border-light cursor-pointer'}`}
|
||||
>
|
||||
<div className="flex items-center gap-3">
|
||||
<div>
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="font-medium text-text-primary">
|
||||
{env.machine_name || env.id}
|
||||
</span>
|
||||
<span className={`rounded-full px-2 py-0.5 text-xs font-medium ${typeColor}`}>
|
||||
{typeLabel}
|
||||
</span>
|
||||
<span className="font-medium text-text-primary">{env.machine_name || env.id}</span>
|
||||
<span className={`rounded-full px-2 py-0.5 text-xs font-medium ${typeColor}`}>{typeLabel}</span>
|
||||
</div>
|
||||
<div className="text-sm text-text-muted">{env.directory || ""}</div>
|
||||
<div className="text-sm text-text-muted">{env.directory || ''}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-right">
|
||||
<StatusBadge status={env.status} />
|
||||
<div className="mt-1 text-xs text-text-muted">
|
||||
{env.branch || ""}
|
||||
</div>
|
||||
<div className="mt-1 text-xs text-text-muted">{env.branch || ''}</div>
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user