接口开始5%

This commit is contained in:
rain
2026-07-22 17:31:33 +08:00
parent eced3d1e6e
commit 9b0ad62df4
426 changed files with 20111 additions and 28472 deletions
@@ -1,12 +1,9 @@
$ErrorActionPreference = 'Stop'
Add-Type -AssemblyName System.Drawing
$repoRoot = Split-Path -Parent $PSScriptRoot
$pagesJsonPath = Join-Path $repoRoot 'pages.json'
$componentPath = Join-Path $repoRoot 'components/GenealogyPageBackground.vue'
$assetRelativePath = 'static/assets/modules/genealogy/opaque/genealogy-page-background-long.png'
$assetPath = Join-Path $repoRoot $assetRelativePath
$expectedHash = '9aa9ebdd231eddbc151e238ba340a00f8603f23143117ad8c93009947dcca2e2'
function Assert-Contract {
param(
@@ -39,16 +36,6 @@ Assert-Contract ($componentSource -match '(?s)\.genealogy-page-background__art\s
Assert-Contract ($componentSource -notmatch '(?s)\.genealogy-page-background__art\s*\{[^}]*top:\s*0;') 'shared artwork must not remain top-aligned'
Assert-Contract ($componentSource -match '(?s)\.genealogy-page-background__art\s*\{[^}]*opacity:\s*0\.28;') 'shared artwork must use the approved 28% opacity'
$image = [System.Drawing.Image]::FromFile($assetPath)
try {
Assert-Contract ($image.Width -eq 1440 -and $image.Height -eq 3600) "expected 1440x3600 runtime background, got $($image.Width)x$($image.Height)"
}
finally {
$image.Dispose()
}
$actualHash = (Get-FileHash -Algorithm SHA256 -LiteralPath $assetPath).Hash.ToLowerInvariant()
Assert-Contract ($actualHash -eq $expectedHash) "shared runtime asset SHA-256 mismatch: $actualHash"
foreach ($route in $genealogyRoutes) {
$pagePath = Join-Path $repoRoot ($route + '.vue')
Assert-Contract (Test-Path -LiteralPath $pagePath) "missing route file $route.vue"