feat(market): trend sparkline in all portfolio styles + inline chart/style pickers

Render the portfolio trend sparkline in every row style, each with a layout that features it:
- Table: a dedicated header-labelled TREND column (48dp rows), aligned across rows.
- Cards: a left-aligned info stack (icon + label / value+delta chip / DRGX) with a full-height sparkline filling the rest of the width (content-driven, so short groups give the chart more room).
- Spotlight: a big-value-over-a-full-width-chart-band hero tile (92dp).
Default sparkline interval is now MONTH (a real curve from the daily series, not the young minute buffer). Removed the per-row container accent line (redundant with the icon/sparkline colour) and the per-group shielded/transparent bar (private-by-default makes it near-always 100%, and dropped its now-dead SumPortfolioSplit helper). DPI-scale the sparkline stroke. Adds the "Trend" column string across 9 languages.

Relocated the Market controls out of a removed settings modal + gear: the chart line/candle picker now sits top-right of the chart (left of the trade button, candle-capable ranges only), and the Table/Cards/Spotlight picker sits left of Manage. Dropped the market fetch-prices toggle (still in the general Settings page).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-18 13:39:42 -05:00
parent e4c9b98ca2
commit 973bc0d338
13 changed files with 142 additions and 227 deletions

View File

@@ -31,19 +31,6 @@ inline double SumPortfolioBalance(const std::vector<std::string>& entryAddresses
return sum;
}
// Shielded/transparent breakdown of an entry's balance (for the per-group Z/T split bar). Pure.
struct PortfolioSplit { double shielded = 0.0; double transparent = 0.0; };
inline PortfolioSplit SumPortfolioSplit(const std::vector<std::string>& entryAddresses,
const std::vector<AddressInfo>& walletAddresses)
{
PortfolioSplit s;
if (entryAddresses.empty()) return s;
std::unordered_set<std::string> want(entryAddresses.begin(), entryAddresses.end());
for (const auto& a : walletAddresses)
if (want.count(a.address)) { if (a.isShielded()) s.shielded += a.balance; else s.transparent += a.balance; }
return s;
}
// Whether `address` is part of the entry's address group.
inline bool PortfolioEntryContains(const std::vector<std::string>& entryAddresses,
const std::string& address)