Commit Graph

11 Commits

Author SHA1 Message Date
hailin dcc46c37b6 fix(mining-app): 价格有效数字从6位调整为7位,最后2位每分钟可见变化
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 20:12:15 -08:00
hailin f5d25afab8 fix(mining-app): 价格显示有效数字从3位增加到6位
每分钟销毁引起的价格变化约 4.66e-12(第7位有效数字),
原来只显示3位有效数字 0.0{5}979 无法观察到变化。
改为6位后 0.0{5}979941,最后一位每1-2分钟变化一次,
用户可在兑换页面实时观察到销毁带来的价格上涨。

影响范围:formatPrice、K线图Y轴/十字线、交易记录、挖矿记录

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 20:09:32 -08:00
hailin c24f383501 fix(trading): K线Y轴动态缩放 + 价格显示格式统一 + 首日涨幅修复
- K线图Y轴改为只基于可见K线计算范围,实现动态缩放(类似TradingView)
- 价格显示统一使用 0.0{n}xxx 格式替代科学计数法,覆盖全局 formatPrice、
  K线图、交易记录页、挖矿记录页
- 修复"较上线首日"百分比始终显示 +0.00% 的问题:getFirstSnapshot 过滤
  price=0 的早期快照

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 18:36:26 -08:00
hailin 99c1ff1fb7 fix(kline): convert time to local timezone for display
- Added toLocal() conversion in _formatTimeLabel (painter)
- Added toLocal() conversion in _formatDateTime (widget)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:55:56 -08:00
hailin 900ba4a555 feat(kline): add dynamic X-axis time labels
- Added _drawTimeAxis method to render time labels
- Labels dynamically adjust spacing based on candleWidth
- Shows HH:MM format, or M/D for midnight
- Labels follow pan/zoom movements
- Increased bottomPadding to 20px for label space

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:51:23 -08:00
hailin f55fb13f26 feat(kline): implement true pan effect with scrollOffset
- Added scrollOffset parameter to KlinePainter and KlineVolumePainter
- Painters now draw all klines and apply scrollOffset for positioning
- Added canvas clipping to prevent drawing outside chart bounds
- Removed _getVisibleData and related helper methods (no longer needed)
- scrollOffset directly controls the visual position of all klines

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:43:45 -08:00
hailin f51aa44cd9 feat(frontend): K线图组件支持深色模式
- kline_chart_widget.dart: 使用 AppColors 动态颜色,传递 isDark 参数
- kline_painter.dart: 添加 isDark 参数,网格/文字/十字线颜色随主题变化
- kline_volume_painter.dart: 添加 isDark 参数,成交量图颜色随主题变化

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 19:42:52 -08:00
hailin 2154d5752f fix: 修复K线图NaN错误并添加mining-service划转端点
- 修复K线图当价格范围为0时导致的NaN Offset错误
- 在mining-service添加transfer-out和transfer-in端点
- 划转操作会在mining_transactions表中记录明细

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 07:12:32 -08:00
hailin d5e5bf642c fix(kline-chart): prevent overflow in indicator selector and legend
- Wrap indicator selector Row in SingleChildScrollView for horizontal scrolling
- Add maxX boundary checks in _drawLegend to stop drawing when exceeding available space
- Prevents text overflow on narrow screens or when displaying many indicators

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 09:55:49 -08:00
hailin 27bf67e561 fix(kline-chart): improve pinch-to-zoom and fullscreen display
- Refactor to pixel-based scrolling system for smoother interaction
- Fix pinch-to-zoom to properly scale around focal point
- Adjust fullscreen layout to give more space to main chart (65%)
- Add candleWidth parameter to all painters for consistent rendering
- Detect multi-touch gestures using pointerCount

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 09:49:14 -08:00
hailin 20a90fce4c feat(mining-app): add professional kline chart with technical indicators
- Add KlineChartWidget with pinch-to-zoom, fullscreen mode
- Implement MA, EMA, BOLL indicators for main chart
- Implement MACD, KDJ, RSI indicators for sub chart
- Add volume display with crossline info
- Add C2C trading feature with market/publish/detail pages
- Add P2P transfer functionality (send/receive shares)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:51:00 -08:00