adasd
All checks were successful
Deploy / deploy-staging (push) Successful in 7s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-06-07 00:51:49 +02:00
parent 08c0edc68b
commit e1d16d818d
8 changed files with 724 additions and 39 deletions

View File

@@ -7,6 +7,7 @@ namespace App;
use Desktop\AppRegistry;
use Desktop\DesktopState;
use Desktop\SkinResolver;
use Desktop\WidgetRegistry;
use Desktop\WindowManager;
final class App
@@ -22,9 +23,11 @@ final class App
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);
$windows = (new WindowManager($registry))->defaultWindows();
$activeWidgetIds = DesktopState::defaultWidgetIds();
return [
'meta' => [
@@ -44,8 +47,15 @@ final class App
],
'apps' => $registry->all(),
'windows' => $windows,
'widgets' => DesktopState::defaultWidgets(),
'widgets' => [
'active' => $widgetRegistry->active($activeWidgetIds),
'registry' => $widgetRegistry->all(),
'active_ids' => $activeWidgetIds,
],
'tray' => DesktopState::trayItems(),
'menu' => [
'quick_actions' => DesktopState::quickActions(),
],
];
}
}