- Galerien sind nun eine Entität - es kann mehrere geben

- Neues Sparkbooth-Upload-Feature: Endpoint /api/sparkbooth/upload (Token-basiert pro Galerie), Controller Api/SparkboothUploadController, Migration 2026_01_21_000001_add_upload_fields_to_galleries_table.php mit Upload-Flags/Token/Expiry;
    Galerie-Modell und Factory/Seeder entsprechend erweitert.
  - Filament: Neue Setup-Seite SparkboothSetup (mit View) zur schnellen Galerie- und Token-Erstellung inkl. QR/Endpoint/Snippet;
    Galerie-Link-Views nutzen jetzt simple-qrcode (Composer-Dependency hinzugefügt) und bieten PNG-Download.
  - Galerie-Tabelle: Slug/Pfad-Spalten entfernt, Action „Link-Details“ mit Modal; Created-at-Spalte hinzugefügt.
  - Zugriffshärtung: Galerie-IDs in API (ImageController, Download/Print) geprüft; GalleryAccess/Middleware + Gallery-Modell/Slug-UUID
    eingeführt; GalleryAccess-Inertia-Seite.
  - UI/UX: LoadingSpinner/StyledImageDisplay verbessert, Delete-Confirm, Übersetzungen ergänzt.
This commit is contained in:
2025-12-04 07:52:50 +01:00
parent 52dc61ca16
commit f5da8ed877
49 changed files with 2243 additions and 165 deletions

View File

@@ -0,0 +1,39 @@
<?php
namespace Database\Seeders;
use App\Models\Gallery;
use App\Settings\GeneralSettings;
use Illuminate\Database\Seeder;
use Illuminate\Support\Str;
class GallerySeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
/** @var \App\Settings\GeneralSettings $settings */
$settings = app(GeneralSettings::class);
Gallery::firstOrCreate(
['slug' => Str::uuid()->toString()],
[
'name' => 'Default Gallery',
'title' => $settings->gallery_heading ?? 'Style Gallery',
'images_path' => 'uploads',
'is_public' => true,
'allow_ai_styles' => true,
'allow_print' => true,
'require_password' => (bool) $settings->require_gallery_password,
'password_hash' => $settings->gallery_password_hash,
'expires_at' => $settings->gallery_expires_at,
'access_duration_minutes' => $settings->gallery_access_duration_minutes,
'upload_enabled' => false,
'upload_token_hash' => null,
'upload_token_expires_at' => null,
]
);
}
}