New desktop
Some checks failed
Deploy / deploy-staging (push) Failing after 6s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-06-06 03:20:50 +02:00
parent 756b4e119b
commit 888981c782
127 changed files with 31275 additions and 0 deletions

51
src/App/App.php Normal file
View File

@@ -0,0 +1,51 @@
<?php
declare(strict_types=1);
namespace App;
use Desktop\AppRegistry;
use Desktop\DesktopState;
use Desktop\SkinResolver;
use Desktop\WindowManager;
final class App
{
public function __construct(
private readonly string $projectRoot,
) {
}
/**
* @return array<string, mixed>
*/
public function desktopPayload(): array
{
$registry = new AppRegistry($this->projectRoot . '/config/apps.php');
$skins = SkinResolver::all();
$activeSkin = SkinResolver::resolve($_GET['skin'] ?? null);
$windows = (new WindowManager($registry))->defaultWindows();
return [
'meta' => [
'title' => 'Kusche.Berlin Desktop UI',
'active_skin' => $activeSkin,
'available_skins' => $skins,
],
'desktop' => [
'greeting' => 'Neue Desktop-Shell fuer Kusche.Berlin',
'wallpaper' => SkinResolver::wallpaper($activeSkin),
'workspace' => DesktopState::defaultWorkspace(),
'login' => [
'authenticated' => false,
'mode' => 'public-home',
'keycloak_theme_handoff' => '/docs/keycloak-theme-handoff.md',
],
],
'apps' => $registry->all(),
'windows' => $windows,
'widgets' => DesktopState::defaultWidgets(),
'tray' => DesktopState::trayItems(),
];
}
}