Oberfläche Mitarbeiter-App umschaltbar (0.52.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 14m38s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 14m13s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 11m56s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 11m44s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 56m9s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 1h2m6s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 10m30s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 47s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m16s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 9m13s

Einstellung interface (classic|app) im Erscheinungsbild; data-ui am Wurzelelement,
warme Tokens, Karten mit Schatten, Menüpunkte als Pillen; Startseite dreispaltig.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-29 19:17:23 +00:00
parent d79c6284e1
commit 38f47f98e2
145 changed files with 656 additions and 379 deletions

View file

@ -106,6 +106,12 @@ class Branding
return $covers !== [] ? $covers[array_rand($covers)] : ($theme['profile_cover'] ?? null);
}
/** Oberfläche: classic oder app (Mitarbeiter-App) */
public function interface(): string
{
return ($this->active()['interface'] ?? 'classic') === 'app' ? 'app' : 'classic';
}
public function url(?string $path): ?string
{
return $path ? Storage::disk('uploads')->url($path) : null;
@ -184,6 +190,7 @@ class Branding
'header_style' => $theme['header_style'],
'nav_style' => $theme['nav_style'] ?? 'bar',
'page_header' => $theme['page_header'] ?? 'band',
'interface' => $theme['interface'] ?? 'classic',
'color_mode' => $this->forcedColorMode(),
'login' => [
'layout' => $theme['login_layout'],

View file

@ -25,6 +25,8 @@ class Theme
'header_style' => 'light',
'nav_style' => 'bar',
'page_header' => 'band',
// Oberfläche: classic (Portal mit Menüleiste und Kacheln) oder app (Mitarbeiter-App: Feed, warme Flächen)
'interface' => 'classic',
'font_body' => 'inter',
'font_heading' => 'same',
'custom_font' => null,
@ -60,6 +62,18 @@ class Theme
'bold' => 'Kräftiger Titel mit Akzentstrich',
];
/** Grundsätzliche Oberfläche – gilt für alle, die Administration legt sie fest */
public const INTERFACES = [
'classic' => 'Klassisch – Menüleiste, Startseite mit Kacheln',
'app' => 'Mitarbeiter-App – Neuigkeiten und Menschen im Mittelpunkt, warme Flächen, runde Formen',
];
/** Schrift und Rundung, die zur Oberfläche passen – beim Umschalten übernommen, solange unverändert */
public const INTERFACE_PRESETS = [
'classic' => ['font_body' => 'inter', 'radius' => 'medium'],
'app' => ['font_body' => 'figtree', 'radius' => 'round'],
];
public const RADII = ['none' => ['Eckig', '0rem'], 'small' => ['Leicht gerundet', '0.25rem'], 'medium' => ['Gerundet', '0.5rem'], 'large' => ['Stark gerundet', '0.75rem'], 'round' => ['Rund', '1rem']];
public const DENSITIES = ['compact' => ['Kompakt', '0.225rem'], 'normal' => ['Normal', '0.25rem'], 'comfortable' => ['Luftig', '0.275rem']];
@ -120,7 +134,18 @@ class Theme
*/
public function saveDraft(array $values): void
{
$theme = self::normalize([...$this->working(), ...$values]);
$before = $this->working();
$theme = self::normalize([...$before, ...$values]);
// Oberfläche umgeschaltet: passende Schrift und Rundung mitnehmen – aber nur, wo noch
// die Voreinstellung der bisherigen Oberfläche steht (eigene Wahl bleibt erhalten)
if ($theme['interface'] !== $before['interface']) {
foreach (self::INTERFACE_PRESETS[$theme['interface']] as $key => $value) {
if ($theme[$key] === self::INTERFACE_PRESETS[$before['interface']][$key]) {
$theme[$key] = $value;
}
}
}
// Alle Bildfelder – jedes könnte eine SVG-Datei sein
foreach (['logo_light', 'logo_dark', 'logo_mark', 'app_icon', 'login_image', 'profile_cover', 'avatar_placeholder'] as $image) {
@ -194,6 +219,7 @@ class Theme
$theme['header_style'] = array_key_exists($theme['header_style'], self::HEADER_STYLES) ? $theme['header_style'] : 'light';
$theme['nav_style'] = array_key_exists((string) ($theme['nav_style'] ?? ''), self::NAV_STYLES) ? $theme['nav_style'] : 'bar';
$theme['page_header'] = array_key_exists((string) ($theme['page_header'] ?? ''), self::PAGE_HEADERS) ? $theme['page_header'] : 'band';
$theme['interface'] = array_key_exists((string) ($theme['interface'] ?? ''), self::INTERFACES) ? $theme['interface'] : 'classic';
$theme['font_body'] = array_key_exists($theme['font_body'], Fonts::FONTS) || ($theme['font_body'] === 'custom' && $theme['custom_font']) ? $theme['font_body'] : 'inter';
$theme['font_heading'] = $theme['font_heading'] === 'same' || array_key_exists($theme['font_heading'], Fonts::FONTS) || ($theme['font_heading'] === 'custom' && $theme['custom_font']) ? $theme['font_heading'] : 'same';
$theme['radius'] = array_key_exists($theme['radius'], self::RADII) ? $theme['radius'] : 'medium';