From df00e977d44f94e750d400c7a725a7a3de593d19 Mon Sep 17 00:00:00 2001 From: Saravana Achu Mac Date: Tue, 5 May 2026 22:18:42 -0700 Subject: [PATCH] refactor(web): normalize global config theme surface --- docs/UX_THEME_NORMALIZATION_HANDOFF.md | 2 +- web/src/components/GlobalConfigManager.tsx | 46 ++++++++++++---------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/docs/UX_THEME_NORMALIZATION_HANDOFF.md b/docs/UX_THEME_NORMALIZATION_HANDOFF.md index eedd99d..1e97be4 100644 --- a/docs/UX_THEME_NORMALIZATION_HANDOFF.md +++ b/docs/UX_THEME_NORMALIZATION_HANDOFF.md @@ -98,7 +98,7 @@ Current public bundle: - [x] Normalize `web/src/components/TradeProfileManager.tsx` - [x] Normalize `web/src/components/StrategyWizard.tsx` - [x] Normalize `web/src/tabs/ReconciliationAuditPanel.tsx` -- [ ] Normalize `web/src/components/GlobalConfigManager.tsx` +- [x] Normalize `web/src/components/GlobalConfigManager.tsx` - [ ] Normalize `web/src/components/EntryForm.tsx` - [ ] Normalize remaining old admin/config surfaces - [ ] Remove remaining dark-only bespoke surface systems diff --git a/web/src/components/GlobalConfigManager.tsx b/web/src/components/GlobalConfigManager.tsx index 3e9e2b0..a539c9a 100644 --- a/web/src/components/GlobalConfigManager.tsx +++ b/web/src/components/GlobalConfigManager.tsx @@ -1,6 +1,9 @@ import React from 'react'; -import { Save, AlertCircle, CheckCircle } from 'lucide-react'; +import { Save, AlertCircle, CheckCircle, Globe2 } from 'lucide-react'; import { fetchDynamicConfigItems, upsertDynamicConfigItems } from '../lib/dynamicConfigApi'; +import { Button } from './ui/button'; +import { Card } from './ui/card'; +import { Input } from './ui/input'; interface ConfigItem { key: string; @@ -46,16 +49,17 @@ export const GlobalConfigManager = () => { setSaving(false); }; - if (loading) return
Loading system configuration...
; + if (loading) return
Loading system configuration...
; return ( -
-

- 🌍 Global Bot Configuration + +

+ + Global Bot Configuration

{message && ( -
{message.type === 'success' ? : } {message.text} @@ -64,40 +68,42 @@ export const GlobalConfigManager = () => {
{configs.map((config) => ( -
+
- - +
- handleChange(config.key, e.target.value)} - className="bg-black/40 border border-white/10 rounded px-3 py-2 text-sm text-gray-200 focus:outline-none focus:border-orange-500/50" + className="h-10 rounded px-3 py-2 text-sm" /> -

{config.description || 'System setting used by the trading core.'}

+

{config.description || 'System setting used by the trading core.'}

))} {configs.length === 0 && ( -
-

No dynamic configuration entries found.

-

The bot is currently using .env defaults.

+
+

No dynamic configuration entries found.

+

The bot is currently using .env defaults.

)}
-
-

+

+

Note: Changes to global variables usually require a bot restart to take full effect (e.g. changing intervals or providers). Symbols may update dynamically depending on strategy implementation.

-
+ ); };