Files
CoHaiSe-CLOUD/frontend/public/theme.js
T
Gitea ActionsandEsiah 4d725d9a3b
CD — Deployment / deploy (push) Successful in 23s
ci(deploy): back up before migrating and run migrations explicitly (#9)
- dump the database to ./backups before applying migrations
- run the one-shot migrate service on every deploy instead of relying only on
  the api depends_on, so a migration is never skipped
- translate the workflow comments to English

---------

Co-authored-by: xEsiah <[email protected]>
Reviewed-on: #9
Reviewed-by: Esiah <[email protected]>
Co-authored-by: Gitea Actions <-[email protected]>
2026-10-17 12:34:56 +00:00

12 lines
416 B
JavaScript

(function () {
try {
var stored = localStorage.getItem("cohaise-theme");
var theme = stored === "light" || stored === "dark" ? stored : "system";
var prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
var dark = theme === "dark" || (theme === "system" && prefersDark);
document.documentElement.classList.toggle("dark", dark);
} catch (error) {
void error;
}
})();