diff --git a/src/backend/controllers/static/StaticPagesController.ts b/src/backend/controllers/static/StaticPagesController.ts index 929e00f8e..29b6df6d5 100644 --- a/src/backend/controllers/static/StaticPagesController.ts +++ b/src/backend/controllers/static/StaticPagesController.ts @@ -36,12 +36,109 @@ import { promoteToVerifiedGroup } from '../../util/userProvisioning.js'; */ export class StaticPagesController extends PuterController { registerRoutes(router: PuterRouter) { - const wrap = (inner: string) => - `
${inner}`; + const origin = this.config.origin ?? ''; + const docsOrigin = (() => { + const d = this.config.domain; + return d ? `https://docs.${d}` : ''; + })(); + + const page = ( + icon: string, + title: string, + msg: string, + color: string, + ) => ` + + + + + +${msg}
+${msg}
`); - const ok = (msg: string) => - wrap(`${msg}
`); + page('✕', 'Something went wrong', msg, '#e53e3e'); + const ok = (msg: string) => page('✓', 'Success', msg, '#38a169'); // ── /robots.txt ───────────────────────────────────────────── router.get('/robots.txt', {}, (req, res) => {