feat(mining): left pool card (Manual/Auto, metrics, scrollable pool list)

Split the pool-mode hashrate card into a 25%-width left card + 75% chart so the
Manual/Auto toggle and pool metrics no longer reflow the tab:
- left card: Manual|Auto toggle (with tooltips), a Local/Pool/Shares/Uptime
  metric stack, and a fixed-height scrolling pool list — rows click-to-select in
  Manual (reusing the existing save+restart path) and show a "mining here" dot in
  Auto. Fixed height keeps the card constant as pools are added.
- mode-toggle row: keep the suggested-pools dropdown + auto-mode URL disable;
  the toggle and pool list moved into the card.
- mining_controls: show the installed/running miner version ("Current: …")
  before and during mining instead of "none".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-01 14:35:33 -05:00
parent 5c490c8d53
commit 1a00ec3359
5 changed files with 532 additions and 261 deletions

View File

@@ -9,16 +9,20 @@
#include "imgui.h"
namespace dragonx {
class App;
namespace ui {
// Renders the mining "Hashrate + Stats" card (stat values on top, hashrate chart or live log
// below). Extracted verbatim from the monolithic mining tab; the immediate-mode layout context is
// passed in so the rendering flows in sequence exactly as before. `poolMode` is the parent's
// solo/pool toggle.
// Renders the mining "Hashrate + Stats" card. In SOLO mode this is a full-width card (stat values
// on top, hashrate chart or live log below). In POOL mode it splits into a left card (Manual/Auto
// toggle + pool metric stack + a fixed-height scrolling pool list) and a right region (chart or
// log) — so toggling Manual/Auto or adding pools never reflows the tab. `poolMode` is the parent's
// solo/pool toggle; `s_pool_url` / `s_pool_settings_dirty` are the parent's pool-selection buffer
// and dirty flag (a pool-row click writes them, reusing the parent's save+restart path).
void RenderMiningStats(const WalletState& state, const MiningInfo& mining,
ImDrawList* dl, ImFont* capFont, ImFont* sub1, ImFont* ovFont,
float dp, float vs, float gap, float pad, float availWidth,
const material::GlassPanelSpec& glassSpec, float chartBudgetH, bool poolMode);
const material::GlassPanelSpec& glassSpec, float chartBudgetH, bool poolMode,
App* app, char (&s_pool_url)[256], bool& s_pool_settings_dirty);
} // namespace ui
} // namespace dragonx