Refine admin PWA dark theme controls
This commit is contained in:
@@ -110,8 +110,8 @@ export function useAdminTheme() {
|
||||
// Muted/Subtle should NOT use theme.muted (which is a background color in Tamagui standard)
|
||||
// Instead, we derive them from Text with opacity or use specific palette values if available
|
||||
// But safer is Alpha since it works in both Light (Dark Text) and Dark (Light Text) modes.
|
||||
const muted = withAlpha(text, 0.65);
|
||||
const subtle = withAlpha(text, 0.45);
|
||||
const muted = resolveThemeValue((theme as any).colorMuted?.val, withAlpha(text, 0.65));
|
||||
const subtle = resolveThemeValue((theme as any).colorSubtle?.val, withAlpha(text, 0.45));
|
||||
const surfaceMuted = resolveThemeValue(theme.muted?.val, isDark ? '#121F3D' : ADMIN_COLORS.surfaceMuted);
|
||||
|
||||
const glassSurface = withAlpha(surface, isDark ? 0.90 : 0.85);
|
||||
@@ -122,6 +122,7 @@ export function useAdminTheme() {
|
||||
|
||||
return {
|
||||
theme,
|
||||
isDark,
|
||||
background,
|
||||
surface,
|
||||
surfaceMuted,
|
||||
@@ -134,7 +135,7 @@ export function useAdminTheme() {
|
||||
subtle, // Now properly derived from text color
|
||||
primary,
|
||||
accent: resolveThemeValue(theme.accent?.val, ADMIN_COLORS.accent),
|
||||
accentSoft: resolveThemeValue(theme.blue3?.val, ADMIN_COLORS.accentSoft),
|
||||
accentSoft: resolveThemeValue((theme as any).accentSoft?.val ?? theme.blue3?.val, ADMIN_COLORS.accentSoft),
|
||||
accentStrong: resolveThemeValue(theme.blue11?.val, ADMIN_COLORS.primaryStrong),
|
||||
successBg: resolveThemeValue(theme.backgroundStrong?.val, '#DCFCE7'),
|
||||
successText: resolveThemeValue(theme.green10?.val, ADMIN_COLORS.success),
|
||||
|
||||
Reference in New Issue
Block a user