feat(diagnostics): add "Copy diagnostics" + "Open log folder" actions (Foundation QoL)
Settings (logging section) gains two support-friendly actions, now that the logging foundation actually produces logs (W7-2): - Open log folder: opens the config dir (Platform::openFolder) so users can find dragonx-debug.log / dragonx-crash.log. - Copy diagnostics: copies a plaintext support snapshot to the clipboard via the new App::buildDiagnosticsReport() — version, build variant, platform, connection status, active wallet path + existence + size, encryption/lock state, sync heights, and (full- node) daemon status/running/crash-count/lastError, plus the log paths. No secrets. Build-clean; ctest 1/1. Remaining QoL: persistent alert history, a daemon/RPC error banner, and the W6-2 refresh-staleness badge. See docs/wallet-hardening.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1351,6 +1351,21 @@ void RenderSettingsPage(App* app) {
|
||||
if (ImGui::IsItemHovered()) material::Tooltip("%s", TR("tt_verbose"));
|
||||
}
|
||||
|
||||
// W7 QoL: quick diagnostics actions — open the log folder, and copy a plaintext support bundle
|
||||
// (version, variant, daemon/RPC/wallet/log state) to the clipboard.
|
||||
{
|
||||
const float diagBtnW = (contentW - Layout::spacingMd()) * 0.5f;
|
||||
if (TactileButton(TR("settings_open_log_folder"), ImVec2(diagBtnW, 0), S.resolveFont("button")))
|
||||
dragonx::util::Platform::openFolder(dragonx::util::Platform::getObsidianDragonDir());
|
||||
if (ImGui::IsItemHovered()) material::Tooltip("%s", TR("tt_open_log_folder"));
|
||||
ImGui::SameLine(0, Layout::spacingMd());
|
||||
if (TactileButton(TR("settings_copy_diagnostics"), ImVec2(diagBtnW, 0), S.resolveFont("button"))) {
|
||||
ImGui::SetClipboardText(app->buildDiagnosticsReport().c_str());
|
||||
ui::Notifications::instance().info(TR("settings_diagnostics_copied"), 4.0f);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) material::Tooltip("%s", TR("tt_copy_diagnostics"));
|
||||
}
|
||||
|
||||
ImGui::Dummy(ImVec2(0, Layout::spacingSm()));
|
||||
|
||||
// --- Collapsible: Tools & Actions... ---
|
||||
|
||||
Reference in New Issue
Block a user