feat(web): show IwoooS S4.9 templates
This commit is contained in:
@@ -52,6 +52,13 @@ type S49OwnerResponsePreflightCheck = {
|
||||
tone: 'steady' | 'warn' | 'locked'
|
||||
}
|
||||
|
||||
type S49OwnerResponseRequestTemplate = {
|
||||
key: string
|
||||
template: string
|
||||
icon: typeof ShieldCheck
|
||||
tone: 'steady' | 'warn' | 'locked'
|
||||
}
|
||||
|
||||
type Pillar = {
|
||||
key: string
|
||||
icon: typeof ShieldCheck
|
||||
@@ -353,6 +360,14 @@ const s49OwnerResponsePreflightChecks: S49OwnerResponsePreflightCheck[] = [
|
||||
{ key: 'allFiveItemsBeforeAccepted', check: 'P6', icon: ShieldCheck, tone: 'locked' },
|
||||
]
|
||||
|
||||
const s49OwnerResponseRequestTemplates: S49OwnerResponseRequestTemplate[] = [
|
||||
{ key: 'publicOnlyVsLocalGiteaGap', template: 'T1', icon: GitBranch, tone: 'warn' },
|
||||
{ key: 'orgUserEndpointIdentity', template: 'T2', icon: SearchCheck, tone: 'warn' },
|
||||
{ key: 'internal110AdjacentScope', template: 'T3', icon: Radar, tone: 'warn' },
|
||||
{ key: 'repoOwnerCanonicalScope', template: 'T4', icon: ClipboardCheck, tone: 'warn' },
|
||||
{ key: 'legacyOrInaccessibleDisposition', template: 'T5', icon: FileWarning, tone: 'locked' },
|
||||
]
|
||||
|
||||
const posturePillars: Pillar[] = [
|
||||
{ key: 'exposure', icon: Radar, tone: 'warn' },
|
||||
{ key: 'sourceControl', icon: GitBranch, tone: 'warn' },
|
||||
@@ -926,6 +941,38 @@ function S49OwnerResponsePreflightCard({ item }: { item: S49OwnerResponsePreflig
|
||||
)
|
||||
}
|
||||
|
||||
function S49OwnerResponseRequestTemplateCard({ item }: { item: S49OwnerResponseRequestTemplate }) {
|
||||
const t = useTranslations('iwooos.s49OwnerResponseRequestTemplates')
|
||||
const Icon = item.icon
|
||||
return (
|
||||
<div style={{ ...band, minHeight: 188, padding: 16 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 12 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 9 }}>
|
||||
<Icon size={18} color={toneColors[item.tone]} />
|
||||
<span style={{ fontSize: 11, color: '#87867f' }}>{t('templateLabel')}</span>
|
||||
</div>
|
||||
<span style={{ fontSize: 11, color: toneColors[item.tone] }}>{item.template}</span>
|
||||
</div>
|
||||
<h2 style={{ fontSize: 14, margin: '12px 0 6px', color: '#141413' }}>
|
||||
{t(`items.${item.key}.title` as never)}
|
||||
</h2>
|
||||
<p style={{ fontSize: 12, lineHeight: 1.55, color: '#6f6d66', margin: 0 }}>
|
||||
{t(`items.${item.key}.body` as never)}
|
||||
</p>
|
||||
<div style={{ marginTop: 10, display: 'grid', gap: 5 }}>
|
||||
<div style={{ fontSize: 11, color: '#87867f' }}>{t('ownerActionLabel')}</div>
|
||||
<div style={{ fontSize: 11, color: toneColors[item.tone], lineHeight: 1.45 }}>
|
||||
{t(`items.${item.key}.ownerAction` as never)}
|
||||
</div>
|
||||
<div style={{ fontSize: 11, color: '#87867f', marginTop: 4 }}>{t('guardLabel')}</div>
|
||||
<div style={{ fontSize: 11, color: '#6f6d66', lineHeight: 1.45 }}>
|
||||
{t(`items.${item.key}.guard` as never)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function PillarCard({ item }: { item: Pillar }) {
|
||||
const t = useTranslations('iwooos.pillars')
|
||||
const Icon = item.icon
|
||||
@@ -2153,6 +2200,26 @@ export default function IwoooSPage({ params }: { params: { locale: string } }) {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section style={{ marginBottom: 14 }}>
|
||||
<div style={{ marginBottom: 14 }}>
|
||||
<h2 style={{ fontSize: 16, margin: 0 }}>{t('s49OwnerResponseRequestTemplates.title')}</h2>
|
||||
<p style={{ fontSize: 12, color: '#6f6d66', margin: '6px 0 0', lineHeight: 1.55 }}>
|
||||
{t('s49OwnerResponseRequestTemplates.subtitle')}
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
display: 'grid',
|
||||
gridTemplateColumns: 'repeat(auto-fit, minmax(220px, 1fr))',
|
||||
gap: 12,
|
||||
}}
|
||||
>
|
||||
{s49OwnerResponseRequestTemplates.map(item => (
|
||||
<S49OwnerResponseRequestTemplateCard key={item.key} item={item} />
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section style={{ marginBottom: 14 }}>
|
||||
<div style={{ marginBottom: 14 }}>
|
||||
<h2 style={{ fontSize: 16, margin: 0 }}>{t('s49OwnerResponsePreflight.title')}</h2>
|
||||
|
||||
Reference in New Issue
Block a user