Item 11: a "Presets" button (top-right) opens a dialog to save the current
table view -- column arrangement + visibility, sort, and all active filters --
as a named profile, load a saved one, or delete it. The built-in "Default"
profile is always the first preset and shows IP, Model, Hashrate, Power, Chip
temp, Firmware, Control board, PIC and Status; the app now boots with it.
- New presets.rs: a serde-serialized PresetView snapshot of ViewState (Vec-based
so the JSON has no enum map keys), Preset { name, view }, and load/save to
~/.config/alkane-toolkit/presets.json. "Default" is re-seeded on load and not
written, so it can't be lost or deleted. A loaded preset missing newer columns
still covers every column (they're appended hidden).
- serde/serde_json added to alkane-gui (already vendored + locked via asic-rs);
Column/ColFilter/TextOp/NumOp derive Serialize/Deserialize and ViewState is
now Clone.
- ui.rs: build_presets_dialog + apply_preset_load/save/delete, wired to the new
Presets button.
Unit tests: default-preset round-trips through ViewState and JSON.
cargo check --release --tests is clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
22 lines
560 B
TOML
22 lines
560 B
TOML
[package]
|
|
name = "alkane-gui"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[[bin]]
|
|
name = "alkane-toolkit"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
alkane-core = { path = "../alkane-core" }
|
|
alkane-discovery = { path = "../alkane-discovery" }
|
|
# vendored + patched wx-rs (see vendor/wx-rs/patches/)
|
|
wx-rs = { path = "../../thirdparty/wx-rs/wx-rs-0.2.0-patched" }
|
|
asic-rs = "0.8.1"
|
|
measurements = "0.11"
|
|
tokio = { version = "1", features = ["rt"] }
|
|
futures-util = "0.3"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|