feat(settings): converge the lite Node section styling with full-node
Step 4. Bring the Lite settings section in line with the full-node one: its subsection headers (Backup & keys, Security, Maintenance) switch from the Body2 type style to the accent Overline used by the full-node Node/Daemon/Security subsections, and the standalone action buttons (Open data folder, Show seed, Show private keys, Redownload blocks) become icon ActionButtons matching the full-node button styling. The intricate secret-reveal / encryption flow and its label-column input layout are left untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1764,7 +1764,7 @@ void RenderSettingsPage(App* app) {
|
||||
// NOT the full-node getDragonXDataDir().
|
||||
ImGui::Dummy(ImVec2(0, Layout::spacingSm()));
|
||||
ImGui::SetCursorScreenPos(ImVec2(leftX, ImGui::GetCursorScreenPos().y));
|
||||
if (TactileButton(TR("settings_open_data_dir"), ImVec2(0, 0), S.resolveFont("button"))) {
|
||||
if (material::ActionButton("##liteopendir", TR("settings_open_data_dir"), ICON_MD_FOLDER_OPEN, material::ActionTier::Secondary)) {
|
||||
util::Platform::openFolder(util::Platform::getLiteWalletDataDir());
|
||||
}
|
||||
if (ImGui::IsItemHovered()) material::Tooltip("%s", TR("tt_open_data_dir"));
|
||||
@@ -1773,10 +1773,10 @@ void RenderSettingsPage(App* app) {
|
||||
if (app->liteWallet() && app->liteWallet()->walletOpen()) {
|
||||
ImGui::Dummy(ImVec2(0, Layout::spacingSm()));
|
||||
ImGui::SetCursorScreenPos(ImVec2(leftX, ImGui::GetCursorScreenPos().y));
|
||||
Type().text(TypeStyle::Body2, TR("lite_backup_keys"));
|
||||
Type().textColored(TypeStyle::Overline, OnSurfaceMedium(), TR("lite_backup_keys"));
|
||||
|
||||
ImGui::SetCursorScreenPos(ImVec2(leftX, ImGui::GetCursorScreenPos().y));
|
||||
if (TactileButton(TrId("lite_show_seed", "LiteExportSeed").c_str(), ImVec2(0, 0), S.resolveFont("button"))) {
|
||||
if (material::ActionButton("##LiteExportSeed", TR("lite_show_seed"), ICON_MD_VPN_KEY, material::ActionTier::Secondary)) {
|
||||
auto r = app->liteWallet()->exportSeed();
|
||||
wallet::secureWipeLiteSecret(s_settingsState.lite_export_secret);
|
||||
if (r.ok) {
|
||||
@@ -1793,7 +1793,7 @@ void RenderSettingsPage(App* app) {
|
||||
wallet::secureWipeLiteSecret(r.seedPhrase); // wipe the result copy
|
||||
}
|
||||
ImGui::SameLine(0, Layout::spacingSm());
|
||||
if (TactileButton(TrId("lite_show_private_keys", "LiteExportKeys").c_str(), ImVec2(0, 0), S.resolveFont("button"))) {
|
||||
if (material::ActionButton("##LiteExportKeys", TR("lite_show_private_keys"), ICON_MD_KEY, material::ActionTier::Secondary)) {
|
||||
auto r = app->liteWallet()->exportPrivateKeys();
|
||||
wallet::secureWipeLiteSecret(s_settingsState.lite_export_secret);
|
||||
s_settingsState.lite_export_is_seed = false; // keys, not a seed
|
||||
@@ -1884,7 +1884,7 @@ void RenderSettingsPage(App* app) {
|
||||
// ---- Security: passphrase encryption (encrypt / unlock / lock / decrypt) ----
|
||||
ImGui::Dummy(ImVec2(0, Layout::spacingSm()));
|
||||
ImGui::SetCursorScreenPos(ImVec2(leftX, ImGui::GetCursorScreenPos().y));
|
||||
Type().text(TypeStyle::Body2, TR("lite_security"));
|
||||
Type().textColored(TypeStyle::Overline, OnSurfaceMedium(), TR("lite_security"));
|
||||
const auto& wstate = app->getWalletState();
|
||||
const float encLabelX = leftX - sectionOrigin.x + liteLabelW;
|
||||
if (!wstate.isEncrypted()) {
|
||||
@@ -1947,12 +1947,12 @@ void RenderSettingsPage(App* app) {
|
||||
// ---- Maintenance: re-download blocks from the lite server ----
|
||||
ImGui::Dummy(ImVec2(0, Layout::spacingSm()));
|
||||
ImGui::SetCursorScreenPos(ImVec2(leftX, ImGui::GetCursorScreenPos().y));
|
||||
Type().text(TypeStyle::Body2, TR("lite_maintenance"));
|
||||
Type().textColored(TypeStyle::Overline, OnSurfaceMedium(), TR("lite_maintenance"));
|
||||
|
||||
const bool scanning = app->liteWallet()->scanInProgress();
|
||||
ImGui::SetCursorScreenPos(ImVec2(leftX, ImGui::GetCursorScreenPos().y));
|
||||
ImGui::BeginDisabled(scanning);
|
||||
if (TactileButton(TR("lite_redownload_blocks"), ImVec2(0, 0), S.resolveFont("button"))) {
|
||||
if (material::ActionButton("##literedl", TR("lite_redownload_blocks"), ICON_MD_CLOUD_DOWNLOAD, material::ActionTier::Secondary)) {
|
||||
s_settingsState.confirm_lite_redownload = true;
|
||||
}
|
||||
ImGui::EndDisabled();
|
||||
|
||||
Reference in New Issue
Block a user