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

This commit is contained in:
2026-06-25 00:36:14 +02:00
parent ac2d95fc56
commit 487f592ca3
12 changed files with 188 additions and 17 deletions

View File

@@ -49,6 +49,13 @@ if (payloadNode) {
const activeSkin = payload.meta.active_skin;
const skinProfile = payload.meta.skin_profile || {};
const settingsApi = payload.desktop.settings_api || '';
const shellApps = Array.isArray(payload.shell?.apps) ? payload.shell.apps : [];
const debugShellApp = (payload.shell && typeof payload.shell.debug_app === 'object' && payload.shell.debug_app)
|| shellApps.find((app) => app && app.app_id === 'desktop-debug')
|| null;
const debugShellAppId = typeof debugShellApp?.app_id === 'string' && debugShellApp.app_id !== ''
? debugShellApp.app_id
: 'desktop-debug';
let currentUserPreferences = payload.desktop.user_preferences || {};
const maximizeOverSystemBar = Boolean(skinProfile.maximize_over_system_bar);
const storageScope = payload.desktop.storage_scope || 'guest';
@@ -168,7 +175,9 @@ if (payloadNode) {
node.setAttribute('aria-expanded', String(debugState.open === true));
node.classList.toggle('is-active', debugState.open === true);
node.textContent = debugState.open === true ? 'Debug an' : 'Debug';
node.textContent = debugState.open === true
? `${String(debugShellApp?.label || 'Debug')} an`
: String(debugShellApp?.label || 'Debug');
});
};
@@ -571,13 +580,15 @@ if (payloadNode) {
const buildWindowBody = (definition) => {
if (definition.content_mode === 'desktop-debug') {
const debugCopy = escapeHtml(definition.ui?.copy || 'Live-Debug fuer Desktop und Native-Module. Tracking laeuft nur, solange dieses Fenster offen ist.');
const clearLabel = escapeHtml(definition.ui?.clear_label || 'Log leeren');
return `
<div class="window-content window-content--desktop-debug">
<div class="desktop-debug-window" data-debug-window="1">
<div class="desktop-debug-toolbar">
<p class="desktop-debug-copy">Live-Debug fuer Desktop und Native-Module. Tracking laeuft nur, solange dieses Fenster offen ist.</p>
<p class="desktop-debug-copy">${debugCopy}</p>
<div class="desktop-debug-actions">
<button class="window-app-button desktop-debug-action" type="button" data-debug-action="clear">Log leeren</button>
<button class="window-app-button desktop-debug-action" type="button" data-debug-action="clear">${clearLabel}</button>
</div>
</div>
<div class="desktop-debug-log" data-debug-log></div>
@@ -1020,7 +1031,7 @@ if (payloadNode) {
}
};
const findDebugWindow = () => Array.from(windows.values()).find((record) => record.definition.app_id === 'desktop-debug') || null;
const findDebugWindow = () => Array.from(windows.values()).find((record) => record.definition.app_id === debugShellAppId) || null;
const closeDebugWindow = () => {
const existing = findDebugWindow();
@@ -1050,17 +1061,19 @@ if (payloadNode) {
return;
}
const windowDefaults = debugShellApp && typeof debugShellApp.window === 'object' ? debugShellApp.window : {};
createWindow({
window_id: `window-desktop-debug-${Date.now()}`,
app_id: 'desktop-debug',
title: 'Desktop Debug',
x: 120,
y: 88,
width: 720,
height: 520,
content: '',
entry_route: '',
content_mode: 'desktop-debug',
window_id: `window-${debugShellAppId}-${Date.now()}`,
app_id: debugShellAppId,
title: String(debugShellApp?.title || 'Desktop Debug'),
x: Number(windowDefaults.x ?? 120),
y: Number(windowDefaults.y ?? 88),
width: Number(windowDefaults.width ?? 720),
height: Number(windowDefaults.height ?? 520),
content: String(debugShellApp?.content || ''),
entry_route: String(debugShellApp?.entry_route || ''),
content_mode: String(debugShellApp?.content_mode || 'desktop-debug'),
ui: debugShellApp && typeof debugShellApp.ui === 'object' ? debugShellApp.ui : {},
});
};
@@ -1153,7 +1166,7 @@ if (payloadNode) {
return;
}
if (record.definition.app_id === 'desktop-debug') {
if (record.definition.app_id === debugShellAppId) {
debugState.open = false;
saveDebugState();
debugBus.setEnabled(false);