修改完成55%

This commit is contained in:
2026-07-15 08:31:21 +08:00
parent 8c98936da5
commit 241a7af54c
98 changed files with 3269 additions and 782 deletions
+63
View File
@@ -0,0 +1,63 @@
$ErrorActionPreference = 'Stop'
function Assert-Contains {
param([string]$Content, [string]$Expected, [string]$Message)
if ($Content -notmatch [regex]::Escape($Expected)) { throw $Message }
}
function Assert-NoCssSurface {
param([string]$Content, [string]$ClassName)
foreach ($property in @('border', 'background', 'border-radius')) {
if ($Content -match "(?s)\\.$ClassName\\s*\\{[^}]*\\b$property\\s*:") {
throw "G11-G12 must not construct .$ClassName with CSS $property"
}
}
}
$root = Split-Path -Parent $PSScriptRoot
$g11 = Get-Content -LiteralPath (Join-Path $root 'pages/genealogy/g11-genealogy-settings.vue') -Raw -Encoding utf8
$g12 = Get-Content -LiteralPath (Join-Path $root 'pages/genealogy/g12-generation-poems.vue') -Raw -Encoding utf8
$catalog = Get-Content -LiteralPath (Join-Path $root 'data/page-catalog.js') -Raw -Encoding utf8
foreach ($page in @($g11, $g12)) {
if ($page -match '<ModulePage') { throw 'G11-G12 must not retain the generic ModulePage shell' }
Assert-Contains $page 'page-paper.jpg' 'G11-G12 must use the accepted genealogy paper background'
Assert-Contains $page 'g03-create-flow-panel.png' 'G11-G12 forms must reuse the complete genealogy paper panel'
if ($page -match "@/utils/api\.js|\bappApi\b") { throw 'G11-G12 design phase must not connect the API layer' }
}
foreach ($required in @(
"const settingsState = ref('loading')",
'settings-state--form',
'settings-state--success',
'settings-state--error',
'g06-search-input-wide.png',
'a01-primary-button.png',
'const genealogyDraft',
'query.genealogyId',
"'MEMBER_ONLY'",
"'PUBLIC_APPLY'"
)) { Assert-Contains $g11 $required "Missing G11 settings contract: $required" }
foreach ($required in @(
"const poemState = ref('loading')",
'poem-state--list',
'poem-state--empty',
'poem-state--edit',
'poem-state--error',
'g06-search-input-wide.png',
'a01-primary-button.png',
'a01-secondary-button.png',
'const poemRows',
'stopMissingOldGeneration',
'query.genealogyId'
)) { Assert-Contains $g12 $required "Missing G12 generation-poem contract: $required" }
foreach ($className in @('settings-panel', 'settings-action', 'poem-row', 'poem-editor', 'poem-action')) {
foreach ($page in @($g11, $g12)) { Assert-NoCssSurface $page $className }
}
foreach ($entry in @('g11:', 'g12:')) {
if ($catalog -match [regex]::Escape($entry)) { throw "Page catalog must remove migrated generic entry: $entry" }
}
Write-Output 'G11-G12-SETTINGS-POEMS-CONTRACT PASS'