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

This commit is contained in:
2026-06-09 02:24:17 +02:00
parent e68bab8a0f
commit afbb0a13f0
5 changed files with 137 additions and 27 deletions

View File

@@ -410,6 +410,22 @@ h1 {
background: #ffffff;
}
.window-content--module {
position: relative;
background: #f8fafc;
}
.window-module-host {
position: absolute;
inset: 0;
overflow: auto;
}
.window-module-error {
padding: 18px;
color: #991b1b;
}
.window-embed-fallback {
position: absolute;
inset: auto 16px 16px 16px;

View File

@@ -108,6 +108,14 @@ if (payloadNode) {
};
const buildWindowBody = (definition) => {
if (definition.content_mode === 'native-module' && definition.app_id === 'mining-checker') {
return `
<div class="window-content window-content--embedded window-content--module">
<div class="window-module-host" data-module-app="mining-checker"></div>
</div>
`;
}
if (definition.content_mode === 'iframe' && typeof definition.entry_route === 'string' && definition.entry_route !== '') {
const title = escapeHtml(definition.title);
const src = escapeHtml(definition.entry_route);
@@ -544,6 +552,22 @@ if (payloadNode) {
}, { once: true });
}
const moduleHost = node.querySelector('.window-module-host');
if (moduleHost && definition.content_mode === 'native-module' && definition.app_id === 'mining-checker') {
const moduleOptions = definition.module_options || {};
if (typeof window.initMiningCheckerApp === 'function') {
window.initMiningCheckerApp(moduleHost, {
apiBase: '/api/mining-checker/index.php/v1',
defaultProjectKey: moduleOptions.default_project_key || 'doge-main',
activeView: moduleOptions.active_view || 'overview',
sections: Array.isArray(moduleOptions.sections) ? moduleOptions.sections : [],
moduleDebugEnabled: false,
});
} else {
moduleHost.innerHTML = '<div class="window-module-error">Mining-Checker Assets konnten nicht initialisiert werden.</div>';
}
}
node.querySelectorAll('.window-action').forEach((action) => {
action.addEventListener('click', (event) => {
event.stopPropagation();
@@ -595,6 +619,7 @@ if (payloadNode) {
content: app.summary || '',
entry_route: app.entry_route || '',
content_mode: app.content_mode || 'summary',
module_options: app.module_options || null,
});
};