Skip to content

Commit 6d9a768

Browse files
authored
Merge pull request #920 from wandooadzer-cmyk/wave-5
work implementation
2 parents 1c8f012 + b0783cc commit 6d9a768

3 files changed

Lines changed: 558 additions & 5 deletions

File tree

Stellar-Dex-Chat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 1c8f012d30578e44fd91ef6ac0a7324f73c5339f

dex_with_fiat_frontend/src/app/admin/page.tsx

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,37 @@ function useChartColors() {
7777
const updateColors = () => {
7878
const root = document.documentElement;
7979
const computedStyle = getComputedStyle(root);
80+
const currentTheme = root.getAttribute('data-theme') || 'light';
81+
82+
// Theme-aware fallback colors
83+
const fallbackColors = currentTheme === 'dark'
84+
? {
85+
primary: '#3b82f6',
86+
textMuted: '#94a3b8',
87+
border: '#334155',
88+
surface: '#0f172a',
89+
surfaceBorder: '#334155',
90+
}
91+
: {
92+
primary: '#3b82f6',
93+
textMuted: '#6b7280',
94+
border: '#e5e7eb',
95+
surface: '#ffffff',
96+
surfaceBorder: '#e5e7eb',
97+
};
8098

8199
setColors({
82100
primary:
83-
computedStyle.getPropertyValue('--color-primary').trim() || '#3b82f6',
101+
computedStyle.getPropertyValue('--color-primary').trim() || fallbackColors.primary,
84102
textMuted:
85103
computedStyle.getPropertyValue('--color-text-muted').trim() ||
86-
'#9ca3af',
104+
fallbackColors.textMuted,
87105
border:
88-
computedStyle.getPropertyValue('--color-border').trim() || '#374151',
106+
computedStyle.getPropertyValue('--color-border').trim() || fallbackColors.border,
89107
surface:
90-
computedStyle.getPropertyValue('--color-surface').trim() || '#1f2937',
108+
computedStyle.getPropertyValue('--color-surface').trim() || fallbackColors.surface,
91109
surfaceBorder:
92-
computedStyle.getPropertyValue('--color-border').trim() || '#374151',
110+
computedStyle.getPropertyValue('--color-border').trim() || fallbackColors.surfaceBorder,
93111
});
94112
};
95113

0 commit comments

Comments
 (0)