*/ public function desktopPayload(): array { $registry = new AppRegistry($this->projectRoot . '/config/apps.php'); $widgetRegistry = new WidgetRegistry($this->projectRoot . '/config/widgets.php'); $skins = SkinResolver::all(); $activeSkin = SkinResolver::resolve($_GET['skin'] ?? null); $apps = AppIconResolver::decorate($registry->all(), $activeSkin); $windows = (new WindowManager($registry))->defaultWindows(); $activeWidgetIds = DesktopState::defaultWidgetIds(); return [ 'meta' => [ 'title' => 'Kusche.Berlin Desktop UI', 'active_skin' => $activeSkin, 'available_skins' => $skins, 'base_skin_profile' => SkinResolver::profile('base'), 'skin_profile' => SkinResolver::profile($activeSkin), ], 'desktop' => [ 'greeting' => 'Neue Desktop-Shell fuer Kusche.Berlin', 'wallpaper' => SkinResolver::wallpaper($activeSkin), 'storage_scope' => 'guest', 'workspace' => DesktopState::defaultWorkspace(), 'login' => [ 'authenticated' => false, 'mode' => 'public-home', 'keycloak_theme_handoff' => '/docs/keycloak-theme-handoff.md', ], ], 'apps' => $apps, 'windows' => $windows, 'widgets' => [ 'active' => $widgetRegistry->active($activeWidgetIds), 'registry' => $widgetRegistry->all(), 'active_ids' => $activeWidgetIds, ], 'tray' => DesktopState::trayItems(), 'menu' => [ 'quick_actions' => DesktopState::quickActions(), ], ]; } }