fix: add A01 ornamental auth assets
This commit is contained in:
@@ -10,7 +10,10 @@ $backgrounds = @(
|
||||
)
|
||||
$icons = @(
|
||||
'static/assets/icons/auth/login-outline-v1.png',
|
||||
'static/assets/icons/auth/wechat-licensed-v1.png'
|
||||
'static/assets/icons/auth/wechat-licensed-v1.png',
|
||||
'static/assets/icons/auth/auth-button-corner-v1.png',
|
||||
'static/assets/icons/auth/auth-divider-knot-v1.png',
|
||||
'static/assets/icons/auth/auth-title-cloud-v1.png'
|
||||
)
|
||||
|
||||
foreach ($asset in $backgrounds + $icons) {
|
||||
@@ -37,7 +40,13 @@ foreach ($asset in $icons) {
|
||||
}
|
||||
$bitmap.Dispose()
|
||||
|
||||
if ($width -ne 96 -or $height -ne 96) { throw "$asset must be 96 x 96px." }
|
||||
$expectedSize = switch ($asset) {
|
||||
'static/assets/icons/auth/auth-button-corner-v1.png' { @(160, 160) }
|
||||
'static/assets/icons/auth/auth-divider-knot-v1.png' { @(160, 96) }
|
||||
'static/assets/icons/auth/auth-title-cloud-v1.png' { @(200, 120) }
|
||||
default { @(96, 96) }
|
||||
}
|
||||
if ($width -ne $expectedSize[0] -or $height -ne $expectedSize[1]) { throw "$asset must be $($expectedSize[0]) x $($expectedSize[1])px." }
|
||||
if (($corners | Where-Object { $_ -ne 0 }).Count -ne 0) { throw "$asset has opaque outer corners." }
|
||||
if ($visiblePixels -lt 80) { throw "$asset has no usable visible artwork." }
|
||||
Write-Output "PASS $asset transparent corners and visible artwork"
|
||||
|
||||
Reference in New Issue
Block a user