完成50%

This commit is contained in:
2026-07-23 08:23:59 +08:00
parent 9b0ad62df4
commit f1edc6b533
218 changed files with 24318 additions and 5514 deletions
+19 -14
View File
@@ -13,7 +13,6 @@ function Assert-Contains {
}
$page = Read-Utf8 'pages/family/f09-media-upload.vue'
$catalog = Read-Utf8 'data/page-catalog.js'
foreach ($expected in @(
'class="media-upload-page"',
@@ -34,16 +33,18 @@ foreach ($expected in @(
'const removePhoto = (index) =>',
'const addMockPhoto = () =>',
'const updateActiveNote = (event) =>',
'const startUpload = () =>',
'const retryFailed = () =>',
'const generatePreview = () =>',
'const returnToAlbum = () =>',
'["permission", "selected", "uploading", "error", "success"].includes(query.state)',
'["permission", "selected", "preview"].includes(query.state)',
'findFamilyAlbumFixture(genealogyId.value, albumId.value)',
'const isDirty = computed(() =>',
'createDiscardConfirmation',
'runBackGuard',
'onBackPress((event) => handleBackPress(event, requestBack));',
'class="media-preview-title"',
'class="media-permission-action"',
'class="media-photo-status media-photo-status--error"',
'class="media-success-title"',
'class="media-progress-copy"',
'class="media-preview-title"',
'class="media-primary-action"',
'class="media-retry-action"',
'f08-reunion-hero.png',
'f08-family-portrait.png',
'f08-reunion-table.png',
@@ -60,14 +61,22 @@ foreach ($forbidden in @(
'<ModulePage page-id="f09"',
'import ModulePage from',
'uni.chooseMedia',
'uni.showModal'
'uni.showModal',
'uni.redirectTo',
'/pages/',
'uploading',
'uploaded',
'success',
'retryFailed',
'/genealogy/app/files/upload',
'finishPage('
)) {
if ($page.Contains($forbidden)) { throw "F09 retains forbidden dependency: $forbidden" }
}
foreach ($requiredPosition in @(
'(?s)\.media-photo-tile\s*\{[^}]*position:\s*relative;',
'(?s)\.media-photo-order,\s*\.media-photo-current,\s*\.media-photo-status\s*\{[^}]*position:\s*absolute;',
'(?s)\.media-photo-order,\s*\.media-photo-current\s*\{[^}]*position:\s*absolute;',
'(?s)\.media-photo-remove\s*\{[^}]*position:\s*absolute;'
)) {
if ($page -notmatch $requiredPosition) { throw "F09 required thumbnail overlay boundary missing: $requiredPosition" }
@@ -75,8 +84,4 @@ foreach ($requiredPosition in @(
if ([regex]::Matches($page, 'position\s*:').Count -ne 3) { throw 'F09 must keep only thumbnail badges and their local photo boundary positioned' }
if ([regex]::Matches($page, '<textarea(?=[^>]*\sauto-height(?:\s|>))').Count -ne 2) { throw 'F09 batch and per-photo descriptions must both grow with content' }
if ($catalog -match '(?m)^\s*f09\s*:') {
throw 'F09 obsolete page-catalog owner must be removed'
}
Write-Output 'F09-MEDIA-UPLOAD-CONTRACT PASS'