User Panel: Phase-8-Abschluss, Titelbild/Lizenzen/Zeitzonen und KI-Pruef-Pipeline
Phase 8 (Rest) + Umbauten vom 10./11.06.: - Ein Titelbild pro PM (Cover 1280x580), SVG-Platzhalter-Set + Picker, PressReleaseCoverImage-Resolver - Lizenz-/Rechteformular nach "Lizenztyp Bildupload" (7 Lizenztypen, Personen-/Sachrechte-Status, bedingte Pflichtfelder, Risikohinweise) - Veroeffentlichungs-Box vereinfacht (Embargo aus der Form-UI entfernt), geplante Termine in Europe/Berlin (Speicherung UTC, DISPLAY_TIMEZONE) - Quota-Stub (users.press_release_quota) + monatlicher Reset-Command - Einreichungs-Modal einheitlich in Show/Create/Edit; Ghost-Buttons auf filled; PM-Editor-Layout responsive entkoppelt (.pr-editor-layout) KI-Pruef-Pipeline (Phasen 1-5 des Entwicklungsplans): - API-Haertung: status nicht mehr per API setzbar, eigene Submit-Route durch denselben Funnel (Blacklist, Quota, Status-Log) - Klassifikation Rot/Gelb/Gruen asynchron (Queue classification, OpenAI-Treiber + deterministischer Fallback), ki_audits-Audit-Log - Routing: Rot -> rejected + Mail, Gelb -> Review-Queue, Gruen -> Auto-Publish; Scheduler publiziert nur gruene faellige PMs - Content-Score 0-100 -> Stufe (Standard/Geprueft/Hochwertig) inkl. Editor-Panel und Badges; Re-Klassifikation/-Score bei Aenderung - Admin: KI-Badge + Filter, On-Demand-Pruefung mit Anbieter-Override Suite: 442 passed, 4 skipped. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
0efabaf446
commit
a000238ca8
141 changed files with 5922 additions and 1001 deletions
|
|
@ -43,6 +43,8 @@ class ImageService
|
|||
'thumb' => ['width' => 320, 'height' => 240],
|
||||
'medium' => ['width' => 800, 'height' => 600],
|
||||
'large' => ['width' => 1600, 'height' => 1200],
|
||||
// Titelbild (Hero) der Detailansicht: harte Obergrenze 1280x580 px.
|
||||
'cover' => ['width' => 1280, 'height' => 580],
|
||||
];
|
||||
|
||||
public const ALLOWED_LOGO_MIME_TYPES = [
|
||||
|
|
@ -60,7 +62,7 @@ class ImageService
|
|||
|
||||
public const MAX_LOGO_BYTES = 4 * 1024 * 1024; // 4 MB
|
||||
|
||||
public const MAX_PRESS_RELEASE_IMAGE_BYTES = 8 * 1024 * 1024; // 8 MB
|
||||
public const MAX_PRESS_RELEASE_IMAGE_BYTES = 16 * 1024 * 1024; // 16 MB
|
||||
|
||||
public function __construct(private readonly string $disk = 'public') {}
|
||||
|
||||
|
|
@ -99,8 +101,9 @@ class ImageService
|
|||
}
|
||||
|
||||
/**
|
||||
* Persists a freshly uploaded press release image and generates all
|
||||
* variants. Original is stored under `press-releases/{id}/images`.
|
||||
* Persists a freshly uploaded press release image, generates all variants
|
||||
* and discards the original upload. The canonical stored path points to
|
||||
* the cover variant to keep storage usage predictable.
|
||||
*
|
||||
* @return array{
|
||||
* path: string,
|
||||
|
|
@ -122,9 +125,6 @@ class ImageService
|
|||
$disk = $this->disk();
|
||||
$disk->put($relativePath, $upload->get(), 'public');
|
||||
|
||||
$absolute = $disk->path($relativePath);
|
||||
$size = @getimagesize($absolute) ?: [null, null];
|
||||
|
||||
$variants = $this->generateVariants(
|
||||
$disk,
|
||||
$relativePath,
|
||||
|
|
@ -133,11 +133,19 @@ class ImageService
|
|||
cover: true,
|
||||
);
|
||||
|
||||
$coverPath = $variants['cover'] ?? $relativePath;
|
||||
$coverAbsolute = $disk->path($coverPath);
|
||||
$coverSize = @getimagesize($coverAbsolute) ?: [null, null];
|
||||
|
||||
if ($coverPath !== $relativePath && $disk->exists($relativePath)) {
|
||||
$disk->delete($relativePath);
|
||||
}
|
||||
|
||||
return [
|
||||
'path' => $relativePath,
|
||||
'path' => $coverPath,
|
||||
'variants' => $variants,
|
||||
'width' => is_int($size[0] ?? null) ? $size[0] : null,
|
||||
'height' => is_int($size[1] ?? null) ? $size[1] : null,
|
||||
'width' => is_int($coverSize[0] ?? null) ? $coverSize[0] : null,
|
||||
'height' => is_int($coverSize[1] ?? null) ? $coverSize[1] : null,
|
||||
'mime' => $upload->getMimeType(),
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue