mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-05 16:04:01 +00:00
Preserve Go and Zen OAuth routing while fixing authentication, secret redaction, streaming, transport, and configuration issues. Refresh README and management guides in four languages while preserving sponsors, LinuxDo acknowledgements, and Linux/Docker quick start instructions.
12 lines
452 B
JavaScript
12 lines
452 B
JavaScript
// Apply the theme before first paint while honoring the script-src policy.
|
|
// The theme module owns changes after the console starts.
|
|
(() => {
|
|
try {
|
|
const mode = localStorage.getItem("opencode2api.ui.theme") || "auto";
|
|
const dark =
|
|
mode === "dark" ||
|
|
(mode === "auto" && matchMedia("(prefers-color-scheme: dark)").matches);
|
|
document.documentElement.setAttribute("data-theme", dark ? "dark" : "light");
|
|
} catch (_) {}
|
|
})();
|