nomadro/app/vip/theme-init.ts
eric 56b29205e7 Integrate four verticals into nomadro portal with shared packages and API gateway.
Mount /vip with nomadvip+payjsapi, add @nomadro/pay|pb|sdk, apps/api, /admin shell, and backup/rollback scripts under git.nomadro.cn workflow.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 20:16:44 -05:00

11 lines
395 B
TypeScript

/**
* 主题初始化 - 在 React 水合前执行,避免主题闪烁
*/
export const themeInitScript = `
(function() {
var theme = localStorage.getItem('nomadvip-theme');
var resolved = theme === 'light' ? 'light' : (theme === 'dark' ? 'dark' : (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'));
document.documentElement.classList.add(resolved);
})();
`;