hololake-system-architecture/product-source/hololake-platform/src/components/FifthDomainSystems.tsx

190 lines
7.8 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { useState } from 'react'
import type { AppLocale } from '../lib/i18n'
import { Button } from './ui/button'
import { PersonaRepositoryBindingPanel } from './PersonaRepositoryBindingPanel'
import { PersonaRuntimeProjectionPanel } from './PersonaRuntimeProjectionPanel'
type FifthDomainSystemId = 'pufferfish' | 'eternal-lake-heart'
type FifthDomainSystemsProps = {
detail?: 'overview' | 'pufferfish'
locale: AppLocale
onEnterEternalLake: () => void
onEnterPufferfish: () => void
repositoryPaths: readonly string[]
}
const PUFFERFISH_FACTS = {
brain: 'BS-SG-001',
node: 'canger-home-ubuntu-live-20260729',
nodeId: 'node_1cfab77579a3e9018f7a9037',
persona: 'ICE-GL-CA001',
} as const
export function FifthDomainSystems({
detail = 'overview',
locale,
onEnterEternalLake,
onEnterPufferfish,
repositoryPaths,
}: FifthDomainSystemsProps) {
const [selected, setSelected] = useState<FifthDomainSystemId | null>(
detail === 'pufferfish' ? 'pufferfish' : null,
)
const pufferfishSelected = selected === 'pufferfish'
const eternalLakeSelected = selected === 'eternal-lake-heart'
const evidenceLabel = '本地拓扑预览'
const nodeState = '未实时核验'
return (
<section className="fifth-systems" data-detail={detail}>
<header className="fifth-systems__heading">
<div>
<h1>{detail === 'pufferfish' ? '胖头鱼语言子系统' : '第五域'}</h1>
<p>
{detail === 'pufferfish'
? '苍耳人格体从新加坡大脑服务器进入家庭 Ubuntu 执行节点;所有操作受主控授权与审计边界约束。'
: '不同人类系统通过各自真实服务器接入,同时保持系统归属与主权边界。'}
</p>
</div>
<span className="fifth-systems__presence"><i />{evidenceLabel}</span>
</header>
<div className="fifth-systems__layout">
<div className="fifth-systems__canvas">
<div className="fifth-systems__grid" aria-hidden />
<div className="fifth-system-columns">
<article
className="system-path system-path--pufferfish"
data-selected={pufferfishSelected}
onClick={() => setSelected('pufferfish')}
>
<header>
<button type="button" onClick={() => setSelected('pufferfish')}>
<span className="system-path__mark"></span>
<span><strong></strong><small><i />{evidenceLabel}</small></span>
</button>
</header>
<div className="system-path__route" aria-label="胖头鱼系统真实连接路径">
<div className="system-node">
<span></span>
<strong></strong>
<code>{PUFFERFISH_FACTS.brain}</code>
<small><i />{nodeState}</small>
</div>
<b aria-hidden />
<div className="system-node">
<span></span>
<strong> Ubuntu</strong>
<code>{PUFFERFISH_FACTS.node}</code>
<small><i /></small>
</div>
</div>
<div className="system-path__persona">
<span></span>
<strong>{PUFFERFISH_FACTS.persona}</strong>
<small><i /></small>
</div>
</article>
<article
className="system-path system-path--eternal"
data-selected={eternalLakeSelected}
onClick={() => setSelected('eternal-lake-heart')}
>
<header>
<button type="button" onClick={() => setSelected('eternal-lake-heart')}>
<span className="system-path__mark"></span>
<span><strong></strong><small><i />{evidenceLabel}</small></span>
</button>
</header>
<div className="system-path__route system-path__route--single">
<div className="system-node">
<span></span>
<strong></strong>
<code>JD-FD-PRIMARY</code>
<small><i />{nodeState}</small>
</div>
</div>
</article>
</div>
</div>
<aside className="fifth-system-inspector">
{selected === null ? (
<div className="fifth-system-inspector__overview">
<span>FIFTH DOMAIN SYSTEMS</span>
<h2></h2>
<p></p>
<dl>
<div><dt></dt><dd></dd></div>
<div><dt></dt><dd>2 </dd></div>
<div><dt></dt><dd></dd></div>
</dl>
</div>
) : <>
<header>
<h2>{pufferfishSelected ? '胖头鱼语言子系统' : '永恒湖心系统'}</h2>
<span><i />{evidenceLabel}</span>
</header>
{pufferfishSelected ? (
<>
<dl>
<div><dt></dt><dd>{evidenceLabel}</dd></div>
<div><dt></dt><dd>{PUFFERFISH_FACTS.brain}</dd></div>
<div><dt></dt><dd title={PUFFERFISH_FACTS.node}>{PUFFERFISH_FACTS.node}</dd></div>
<div><dt></dt><dd>{PUFFERFISH_FACTS.nodeId}</dd></div>
<div><dt></dt><dd>{PUFFERFISH_FACTS.persona}</dd></div>
<div><dt></dt><dd> · </dd></div>
</dl>
{detail === 'pufferfish'
? <div className="fifth-system-inspector__expanded"><i /></div>
: <Button onClick={onEnterPufferfish}></Button>}
</>
) : (
<>
<dl>
<div><dt></dt><dd>{evidenceLabel}</dd></div>
<div><dt></dt><dd>JD-FD-PRIMARY</dd></div>
<div><dt></dt><dd></dd></div>
<div><dt></dt><dd></dd></div>
</dl>
<PersonaRepositoryBindingPanel
locale={locale}
personaId="ICE-P-ZY001"
repositoryPaths={repositoryPaths}
/>
<PersonaRuntimeProjectionPanel
locale={locale}
personaId="ICE-P-ZY001"
repositoryPaths={repositoryPaths}
/>
<Button onClick={onEnterEternalLake}></Button>
</>
)}
</>}
<footer>
线
</footer>
</aside>
</div>
{detail === 'pufferfish' ? (
<div className="pufferfish-boundaries">
<section>
<h2></h2>
<p> SSH </p>
</section>
<section>
<h2></h2>
<p></p>
</section>
<section>
<h2></h2>
<p>退</p>
</section>
</div>
) : null}
</section>
)
}