diff --git a/src/ui/pages/settings_page.cpp b/src/ui/pages/settings_page.cpp index 4f2fe71..c17ff8c 100644 --- a/src/ui/pages/settings_page.cpp +++ b/src/ui/pages/settings_page.cpp @@ -398,7 +398,15 @@ static void loadSettingsPageState(config::Settings* settings) { s_settingsState.verbose_logging = settings->getVerboseLogging(); s_settingsState.debug_categories = settings->getDebugCategories(); s_settingsState.debug_cats_dirty = false; - s_settingsState.rpc_plaintext_remote = rpc::Connection::usesPlaintextRemote(rpc::Connection::autoDetectConfig()); + // Populate the RPC fields from the auto-detected daemon config so they show the REAL connection + // (host/port/user/pass) instead of compile-time defaults. These are read-only in the UI: the RPC + // credentials come from the daemon's DRAGONX.conf, so this is an accurate display, not an editor. + const auto rpcCfg = rpc::Connection::autoDetectConfig(); + snprintf(s_settingsState.rpc_host, sizeof(s_settingsState.rpc_host), "%s", rpcCfg.host.c_str()); + snprintf(s_settingsState.rpc_port, sizeof(s_settingsState.rpc_port), "%s", rpcCfg.port.c_str()); + snprintf(s_settingsState.rpc_user, sizeof(s_settingsState.rpc_user), "%s", rpcCfg.rpcuser.c_str()); + snprintf(s_settingsState.rpc_password, sizeof(s_settingsState.rpc_password), "%s", rpcCfg.rpcpassword.c_str()); + s_settingsState.rpc_plaintext_remote = rpc::Connection::usesPlaintextRemote(rpcCfg); // Apply loaded visual effects settings effects::ImGuiAcrylic::ApplyBlurAmount(s_settingsState.blur_amount); @@ -2011,8 +2019,11 @@ void RenderSettingsPage(App* app) { ImGui::TextUnformatted(label); ImGui::SameLine(0, Layout::spacingXs()); ImGui::SetNextItemWidth(inputW); + // Read-only: the RPC credentials are auto-detected from the daemon's DRAGONX.conf, + // so these fields DISPLAY the live connection (editing them here did nothing). ImGui::InputText(id, buf, bufSz, - password ? ImGuiInputTextFlags_Password : 0); + ImGuiInputTextFlags_ReadOnly | + (password ? ImGuiInputTextFlags_Password : 0)); }; if (fourAcross) { diff --git a/src/ui/windows/address_transfer_dialog.h b/src/ui/windows/address_transfer_dialog.h index 8cb9617..eb00245 100644 --- a/src/ui/windows/address_transfer_dialog.h +++ b/src/ui/windows/address_transfer_dialog.h @@ -226,7 +226,9 @@ public: Notifications::instance().error(result.empty() ? TR("transfer_failed") : result); } }); - s_open = false; + // Keep the dialog OPEN on submit: s_sending drives the button to a disabled "Sending…" + // state, and when the async callback sets s_resultMsg the in-dialog result screen shows + // (with its own Close button). Previously closing here made that result screen dead code. } ImGui::EndDisabled();