CMMS embedding: follow the CMMS light/dark theme
Some checks failed
Test Build / Node v26 (push) Has been cancelled
Test Build / Node v24 (push) Has been cancelled
Test Build / Node v22 (push) Has been cancelled

window.CMMS_SCAD_CONFIG.dark (set by edit.php from theme_is_dark()) now
drives: the primereact theme (runtime <link> to a bundled
primereact-theme-{light,dark}.css instead of a static light import), the
Monaco editor theme (vs-dark / light), and a body.cmms-dark class that
overrides the light-hardcoded bits in public/index.html. Standalone use
is unchanged (light).
This commit is contained in:
AI Assistant 2026-08-31 11:36:54 +10:00
commit 0e80cde156
5 changed files with 14174 additions and 1 deletions

View file

@ -118,6 +118,15 @@
}
.github-fork-ribbon:before { background-color: #333; }
/* CMMS embedding hook (patch): when loaded dark inside the CMMS, the
body gets .cmms-dark (src/index.tsx). Override the light-hardcoded
bits above; the primereact theme and Monaco theme are switched
separately. */
body.cmms-dark { background-color: #1e1e1e; color: #e6e6e6; }
body.cmms-dark .p-fieldset-legend { background-color: rgba(0,0,0,0.4) !important; }
body.cmms-dark .monaco-editor,
body.cmms-dark .openscad-editor { background-color: rgba(30,30,30,0.5) !important; }
</style>
</head>
<body>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff