Noch schneller (0.46.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m38s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 8m0s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 11m51s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 12m15s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 13m27s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 13m42s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 16m0s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 15m20s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 56s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m14s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m38s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 8m0s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 11m51s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 12m15s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 13m27s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 13m42s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 16m0s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 15m20s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 56s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m14s
- Erscheinungsbild: große Fotos (Anmeldung, Titelbild) beim Speichern als WebP ≤ 2400 px; Migration verkleinert vorhandene einmal - Vite: Grundgerüst und UI-Bausteine als gemeinsame Dateien (Startseite 34 statt 58 Skripte) - Plugin-Oberflächen: Kopie nach public/ erneuert sich bei neuem Build (Fingerabdruck von dist/inhaus.json), auch ohne neue Version Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2b8769aa23
commit
03e31f42b5
422 changed files with 1429 additions and 1712 deletions
|
|
@ -263,4 +263,38 @@ class AppearanceTest extends TestCase
|
|||
$this->get('/?vorschau=aus');
|
||||
$this->assertNull(session(Branding::PREVIEW_SESSION_KEY));
|
||||
}
|
||||
|
||||
public function test_large_photos_are_shrunk_logos_stay(): void
|
||||
{
|
||||
$disk = Storage::disk('uploads');
|
||||
// Kamerafoto nachbilden: Rauschen (einfarbige Testbilder wären winzig), 4000 × 3000 px
|
||||
$small = imagecreatetruecolor(400, 300);
|
||||
for ($x = 0; $x < 400; $x++) {
|
||||
for ($y = 0; $y < 300; $y++) {
|
||||
imagesetpixel($small, $x, $y, random_int(0, 0xFFFFFF));
|
||||
}
|
||||
}
|
||||
$photo = imagecreatetruecolor(4000, 3000);
|
||||
imagecopyresampled($photo, $small, 0, 0, 0, 0, 4000, 3000, 400, 300);
|
||||
ob_start();
|
||||
imagejpeg($photo, null, 92);
|
||||
$disk->put('theme/kamera.jpg', ob_get_clean());
|
||||
$disk->put('theme/logo.png', UploadedFile::fake()->image('logo.png', 3000, 800)->getContent());
|
||||
$this->assertGreaterThan(450 * 1024, $disk->size('theme/kamera.jpg'));
|
||||
|
||||
$theme = app(Theme::class);
|
||||
$theme->saveDraft(['login_image' => 'theme/kamera.jpg', 'logo_light' => 'theme/logo.png']);
|
||||
$draft = $theme->draft();
|
||||
|
||||
$this->assertStringEndsWith('.webp', $draft['login_image']);
|
||||
$this->assertLessThan($disk->size('theme/kamera.jpg'), $disk->size($draft['login_image']));
|
||||
[$width] = getimagesize($disk->path($draft['login_image']));
|
||||
$this->assertSame(2400, $width);
|
||||
$this->assertSame('theme/logo.png', $draft['logo_light']);
|
||||
|
||||
// Migration für schon veröffentlichte Fotos
|
||||
app(Settings::class)->set('theme.published', [...$theme->published(), 'profile_cover' => 'theme/kamera.jpg']);
|
||||
$theme->optimizePhotos();
|
||||
$this->assertStringEndsWith('.webp', $theme->published()['profile_cover']);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue