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

This commit is contained in:
2026-06-09 01:22:55 +02:00
parent 84e76bff6c
commit 94c985b118
13 changed files with 1213 additions and 4 deletions

View File

@@ -388,6 +388,20 @@ h1 {
line-height: 1.5;
}
.window-content--embedded {
flex: 1;
padding: 0;
overflow: hidden;
}
.window-app-frame {
display: block;
width: 100%;
height: 100%;
border: 0;
background: #ffffff;
}
.taskbar {
position: fixed;
left: var(--taskbar-left);

View File

@@ -107,6 +107,26 @@ if (payloadNode) {
`;
};
const buildWindowBody = (definition) => {
if (definition.content_mode === 'iframe' && typeof definition.entry_route === 'string' && definition.entry_route !== '') {
const title = escapeHtml(definition.title);
const src = escapeHtml(definition.entry_route);
return `
<div class="window-content window-content--embedded">
<iframe class="window-app-frame" src="${src}" title="${title}" loading="lazy"></iframe>
</div>
`;
}
return `
<div class="window-content">
<p>${escapeHtml(definition.content)}</p>
<p><strong>Route:</strong> ${escapeHtml(definition.app_id)}</p>
</div>
`;
};
const loadWindowState = () => {
try {
const raw = window.localStorage.getItem(storageKey);
@@ -463,10 +483,7 @@ if (payloadNode) {
node.dataset.windowControls = windowControlsMode;
node.innerHTML = `
${buildWindowHeader(definition)}
<div class="window-content">
<p>${escapeHtml(definition.content)}</p>
<p><strong>Route:</strong> ${escapeHtml(definition.app_id)}</p>
</div>
${buildWindowBody(definition)}
<div class="window-resize-handle" data-edge="top" aria-hidden="true"></div>
<div class="window-resize-handle" data-edge="right" aria-hidden="true"></div>
<div class="window-resize-handle" data-edge="bottom" aria-hidden="true"></div>
@@ -564,6 +581,8 @@ if (payloadNode) {
width: app.default_width || 640,
height: app.default_height || 420,
content: app.summary || '',
entry_route: app.entry_route || '',
content_mode: app.content_mode || 'summary',
});
};