adasd
This commit is contained in:
@@ -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(),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user