feat: revamp dashboard, trades, and add landing/legal pages

- Major UI updates across dashboard, analytics, posts, trades, settings
- New landing page, robots/sitemap, contact/privacy/terms pages
- Updated globals.css with extensive styling and new landing.css
- Refactor signedRequest, realtime data hook, and dashboard store

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
k
2026-04-25 16:04:57 +08:00
parent 83e5892ddf
commit 040e1df685
28 changed files with 4133 additions and 690 deletions
+10 -1
View File
@@ -6,6 +6,7 @@ interface DashboardState {
timeframe: '5m' | '15m' | '1H' | '4H' | '1D' | '1W'
walletAddress: string | null
isSubscribed: boolean
botReadiness: 'unknown' | 'saved' | 'verified' | 'ready'
hlApiKeySet: boolean // true if user already has a key saved in backend
hlApiKeyMasked: string | null // e.g. "...a1b2c3" shown after successful save
livePrices: { BTC: number | null; ETH: number | null }
@@ -14,6 +15,7 @@ interface DashboardState {
setTimeframe: (tf: '5m' | '15m' | '1H' | '4H' | '1D' | '1W') => void
setWallet: (address: string | null) => void
setSubscribed: (subscribed: boolean) => void
setBotReadiness: (state: DashboardState['botReadiness']) => void
setHlApiKeySet: (set: boolean, masked?: string) => void
setLivePrice: (asset: 'BTC' | 'ETH', price: number) => void
}
@@ -24,6 +26,7 @@ export const useDashboardStore = create<DashboardState>((set) => ({
timeframe: '4H',
walletAddress: null,
isSubscribed: false,
botReadiness: 'unknown',
hlApiKeySet: false,
hlApiKeyMasked: null,
livePrices: { BTC: null, ETH: null },
@@ -32,8 +35,14 @@ export const useDashboardStore = create<DashboardState>((set) => ({
setTimeframe: (timeframe) => set({ timeframe }),
setWallet: (walletAddress) => set({ walletAddress }),
setSubscribed: (isSubscribed) => set({ isSubscribed }),
setBotReadiness: (botReadiness) => set({ botReadiness }),
setHlApiKeySet: (keySet, masked) =>
set({ hlApiKeySet: keySet, hlApiKeyMasked: masked ?? null }),
set((s) => ({
hlApiKeySet: keySet,
// Preserve existing mask when called without one (e.g. the /public poll
// only returns a boolean). Only explicitly clear when keySet=false.
hlApiKeyMasked: !keySet ? null : (masked !== undefined ? masked : s.hlApiKeyMasked),
})),
setLivePrice: (asset, price) =>
set((s) => ({ livePrices: { ...s.livePrices, [asset]: price } })),
}))