feat(market): square grid cells (2x1 min), preserve grid on edit, sparkline interval
- Grid cells are now square (cellH = cellW); column count is responsive with a 2-column minimum, and a group's minimum size is 2x1 cells. New groups default to 2x1; drag/resize/auto-place all enforce the 2-wide minimum. - Fix: editing a group no longer resets its grid placement/size. The editor's Save now starts from the existing entry and only overwrites the form fields, so grid_col/row/w/h (and anything else off-form) are preserved. - Add a per-group sparkline interval (Minute/Hour/Day/Week/Month) next to the Sparkline toggle. The price history (~1 sample/min) is resampled by averaging each interval's worth of minute-samples into one point. PortfolioEntry gains sparklineInterval and defaults gridW=2. Persisted in settings.json. Full-node + Lite build clean; ctest 1/1; hygiene clean. Note: the app only accumulates in-session minute samples, so Hour/Day/Month show points only once enough data has been collected; true long-range history (instant day/month charts) would need a CoinGecko market_chart fetch, which can be added separately. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -90,11 +90,12 @@ public:
|
||||
bool showValue = true; // show the converted/fiat value on the card
|
||||
bool show24h = false; // show the 24h % change (live-market bases only)
|
||||
bool showSparkline = false; // show a price-trend sparkline (live-market bases only)
|
||||
// Dashboard grid placement on the Market portfolio. col/row in grid cells (-1 = auto-place),
|
||||
// w/h in cells (span). Set when the user drags/resizes a card.
|
||||
int sparklineInterval = 0; // 0=minute 1=hour 2=day 3=week 4=month (resample of price history)
|
||||
// Dashboard grid placement on the Market portfolio. col/row in square grid cells
|
||||
// (-1 = auto-place), w/h in cells (span; minimum 2x1). Set when the user drags/resizes.
|
||||
int gridCol = -1;
|
||||
int gridRow = -1;
|
||||
int gridW = 1;
|
||||
int gridW = 2;
|
||||
int gridH = 1;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user