Changeset 0.37.14 (#226)
Co-authored-by: gobha <jasafpro@gmail.com> Co-committed-by: gobha <jasafpro@gmail.com>
This commit is contained in:
@@ -593,32 +593,12 @@
|
||||
});
|
||||
}
|
||||
|
||||
// ── Custom surface (v0.30.2) ──────────
|
||||
// ── Custom surface (v0.37.14: legacy registry removed) ──────────
|
||||
if (SURFACE_PKG_ID) {
|
||||
(async function() {
|
||||
var mount = document.getElementById('customSurfaceMount');
|
||||
if (!mount) return;
|
||||
mount.innerHTML = '<div style="padding:24px;text-align:center;color:var(--text-3)">Loading surface\u2026</div>';
|
||||
try {
|
||||
// Load workflow-surfaces registry + dependencies
|
||||
await loadScript(BASE + '/js/ui-primitives.js');
|
||||
await loadScript(BASE + '/js/workflow-surfaces.js');
|
||||
// Load the package's surface JS (registers via WorkflowSurfaces.register())
|
||||
await loadScript(BASE + '/surfaces/' + SURFACE_PKG_ID + '/js/main.js');
|
||||
// Mount the custom surface
|
||||
var ctx = { channelId: CHAN_ID, sessionId: SESSION_ID, basePath: BASE,
|
||||
stageMode: STAGE_MODE, formTemplate: FORM_TPL,
|
||||
totalStages: TOTAL_STAGES, currentStage: CURRENT_STAGE };
|
||||
mount.innerHTML = '';
|
||||
if (typeof WorkflowSurfaces !== 'undefined') {
|
||||
WorkflowSurfaces.mount(mount, SURFACE_PKG_ID, ctx);
|
||||
} else {
|
||||
mount.innerHTML = '<div style="padding:24px;color:var(--danger)">Failed to load surface registry.</div>';
|
||||
}
|
||||
} catch(e) {
|
||||
mount.innerHTML = '<div style="padding:24px;color:var(--danger)">Failed to load surface: ' + escHtml(e.message) + '</div>';
|
||||
}
|
||||
})();
|
||||
var mount = document.getElementById('customSurfaceMount');
|
||||
if (mount) {
|
||||
mount.innerHTML = '<div style="padding:24px;color:var(--danger)">Custom workflow surfaces require an updated package format. The legacy surface registry has been removed.</div>';
|
||||
}
|
||||
}
|
||||
|
||||
function loadScript(src) {
|
||||
|
||||
Reference in New Issue
Block a user