MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / FakeTermBlock

Function FakeTermBlock

frontend/app/onboarding/onboarding-layout-term.tsx:19–75  ·  view source on GitHub ↗
({
    connectionName = "ubuntu@remoteserver",
    durableStatus = null,
    className,
    command,
    typeIntervalMs = 80,
    onComplete,
    children,
}: FakeTermBlockProps)

Source from the content-addressed store, hash-verified

17};
18
19export const FakeTermBlock = ({
20 connectionName = "ubuntu@remoteserver",
21 durableStatus = null,
22 className,
23 command,
24 typeIntervalMs = 80,
25 onComplete,
26 children,
27}: FakeTermBlockProps) => {
28 const color = "var(--conn-icon-color-1)";
29
30 const durableIconColor = durableStatus === "connected" ? "text-sky-500" : "text-sky-300";
31
32 return (
33 <div
34 className={cn(
35 "w-full h-full bg-background rounded flex flex-col overflow-hidden border-2 border-accent",
36 className
37 )}
38 >
39 <div className="flex items-center gap-2 px-2 py-1.5 bg-border/20 border-b border-border/50 pl-[2px]">
40 <div className="group flex items-center flex-nowrap overflow-hidden text-ellipsis min-w-0 font-normal text-primary rounded-sm">
41 <span className="fa-stack flex-[1_1_auto] overflow-hidden">
42 <i
43 className={cn(makeIconClass("arrow-right-arrow-left", false), "fa-stack-1x mr-[2px]")}
44 style={{ color: color }}
45 />
46 </span>
47 <div className="flex-[1_2_auto] overflow-hidden pr-1 ellipsis">{connectionName}</div>
48 </div>
49 {durableStatus && (
50 <div className="iconbutton disabled text-[13px] ml-[-4px]">
51 <i className={`fa-sharp fa-solid fa-shield ${durableIconColor}`} />
52 </div>
53 )}
54 <div className="flex-1" />
55 <span className="inline-block [&_svg]:fill-foreground/50 [&_svg_path]:!fill-foreground/50">
56 <MagnifyIcon enabled={false} />
57 </span>
58 <i className={makeIconClass("xmark-large", false) + " text-xs text-foreground/50"} />
59 </div>
60 <div className="flex-1 overflow-auto p-4">
61 {children ? (
62 children
63 ) : command ? (
64 <div className="font-mono text-sm">
65 <CommandReveal command={command} typeIntervalMs={typeIntervalMs} onComplete={onComplete} />
66 </div>
67 ) : (
68 <div className="flex items-center justify-center h-full">
69 <i className={makeIconClass("terminal", false) + " text-4xl text-foreground/50"} />
70 </div>
71 )}
72 </div>
73 </div>
74 );
75};
76

Callers

nothing calls this directly

Calls 2

cnFunction · 0.90
makeIconClassFunction · 0.90

Tested by

no test coverage detected