feat: donut allocation chart + History/Allocation tabs on Crypto tab

Merges the separate history chart and allocation cards into one
CryptoOverviewCard with History/Allocation tab pills, matching CoinMarketCap's
layout — switching views instead of stacking two cards keeps the tab's
footprint on the page instead of doubling it. The total value, eye toggle,
and change-over-range line stay in the shared header regardless of which
tab is active.

Allocation is now a donut (Recharts Pie, innerRadius 68%, paddingAngle gap
between segments per the dataviz skill's mark spec) instead of a plain bar.
Unlike CoinMarketCap's own version, the list next to it shows both percent
and the $ amount per coin, per explicit request — CMC's reference only
shows percent.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01855PiW5Wd8n4aRW4n9kByY
This commit is contained in:
ZProger
2026-08-30 04:47:13 +03:00
parent 5f34d0a612
commit 7a23ed1ff8
7 changed files with 338 additions and 250 deletions

View File

@@ -150,6 +150,8 @@ const ru = {
"crypto.chart.show": "Показать сумму",
"crypto.chart.hide": "Скрыть сумму",
"crypto.allocation.title": "Распределение по монетам",
"crypto.overview.history": "История",
"crypto.overview.allocation": "Аллокация",
"crypto.allocation.other": "Другое",
"crypto.stats.allTimeProfit": "Прибыль за всё время",
"crypto.stats.costBasis": "Вложено всего",
@@ -609,6 +611,8 @@ const en: Record<keyof typeof ru, string> = {
"crypto.chart.show": "Show amount",
"crypto.chart.hide": "Hide amount",
"crypto.allocation.title": "Allocation by coin",
"crypto.overview.history": "History",
"crypto.overview.allocation": "Allocation",
"crypto.allocation.other": "Other",
"crypto.stats.allTimeProfit": "All-time profit",
"crypto.stats.costBasis": "Total invested",