- Mediathek: Video-Vorschaubilder statt Icons (FFmpeg-Thumbnails + Backfill-Command), Kategorie "Sonstiges" - B2in Media-Picker zeigt alle Medientypen, Typ wird automatisch erkannt; Thumbnail-Preview vor allen Medien-URL-Feldern - B2in Marke/Footer: Footer ein/aus, Logo+Claim frei positionierbar (Ecken) mit Constraints, separate Anzeige-Schalter - Angebote-Modul dynamisch: kein Slide-Typ mehr, einheitliches Detail-Layout mit ein-/ausblendbaren Bloecken, Logo/Brand pro Slide, Streichpreis-Option - Player: leere Module stoppen Endlosschleife, dynamische Layout-Anpassung bei verstecktem Footer/Header - Fix: Script-Ladereihenfolge (Livewire vor Flux), entfernte stale public/flux/flux.js, Modal-Crash beim Aktualisieren behoben Co-authored-by: Cursor <cursoragent@cursor.com>
60 lines
1.9 KiB
PHP
60 lines
1.9 KiB
PHP
<?php
|
|
|
|
namespace App\Support;
|
|
|
|
use App\Enums\DisplayVersionType;
|
|
|
|
class DisplayModuleSettings
|
|
{
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public static function defaults(DisplayVersionType|string $type): array
|
|
{
|
|
$typeValue = $type instanceof DisplayVersionType ? $type->value : $type;
|
|
|
|
return match ($typeValue) {
|
|
DisplayVersionType::VideoDisplay->value => [
|
|
'qr_label' => 'Website',
|
|
],
|
|
DisplayVersionType::B2in->value => [
|
|
'theme' => 'dark',
|
|
'header_logo_url' => '../assets/b2in-logo-positive.svg',
|
|
'header_claim' => 'Connecting Design & Property',
|
|
'logo_position' => 'top-left',
|
|
'claim_position' => 'top-right',
|
|
'show_logo' => true,
|
|
'show_claim' => true,
|
|
'show_footer' => true,
|
|
'footer_url' => 'B2in.eu',
|
|
'footer_name' => '',
|
|
'footer_prefix' => 'by',
|
|
'qr_url' => '',
|
|
'transition' => [
|
|
'type' => 'crossfade',
|
|
'duration_ms' => 800,
|
|
],
|
|
'default_image_duration' => 10,
|
|
'rotation_weights' => ['immobilien' => 70, 'moebel' => 30],
|
|
'display_active' => true,
|
|
],
|
|
DisplayVersionType::Offers->value => [
|
|
'loop' => true,
|
|
'transition' => [
|
|
'type' => 'fade',
|
|
'duration' => 600,
|
|
],
|
|
],
|
|
default => [],
|
|
};
|
|
}
|
|
|
|
/**
|
|
* @param array<string, mixed>|null $settings
|
|
* @return array<string, mixed>
|
|
*/
|
|
public static function merge(DisplayVersionType|string $type, ?array $settings): array
|
|
{
|
|
return array_replace_recursive(self::defaults($type), $settings ?? []);
|
|
}
|
|
}
|