Display Module 13-05-2026
This commit is contained in:
parent
6a65354f4c
commit
9262132325
41 changed files with 496 additions and 334 deletions
61
app/Support/DisplayModuleSettings.php
Normal file
61
app/Support/DisplayModuleSettings.php
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?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',
|
||||
'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,
|
||||
'logo_url' => '../logo-cabinet-300.png',
|
||||
'brand_text' => 'Bielefeld',
|
||||
'footer_claim' => '',
|
||||
'footer_url' => '',
|
||||
'qr_default_title' => 'Kontakt',
|
||||
'qr_subtitle' => 'QR scannen',
|
||||
'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 ?? []);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue