summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src/theme/context.tsx
diff options
context:
space:
mode:
authorAdam <[email protected]>2026-03-08 19:28:58 -0500
committerGitHub <[email protected]>2026-03-08 19:28:58 -0500
commitb976f339e857be3fae20f179992aa82fbea24f08 (patch)
tree14655402aef6b5ba8e0c0c5c13797a3984319e6c /packages/ui/src/theme/context.tsx
parent7d7837e5b6eb0fc88d202936b726ab890f4add53 (diff)
downloadopencode-b976f339e857be3fae20f179992aa82fbea24f08.tar.gz
opencode-b976f339e857be3fae20f179992aa82fbea24f08.zip
feat(app): generate color palettes (#16232)
Diffstat (limited to 'packages/ui/src/theme/context.tsx')
-rw-r--r--packages/ui/src/theme/context.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/ui/src/theme/context.tsx b/packages/ui/src/theme/context.tsx
index c1c1637d6..600c6121c 100644
--- a/packages/ui/src/theme/context.tsx
+++ b/packages/ui/src/theme/context.tsx
@@ -35,7 +35,7 @@ function applyThemeCss(theme: DesktopTheme, themeId: string, mode: "light" | "da
const tokens = resolveThemeVariant(variant, isDark)
const css = themeToCss(tokens)
- if (themeId !== "oc-1") {
+ if (themeId !== "oc-2") {
try {
localStorage.setItem(isDark ? STORAGE_KEYS.THEME_CSS_DARK : STORAGE_KEYS.THEME_CSS_LIGHT, css)
} catch {}
@@ -54,7 +54,7 @@ function applyThemeCss(theme: DesktopTheme, themeId: string, mode: "light" | "da
}
function cacheThemeVariants(theme: DesktopTheme, themeId: string) {
- if (themeId === "oc-1") return
+ if (themeId === "oc-2") return
for (const mode of ["light", "dark"] as const) {
const isDark = mode === "dark"
const variant = isDark ? theme.dark : theme.light
@@ -71,7 +71,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
init: (props: { defaultTheme?: string }) => {
const [store, setStore] = createStore({
themes: DEFAULT_THEMES as Record<string, DesktopTheme>,
- themeId: props.defaultTheme ?? "oc-1",
+ themeId: props.defaultTheme ?? "oc-2",
colorScheme: "system" as ColorScheme,
mode: getSystemMode(),
previewThemeId: null as string | null,