asdasd
This commit is contained in:
@@ -10,6 +10,9 @@ $wallpaper = $desktopPayload['desktop']['wallpaper'];
|
||||
$debugShellApp = is_array($desktopPayload['shell']['debug_app'] ?? null) ? $desktopPayload['shell']['debug_app'] : null;
|
||||
$debugShellLabel = trim((string) ($debugShellApp['label'] ?? 'Debug')) ?: 'Debug';
|
||||
$sessionDisplayName = (string) ($desktopPayload['session']['display_name'] ?? 'Gast');
|
||||
$publicDesktopMode = (string) ($desktopPayload['desktop']['login']['mode'] ?? '') === 'public-desktop';
|
||||
$loginUrl = (string) ($desktopPayload['desktop']['login']['login_url'] ?? '');
|
||||
$loginAvailable = !empty($desktopPayload['desktop']['login']['login_available']) && $loginUrl !== '';
|
||||
|
||||
$assetVersion = static function (string $publicPath): string {
|
||||
$filesystemPath = dirname(__DIR__, 2) . '/public' . $publicPath;
|
||||
@@ -153,76 +156,91 @@ $renderTrayVisual = static function (array $trayItem, string $displayName = '')
|
||||
|
||||
<div class="window-layer" id="window-layer"></div>
|
||||
|
||||
<section class="start-menu" id="start-menu" hidden>
|
||||
<div class="start-menu-sidebar" id="start-menu-user-settings">
|
||||
<button class="start-menu-user-card" id="start-menu-user-card" type="button">
|
||||
<span class="start-menu-user-avatar" id="start-menu-user-avatar">GU</span>
|
||||
<span class="start-menu-user-copy">
|
||||
<strong id="start-menu-user-name"><?= htmlspecialchars((string) ($desktopPayload['session']['display_name'] ?? 'Gast'), ENT_QUOTES) ?></strong>
|
||||
<small>Benutzer</small>
|
||||
</span>
|
||||
</button>
|
||||
<div class="start-menu-function-list" id="start-menu-functions">
|
||||
<button class="start-menu-function is-active" type="button" data-function-id="programs">
|
||||
<span class="start-menu-function-icon" aria-hidden="true">📁</span>
|
||||
<span class="start-menu-function-copy">
|
||||
<strong>Programme</strong>
|
||||
<small>Installierte Apps</small>
|
||||
<?php if (!$publicDesktopMode): ?>
|
||||
<section class="start-menu" id="start-menu" hidden>
|
||||
<div class="start-menu-sidebar" id="start-menu-user-settings">
|
||||
<button class="start-menu-user-card" id="start-menu-user-card" type="button">
|
||||
<span class="start-menu-user-avatar" id="start-menu-user-avatar">GU</span>
|
||||
<span class="start-menu-user-copy">
|
||||
<strong id="start-menu-user-name"><?= htmlspecialchars((string) ($desktopPayload['session']['display_name'] ?? 'Gast'), ENT_QUOTES) ?></strong>
|
||||
<small>Benutzer</small>
|
||||
</span>
|
||||
</button>
|
||||
<div class="start-menu-function-list" id="start-menu-functions">
|
||||
<button class="start-menu-function is-active" type="button" data-function-id="programs">
|
||||
<span class="start-menu-function-icon" aria-hidden="true">📁</span>
|
||||
<span class="start-menu-function-copy">
|
||||
<strong>Programme</strong>
|
||||
<small>Installierte Apps</small>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<?php if (($desktopPayload['session']['authenticated'] ?? false) === true && !empty($desktopPayload['session']['logout_url'])): ?>
|
||||
<a class="start-menu-session-action is-logout" id="start-menu-session-action" href="<?= htmlspecialchars((string) $desktopPayload['session']['logout_url'], ENT_QUOTES) ?>">
|
||||
<span class="start-menu-session-icon" aria-hidden="true">⏻</span>
|
||||
<span>Abmelden</span>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<button class="start-menu-session-action" id="start-menu-session-action" type="button" data-session-action="login">
|
||||
<span class="start-menu-session-icon" aria-hidden="true">→</span>
|
||||
<span>Anmelden</span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if (($desktopPayload['session']['authenticated'] ?? false) === true && !empty($desktopPayload['session']['logout_url'])): ?>
|
||||
<a class="start-menu-session-action is-logout" id="start-menu-session-action" href="<?= htmlspecialchars((string) $desktopPayload['session']['logout_url'], ENT_QUOTES) ?>">
|
||||
<span class="start-menu-session-icon" aria-hidden="true">⏻</span>
|
||||
<span>Abmelden</span>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<button class="start-menu-session-action" id="start-menu-session-action" type="button" data-session-action="login">
|
||||
<span class="start-menu-session-icon" aria-hidden="true">→</span>
|
||||
<span>Anmelden</span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="start-menu-selection-area start-menu-selection-area--programs">
|
||||
<div class="start-menu-selection-header" id="start-menu-selection-header"></div>
|
||||
<div class="start-menu-selection-list" id="start-menu-apps"></div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="start-menu-selection-area start-menu-selection-area--programs">
|
||||
<div class="start-menu-selection-header" id="start-menu-selection-header"></div>
|
||||
<div class="start-menu-selection-list" id="start-menu-apps"></div>
|
||||
</div>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<footer class="taskbar">
|
||||
<button class="start-button" id="start-button" type="button">
|
||||
<span class="start-button-icon"><?= $renderStartIcon($skinProfile) ?></span>
|
||||
<span class="start-button-label"><?= htmlspecialchars((string) ($skinProfile['taskbar_label'] ?? 'Menu'), ENT_QUOTES) ?></span>
|
||||
</button>
|
||||
<div class="taskbar-apps" id="taskbar-apps"></div>
|
||||
<div class="tray">
|
||||
<?php foreach ($desktopPayload['tray'] as $trayItem): ?>
|
||||
<button
|
||||
class="tray-pill tray-pill-button<?= (($trayItem['id'] ?? '') === 'gitea-deploy-status') ? ' tray-pill-status tray-pill-status--idle' : '' ?><?= (($trayItem['id'] ?? '') === 'account') ? ' tray-pill-account' : '' ?>"
|
||||
type="button"
|
||||
data-tray-id="<?= htmlspecialchars((string) $trayItem['id'], ENT_QUOTES) ?>"
|
||||
<?php if (!empty($trayItem['app_id'])): ?>data-tray-app-id="<?= htmlspecialchars((string) $trayItem['app_id'], ENT_QUOTES) ?>" title="<?= htmlspecialchars((string) ($trayItem['title'] ?? $trayItem['label'] ?? ''), ENT_QUOTES) ?>"<?php endif; ?>
|
||||
<?php if (($trayItem['id'] ?? '') === 'account'): ?>title="<?= htmlspecialchars($sessionDisplayName, ENT_QUOTES) ?>"<?php elseif (empty($trayItem['app_id']) && !empty($trayItem['title'])): ?>title="<?= htmlspecialchars((string) $trayItem['title'], ENT_QUOTES) ?>"<?php endif; ?>
|
||||
><?= $renderTrayVisual($trayItem, $sessionDisplayName) ?></button>
|
||||
<?php endforeach; ?>
|
||||
<?php if (($desktopPayload['session']['is_admin'] ?? false) === true): ?>
|
||||
<button class="tray-pill tray-pill-button tray-pill-debug" id="debug-toggle" type="button" aria-expanded="false" title="<?= htmlspecialchars($debugShellLabel, ENT_QUOTES) ?>"><span class="tray-icon tray-icon--bug" aria-hidden="true"><svg viewBox="0 0 24 24" focusable="false"><path d="M9 7.5V6a3 3 0 0 1 6 0v1.5"></path><path d="M8 10.5h8a2 2 0 0 1 2 2V15a6 6 0 0 1-12 0v-2.5a2 2 0 0 1 2-2Z"></path><path d="M4 13h3M17 13h3M5.5 8.5l2 1.5M18.5 8.5l-2 1.5M7 18l-2 1.5M17 18l2 1.5"></path></svg></span><span class="sr-only"><?= htmlspecialchars($debugShellLabel, ENT_QUOTES) ?></span></button>
|
||||
<?php endif; ?>
|
||||
<time id="clock"></time>
|
||||
</div>
|
||||
<div class="tray-menu" id="tray-account-menu" hidden>
|
||||
<button class="tray-menu-entry" type="button" data-account-action="settings">Einstellungen</button>
|
||||
<?php if (($desktopPayload['session']['authenticated'] ?? false) === true && !empty($desktopPayload['session']['logout_url'])): ?>
|
||||
<a class="tray-menu-entry" data-account-action="logout" href="<?= htmlspecialchars((string) $desktopPayload['session']['logout_url'], ENT_QUOTES) ?>">Logout</a>
|
||||
<?php else: ?>
|
||||
<button class="tray-menu-entry" type="button" data-account-action="login">Login</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="tray-menu" id="tray-fx-menu" hidden>
|
||||
<p class="tray-menu-copy" id="tray-fx-status">Kursstatus wird geladen ...</p>
|
||||
<button class="tray-menu-entry" type="button" data-fx-action="refresh">Refresh</button>
|
||||
<button class="tray-menu-entry" type="button" data-fx-action="force-refresh">Force-Refresh</button>
|
||||
</div>
|
||||
<footer class="taskbar<?= $publicDesktopMode ? ' taskbar--public' : '' ?>">
|
||||
<?php if ($publicDesktopMode): ?>
|
||||
<div class="taskbar-public-spacer" aria-hidden="true"></div>
|
||||
<button
|
||||
class="public-login-tab"
|
||||
id="public-login-tab"
|
||||
type="button"
|
||||
<?= $loginAvailable ? 'data-login-url="' . htmlspecialchars($loginUrl, ENT_QUOTES) . '"' : 'disabled' ?>
|
||||
>
|
||||
<span class="public-login-tab-kicker">Desktop Login</span>
|
||||
<strong><?= $loginAvailable ? 'Anmelden' : 'Login nicht verfuegbar' ?></strong>
|
||||
</button>
|
||||
<?php else: ?>
|
||||
<button class="start-button" id="start-button" type="button">
|
||||
<span class="start-button-icon"><?= $renderStartIcon($skinProfile) ?></span>
|
||||
<span class="start-button-label"><?= htmlspecialchars((string) ($skinProfile['taskbar_label'] ?? 'Menu'), ENT_QUOTES) ?></span>
|
||||
</button>
|
||||
<div class="taskbar-apps" id="taskbar-apps"></div>
|
||||
<div class="tray">
|
||||
<?php foreach ($desktopPayload['tray'] as $trayItem): ?>
|
||||
<button
|
||||
class="tray-pill tray-pill-button<?= (($trayItem['id'] ?? '') === 'gitea-deploy-status') ? ' tray-pill-status tray-pill-status--idle' : '' ?><?= (($trayItem['id'] ?? '') === 'account') ? ' tray-pill-account' : '' ?>"
|
||||
type="button"
|
||||
data-tray-id="<?= htmlspecialchars((string) $trayItem['id'], ENT_QUOTES) ?>"
|
||||
<?php if (!empty($trayItem['app_id'])): ?>data-tray-app-id="<?= htmlspecialchars((string) $trayItem['app_id'], ENT_QUOTES) ?>" title="<?= htmlspecialchars((string) ($trayItem['title'] ?? $trayItem['label'] ?? ''), ENT_QUOTES) ?>"<?php endif; ?>
|
||||
<?php if (($trayItem['id'] ?? '') === 'account'): ?>title="<?= htmlspecialchars($sessionDisplayName, ENT_QUOTES) ?>"<?php elseif (empty($trayItem['app_id']) && !empty($trayItem['title'])): ?>title="<?= htmlspecialchars((string) $trayItem['title'], ENT_QUOTES) ?>"<?php endif; ?>
|
||||
><?= $renderTrayVisual($trayItem, $sessionDisplayName) ?></button>
|
||||
<?php endforeach; ?>
|
||||
<?php if (($desktopPayload['session']['is_admin'] ?? false) === true): ?>
|
||||
<button class="tray-pill tray-pill-button tray-pill-debug" id="debug-toggle" type="button" aria-expanded="false" title="<?= htmlspecialchars($debugShellLabel, ENT_QUOTES) ?>"><span class="tray-icon tray-icon--bug" aria-hidden="true"><svg viewBox="0 0 24 24" focusable="false"><path d="M9 7.5V6a3 3 0 0 1 6 0v1.5"></path><path d="M8 10.5h8a2 2 0 0 1 2 2V15a6 6 0 0 1-12 0v-2.5a2 2 0 0 1 2-2Z"></path><path d="M4 13h3M17 13h3M5.5 8.5l2 1.5M18.5 8.5l-2 1.5M7 18l-2 1.5M17 18l2 1.5"></path></svg></span><span class="sr-only"><?= htmlspecialchars($debugShellLabel, ENT_QUOTES) ?></span></button>
|
||||
<?php endif; ?>
|
||||
<time id="clock"></time>
|
||||
</div>
|
||||
<div class="tray-menu" id="tray-account-menu" hidden>
|
||||
<button class="tray-menu-entry" type="button" data-account-action="settings">Einstellungen</button>
|
||||
<?php if (($desktopPayload['session']['authenticated'] ?? false) === true && !empty($desktopPayload['session']['logout_url'])): ?>
|
||||
<a class="tray-menu-entry" data-account-action="logout" href="<?= htmlspecialchars((string) $desktopPayload['session']['logout_url'], ENT_QUOTES) ?>">Logout</a>
|
||||
<?php else: ?>
|
||||
<button class="tray-menu-entry" type="button" data-account-action="login">Login</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="tray-menu" id="tray-fx-menu" hidden>
|
||||
<p class="tray-menu-copy" id="tray-fx-status">Kursstatus wird geladen ...</p>
|
||||
<button class="tray-menu-entry" type="button" data-fx-action="refresh">Refresh</button>
|
||||
<button class="tray-menu-entry" type="button" data-fx-action="force-refresh">Force-Refresh</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</footer>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user