feat(web): add iwooos delivery checklist

This commit is contained in:
Your Name
2026-05-24 21:46:08 +08:00
parent b9140dc834
commit d068b06d2c
8 changed files with 440 additions and 2 deletions

View File

@@ -1075,6 +1075,39 @@ const iwooosConcreteSecurityWorkMapBoundaries = [
'gitea_disablement_authorized=false',
] as const
const iwooosConcreteSecurityDeliveryChecklist = [
{ key: 'visibilitySurface', deliverable: 'D1', state: '已交付', icon: SearchCheck, tone: 'steady' },
{ key: 'hostScopeEvidence', deliverable: 'D2', state: '已框架化', icon: Activity, tone: 'warn' },
{ key: 'sourceControlEvidence', deliverable: 'D3', state: '待 owner', icon: GitBranch, tone: 'warn' },
{ key: 's49OwnerPacket', deliverable: 'D4', state: '待收件', icon: ClipboardCheck, tone: 'warn' },
{ key: 'reviewerPreparation', deliverable: 'D5', state: '佇列未開', icon: ListChecks, tone: 'locked' },
{ key: 'runtimeGate', deliverable: 'D6', state: '未授權', icon: Lock, tone: 'locked' },
] as const
const iwooosConcreteSecurityDeliveryChecklistBoundaries = [
'iwooos_concrete_security_delivery_item_count=6',
'iwooos_concrete_security_delivery_visible_item_count=6',
'iwooos_concrete_security_delivery_framework_only_count=6',
'iwooos_concrete_security_delivery_runtime_item_count=0',
'iwooos_concrete_security_delivery_next_owner_evidence=s4_9_owner_response',
'iwooos_concrete_security_delivery_ready_for_runtime_count=0',
'iwooos_concrete_security_delivery_evidence_received_count=0',
'iwooos_concrete_security_delivery_evidence_accepted_count=0',
'iwooos_concrete_security_delivery_reviewer_queue_open=false',
'iwooos_concrete_security_delivery_git_primary_ready=false',
'iwooos_concrete_security_delivery_kali_execution_ready=false',
'runtime_execution_authorized=false',
'active_runtime_gate_count=0',
'action_buttons_allowed=false',
'not_authorization=true',
'secret_value_collection_allowed=false',
'repo_creation_authorized=false',
'refs_sync_authorized=false',
'workflow_modification_authorized=false',
'github_primary_switch_authorized=false',
'gitea_disablement_authorized=false',
] as const
const iwooosFirstProgressUnlockPathSteps = [
{ key: 'ownerResponseScope', step: '01', state: '待收件', icon: ClipboardCheck, tone: 'warn' },
{ key: 'redactedEvidencePointer', step: '02', state: '待補證', icon: FileText, tone: 'warn' },
@@ -4284,6 +4317,125 @@ function IwoooSConcreteSecurityWorkMapBoard() {
)
}
function IwoooSConcreteSecurityDeliveryChecklistBoard() {
const t = useTranslations('iwooos.concreteSecurityDeliveryChecklist')
const summaryItems = [
{ key: 'items', value: '6', tone: 'warn' as const },
{ key: 'framework', value: '只讀', tone: 'steady' as const },
{ key: 'blocked', value: 'S4.9', tone: 'warn' as const },
{ key: 'runtime', value: '0', tone: 'locked' as const },
]
const textWrap = { overflowWrap: 'anywhere' as const, wordBreak: 'break-word' as const }
return (
<section style={{ marginBottom: 14 }} data-testid="iwooos-concrete-security-delivery-checklist-board">
<div style={{ ...band, padding: 16, background: '#f7f8f3' }}>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(min(100%, 312px), 1fr))', gap: 16 }}>
<div>
<div style={{ marginBottom: 14 }}>
<h2 style={{ fontSize: 17, margin: 0 }}>{t('title')}</h2>
<p style={{ fontSize: 12, color: '#63695a', margin: '6px 0 0', lineHeight: 1.55, ...textWrap }}>
{t('subtitle')}
</p>
</div>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(126px, 1fr))', gap: 8, marginBottom: 14 }}>
{summaryItems.map(item => (
<div key={item.key} style={{ border: '0.5px solid #dfe4d6', borderRadius: 8, padding: 12, background: '#fff' }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 8 }}>
<span style={{ fontSize: 11, color: '#737968' }}>{t(`summary.${item.key}.label` as never)}</span>
<ToneDot tone={item.tone} />
</div>
<div style={{ fontSize: 20, fontWeight: 700, lineHeight: 1.1, marginTop: 8, color: '#141413' }}>
{item.value}
</div>
<p style={{ fontSize: 11, color: '#63695a', lineHeight: 1.45, margin: '8px 0 0', ...textWrap }}>
{t(`summary.${item.key}.detail` as never)}
</p>
</div>
))}
</div>
<div style={{ display: 'grid', gap: 10 }}>
{iwooosConcreteSecurityDeliveryChecklist.map(item => {
const Icon = item.icon
return (
<div
key={item.key}
style={{
display: 'grid',
gridTemplateColumns: 'minmax(74px, 0.26fr) minmax(0, 1fr)',
gap: 12,
border: '0.5px solid #dfe4d6',
borderRadius: 8,
background: '#fff',
padding: 13,
color: '#141413',
...textWrap,
}}
>
<div style={{ display: 'grid', alignContent: 'start', gap: 8 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 7 }}>
<Icon size={17} color={toneColors[item.tone]} />
<span style={{ color: toneColors[item.tone], fontSize: 12, fontWeight: 700 }}>
{t('deliverableLabel')} {item.deliverable}
</span>
</div>
<span style={{ color: toneColors[item.tone], fontSize: 13, fontWeight: 700, lineHeight: 1.25 }}>
{item.state}
</span>
</div>
<div style={{ display: 'grid', gap: 8 }}>
<h3 style={{ fontSize: 14, margin: 0, color: '#141413', lineHeight: 1.3 }}>
{t(`items.${item.key}.title` as never)}
</h3>
<p style={{ fontSize: 11, color: '#596052', lineHeight: 1.45, margin: 0, ...textWrap }}>
<strong>{t('deliveredLabel')}</strong>{t(`items.${item.key}.delivered` as never)}
</p>
<p style={{ fontSize: 11, color: '#596052', lineHeight: 1.45, margin: 0, ...textWrap }}>
<strong>{t('nextLabel')}</strong>{t(`items.${item.key}.next` as never)}
</p>
<p style={{ fontSize: 11, color: '#6f4f37', lineHeight: 1.45, margin: 0, ...textWrap }}>
<strong>{t('blockedLabel')}</strong>{t(`items.${item.key}.blocked` as never)}
</p>
</div>
</div>
)
})}
</div>
</div>
<div style={{ ...band, padding: 14, background: '#eff2e9', alignSelf: 'stretch' }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 10 }}>
<CheckCircle2 size={16} color={toneColors.warn} />
<h3 style={{ fontSize: 14, margin: 0 }}>{t('boundaryTitle')}</h3>
</div>
<p style={{ fontSize: 12, color: '#63695a', lineHeight: 1.55, margin: '0 0 10px', ...textWrap }}>
{t('boundaryIntro')}
</p>
<div style={{ display: 'grid', gap: 7 }}>
{iwooosConcreteSecurityDeliveryChecklistBoundaries.map(item => (
<span
key={item}
style={{
border: '0.5px solid #d7decd',
borderRadius: 8,
padding: '7px 9px',
color: '#4d5545',
fontSize: 11,
lineHeight: 1.4,
background: '#fff',
overflowWrap: 'anywhere',
}}
>
{item}
</span>
))}
</div>
</div>
</div>
</div>
</section>
)
}
function IwoooSFirstProgressUnlockPathBoard() {
const t = useTranslations('iwooos.firstProgressUnlockPath')
const summaryItems = [
@@ -9015,6 +9167,8 @@ export default function IwoooSPage({ params }: { params: { locale: string } }) {
<IwoooSConcreteSecurityWorkMapBoard />
<IwoooSConcreteSecurityDeliveryChecklistBoard />
<IwoooSFirstProgressUnlockPathBoard />
<IwoooSFirstUnlockEvidencePacketBoard />