From f9e4db4abfb29b8874b561bcc2d34514d09eb13c Mon Sep 17 00:00:00 2001 From: DanS Date: Thu, 2 Jul 2026 02:59:31 -0500 Subject: [PATCH] feat(settings): merge BACKUP & DATA into the WALLET card Move the Backup & Data button row (Import/Export key, Export all, Backup, Export CSV, and the full-node Download Bootstrap / Setup Wizard) into the WALLET card as a "Backup & Data" sub-section under the privacy toggles + Tools & Actions, and delete the standalone BACKUP & DATA card (its own glass panel + header). One fewer top-level card; all actions preserved. Full-node build clean; hygiene clean. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/ui/pages/settings_page.cpp | 43 +++++----------------------------- 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/src/ui/pages/settings_page.cpp b/src/ui/pages/settings_page.cpp index cbbe5e2..7fb4846 100644 --- a/src/ui/pages/settings_page.cpp +++ b/src/ui/pages/settings_page.cpp @@ -1366,45 +1366,14 @@ void RenderSettingsPage(App* app) { if (ImGui::IsItemHovered()) material::Tooltip("%s", TR("tt_clear_ztx")); } - ImGui::Dummy(ImVec2(0, bottomPad)); - ImGui::Unindent(pad); - - ImVec2 cardMax(cardMin.x + availWidth, ImGui::GetCursorScreenPos().y); - dl->ChannelsSetCurrent(0); - DrawGlassPanel(dl, cardMin, cardMax, glassSpec); - dl->ChannelsMerge(); - - ImGui::SetCursorScreenPos(ImVec2(cardMin.x, cardMax.y)); - ImGui::Dummy(ImVec2(availWidth, 0)); - } - - ImGui::Dummy(ImVec2(0, gap)); - - // ==================================================================== - // BACKUP & DATA — card - // ==================================================================== - { + // --- Backup & Data (merged in from its former standalone card) --- + ImGui::Dummy(ImVec2(0, Layout::spacingMd())); Type().textColored(TypeStyle::Overline, OnSurfaceMedium(), TR("backup_data")); ImGui::Dummy(ImVec2(0, Layout::spacingXs())); - - ImVec2 cardMin = ImGui::GetCursorScreenPos(); - dl->ChannelsSplit(2); - dl->ChannelsSetCurrent(1); - ImGui::SetCursorScreenPos(ImVec2(cardMin.x, cardMin.y + pad)); - ImGui::Indent(pad); - - float contentW = availWidth - pad * 2; - float btnPad = S.drawElement("components.settings-page", "wallet-btn-padding").sizeOr(24.0f); - { + float btnPad = S.drawElement("components.settings-page", "wallet-btn-padding").sizeOr(24.0f); const char* r1[] = {TR("settings_import_key"), TR("settings_export_key"), TR("settings_export_all"), TR("settings_backup"), TR("settings_export_csv")}; - const char* t1[] = { - TR("tt_import_key"), - TR("tt_export_key"), - TR("tt_export_all"), - TR("tt_backup"), - TR("tt_export_csv") - }; + const char* t1[] = { TR("tt_import_key"), TR("tt_export_key"), TR("tt_export_all"), TR("tt_backup"), TR("tt_export_csv") }; const bool showFullNodeLifecycleActions = app->supportsFullNodeLifecycleActions(); const char* wizLabel = TR("setup_wizard"); const char* bsLabel = TR("download_bootstrap"); @@ -1422,7 +1391,6 @@ void RenderSettingsPage(App* app) { float scale = (totalW > contentW) ? contentW / totalW : 1.0f; if (scale < 1.0f) ImGui::SetWindowFontScale(scale); - float scaledSp = sp * scale; if (TactileButton(r1[0], ImVec2(0, 0), btnFont)) @@ -1446,7 +1414,7 @@ void RenderSettingsPage(App* app) { if (ImGui::IsItemHovered()) material::Tooltip("%s", t1[4]); if (showFullNodeLifecycleActions) { - // Right-align Setup Wizard + Download Bootstrap + // Right-align Setup Wizard + Download Bootstrap. float framePadX2 = ImGui::GetStyle().FramePadding.x * 2.0f; float curX = ImGui::GetCursorScreenPos().x; float wizBtnW = ImGui::CalcTextSize(wizLabel).x + framePadX2; @@ -1486,6 +1454,7 @@ void RenderSettingsPage(App* app) { ImGui::Dummy(ImVec2(0, gap)); + // ==================================================================== // NODE & SECURITY — card // ====================================================================