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) <noreply@anthropic.com>
This commit is contained in:
@@ -1366,45 +1366,14 @@ void RenderSettingsPage(App* app) {
|
|||||||
if (ImGui::IsItemHovered()) material::Tooltip("%s", TR("tt_clear_ztx"));
|
if (ImGui::IsItemHovered()) material::Tooltip("%s", TR("tt_clear_ztx"));
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::Dummy(ImVec2(0, bottomPad));
|
// --- Backup & Data (merged in from its former standalone card) ---
|
||||||
ImGui::Unindent(pad);
|
ImGui::Dummy(ImVec2(0, Layout::spacingMd()));
|
||||||
|
|
||||||
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
|
|
||||||
// ====================================================================
|
|
||||||
{
|
|
||||||
Type().textColored(TypeStyle::Overline, OnSurfaceMedium(), TR("backup_data"));
|
Type().textColored(TypeStyle::Overline, OnSurfaceMedium(), TR("backup_data"));
|
||||||
ImGui::Dummy(ImVec2(0, Layout::spacingXs()));
|
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* r1[] = {TR("settings_import_key"), TR("settings_export_key"), TR("settings_export_all"), TR("settings_backup"), TR("settings_export_csv")};
|
||||||
const char* t1[] = {
|
const char* t1[] = { TR("tt_import_key"), TR("tt_export_key"), TR("tt_export_all"), TR("tt_backup"), TR("tt_export_csv") };
|
||||||
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 bool showFullNodeLifecycleActions = app->supportsFullNodeLifecycleActions();
|
||||||
const char* wizLabel = TR("setup_wizard");
|
const char* wizLabel = TR("setup_wizard");
|
||||||
const char* bsLabel = TR("download_bootstrap");
|
const char* bsLabel = TR("download_bootstrap");
|
||||||
@@ -1422,7 +1391,6 @@ void RenderSettingsPage(App* app) {
|
|||||||
|
|
||||||
float scale = (totalW > contentW) ? contentW / totalW : 1.0f;
|
float scale = (totalW > contentW) ? contentW / totalW : 1.0f;
|
||||||
if (scale < 1.0f) ImGui::SetWindowFontScale(scale);
|
if (scale < 1.0f) ImGui::SetWindowFontScale(scale);
|
||||||
|
|
||||||
float scaledSp = sp * scale;
|
float scaledSp = sp * scale;
|
||||||
|
|
||||||
if (TactileButton(r1[0], ImVec2(0, 0), btnFont))
|
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 (ImGui::IsItemHovered()) material::Tooltip("%s", t1[4]);
|
||||||
|
|
||||||
if (showFullNodeLifecycleActions) {
|
if (showFullNodeLifecycleActions) {
|
||||||
// Right-align Setup Wizard + Download Bootstrap
|
// Right-align Setup Wizard + Download Bootstrap.
|
||||||
float framePadX2 = ImGui::GetStyle().FramePadding.x * 2.0f;
|
float framePadX2 = ImGui::GetStyle().FramePadding.x * 2.0f;
|
||||||
float curX = ImGui::GetCursorScreenPos().x;
|
float curX = ImGui::GetCursorScreenPos().x;
|
||||||
float wizBtnW = ImGui::CalcTextSize(wizLabel).x + framePadX2;
|
float wizBtnW = ImGui::CalcTextSize(wizLabel).x + framePadX2;
|
||||||
@@ -1486,6 +1454,7 @@ void RenderSettingsPage(App* app) {
|
|||||||
|
|
||||||
ImGui::Dummy(ImVec2(0, gap));
|
ImGui::Dummy(ImVec2(0, gap));
|
||||||
|
|
||||||
|
|
||||||
// ====================================================================
|
// ====================================================================
|
||||||
// NODE & SECURITY — card
|
// NODE & SECURITY — card
|
||||||
// ====================================================================
|
// ====================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user