From f49c7c244abb29447540ed07ef76399825275ef2 Mon Sep 17 00:00:00 2001 From: Local Dev Date: Sun, 20 Sep 2026 15:56:29 +0200 Subject: [PATCH] fix(studio): imported dark pages no longer render on white; language picker in the toolbar Pages such as potidaea.asm put their background on and leave transparent; the editor's base stylesheet paints white, so the imported page showed light text on white. The canvas body now stays transparent, which also matches the exported page. The gateway's public name route sends Access-Control-Allow-Origin so Studio on sirius.x can fetch a page's stylesheets and inline them instead of falling back to links; the route only serves public content. The language picker had no toolbar to attach to in Studio and floated over the blocks panel; pages can now mark a slot for it and Studio does. --- src/gateway/public-gateway.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gateway/public-gateway.mjs b/src/gateway/public-gateway.mjs index ac9f3bf..d3db881 100644 --- a/src/gateway/public-gateway.mjs +++ b/src/gateway/public-gateway.mjs @@ -360,6 +360,9 @@ function proxyToUrl(upstreamUrl, reqPath) { // Sia-per-subdomain owners: if they omit `ip` from the parent, the fallback // still tries `s3` first as before. async function serve(res, name, reqPath, baseHref) { + // Public content: let pages on other origins (sirius.x, theseus.x) read a + // name's files with fetch(), e.g. Sirius Studio inlining a stylesheet. + res.setHeader("access-control-allow-origin", "*"); let entry; try { entry = await resolve(name); } catch (e) { res.writeHead(502); return res.end("resolve error: " + e.message); } if (!entry) { res.writeHead(404, { "content-type": "text/html" }); return res.end(nx(name)); }