# Fix display: grid compatibility for UTS Android # UTS Android only supports display: flex and display: none $files = @( "h:\blews\akmon\pages\sport\teacher\analytics.uvue", "h:\blews\akmon\pages\sport\teacher\records.uvue", "h:\blews\akmon\pages\sport\teacher\project-create.uvue", "h:\blews\akmon\pages\sport\student\record-detail.uvue", "h:\blews\akmon\pages\eldercare\incident\report.uvue", "h:\blews\akmon\pages\eldercare\finance\management.uvue", "h:\blews\akmon\pages\eldercare\family\dashboard.uvue", "h:\blews\akmon\pages\eldercare\nurse\dashboard.uvue", "h:\blews\akmon\pages\eldercare\equipment\management.uvue", "h:\blews\akmon\pages\eldercare\analytics\dashboard.uvue" ) $totalFixed = 0 foreach ($file in $files) { if (Test-Path $file) { Write-Host "Processing: $file" -ForegroundColor Yellow # Read file content $content = Get-Content $file -Raw -Encoding UTF8 $originalContent = $content # Replace display: grid with display: flex + flex-wrap $content = $content -replace 'display:\s*grid;', 'display: flex; flex-wrap: wrap;' $content = $content -replace 'display:\s*grid\s*;', 'display: flex; flex-wrap: wrap;' # Count replacements $gridMatches = [regex]::Matches($originalContent, 'display:\s*grid\s*;') $fixedCount = $gridMatches.Count if ($fixedCount -gt 0) { # Write the modified content back Set-Content $file $content -Encoding UTF8 Write-Host " āœ… Fixed $fixedCount display: grid instances" -ForegroundColor Green $totalFixed += $fixedCount } else { Write-Host " ā„¹ļø No display: grid found" -ForegroundColor Gray } } else { Write-Host " āŒ File not found: $file" -ForegroundColor Red } } Write-Host "`nšŸ“Š Summary:" -ForegroundColor Cyan Write-Host "Total files processed: $($files.Count)" -ForegroundColor White Write-Host "Total display: grid instances fixed: $totalFixed" -ForegroundColor Green Write-Host "`nāœ… All display: grid properties have been converted to flex layout!" -ForegroundColor Green