feat(macro-vibes): rename BTC Signal → Macro Vibes; add MacroPanel UI

Module rename across page H1, navbar tab, URL (/en/btc → /en/macro),
all metadata/JSON-LD, sitemap, llms.txt, opengraph image, and SystemControl
copy. Old /btc route fully removed.

New components/btc/MacroPanel.tsx polls /api/macro/snapshot and lays out
the 8 indicators in four sections (Valuation / Bottom trigger reference /
Market structure / Sentiment & flows / Positioning) with tone-coloured
values, current-band threshold chips, and a single CoinGlass / source
chart link per card. Composite -100..+100 needle pulses on score change.

Also fixes the pinned bottom-reversal alert on the homepage, which still
linked to the now-404 /en/btc — now routes to /en/macro.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
k
2026-05-26 01:05:18 +08:00
parent d72323b1c6
commit f34ae9eb00
33 changed files with 1810 additions and 228 deletions
+32 -17
View File
@@ -26,7 +26,7 @@ import { confirmSign } from '@/components/wallet/SignConfirmSheet'
const SYS = {
trump: { idx: '①', name: 'Trump', accent: '#b45309', soft: 'rgba(180,83,9,0.08)' },
btc: { idx: '②', name: 'BTC', accent: '#16a34a', soft: 'rgba(22,163,74,0.08)' },
btc: { idx: '②', name: 'Macro Vibes', accent: '#16a34a', soft: 'rgba(22,163,74,0.08)' },
} as const
const ROW: React.CSSProperties = {
@@ -122,22 +122,37 @@ export default function SystemControl({ system }: { system: 'trump' | 'btc' }) {
} finally { setBusy(false) }
}
if (!mounted) {
return (
<div className="card" style={{ padding: 16, marginBottom: 16, fontSize: 13, color: 'var(--ink-3)' }}>
{isZh
? `连接右上角的钱包后,才能操作 ${s.name} 模块。`
: `Connect a wallet (top-right) to operate the ${s.name} system.`}
</div>
)
}
// SSR / pre-hydration: render nothing to avoid hydration mismatch with
// wagmi state that resolves client-side.
if (!mounted) return null
// Wallet not connected: a previous version showed a giant full-width
// "Connect a wallet..." card here, which was redundant with the navbar's
// Connect button. The opposite extreme — rendering null — silently hid
// the existence of Auto-Trade for unconnected users. Compromise: a SLIM
// inline strip that simply announces the feature without pushing the
// page around. Once connected, the full control panel renders below.
if (!isConnected) {
return (
<div className="card" style={{ padding: 16, marginBottom: 16, fontSize: 13, color: 'var(--ink-3)' }}>
{isZh
? `连接右上角的钱包后,才能操作 ${s.name} 模块。`
: `Connect a wallet (top-right) to operate the ${s.name} system.`}
<div style={{
display: 'flex', alignItems: 'center', gap: 10, flexWrap: 'wrap',
padding: '10px 14px', marginBottom: 16,
background: 'var(--bg-sunk)',
border: '1px dashed var(--line)',
borderRadius: 8,
fontSize: 12, color: 'var(--ink-3)',
}}>
<span style={{
width: 6, height: 6, borderRadius: '50%',
background: 'var(--ink-4)', flexShrink: 0,
}} />
<span style={{ color: 'var(--ink-2)', fontWeight: 600 }}>
{s.name} Auto-Trade
</span>
<span>·</span>
<span style={{ color: 'var(--ink-4)' }}>
OFF connect wallet (top-right) to enable
</span>
</div>
)
}
@@ -156,7 +171,7 @@ export default function SystemControl({ system }: { system: 'trump' | 'btc' }) {
} else if (!autoOn) {
netMsg = isZh
? 'Auto-Trade 当前为关闭(全局): Trump 和 BTC 信号仍会显示,但不会自动开仓。'
: 'Auto-Trade is OFF (global) — Trump AND BTC signals are shown in the feed but NOT traded.'
: 'Auto-Trade is OFF (global) — Trump AND Macro Vibes signals are shown in the feed but NOT traded.'
} else {
netOk = true
netMsg = isZh
@@ -210,8 +225,8 @@ export default function SystemControl({ system }: { system: 'trump' | 'btc' }) {
<>
<strong>One switch for both systems.</strong> OFF: signals scanned
&amp; shown in the feed, nothing traded. ON: a qualifying Trump OR
BTC signal auto-opens a trade. Stop-loss / staged de-risk always
protect open positions either way.
Macro Vibes signal auto-opens a trade. Stop-loss / staged de-risk
always protect open positions either way.
</>
)}
</div>