feat(send): migrate the Confirm-Send modal to the reference design
Presentation-only migration of RenderSendConfirmPopup (the confirm-before-broadcast
popup) — a fund-moving modal:
- struct-form BeginOverlayDialog(OverlayDialogSpec{BlurFloat, cardWidth popupW,
idSuffix confirmsend}) replacing the legacy positional overload; p_open stays
nullptr (the popup keeps its own Escape + Cancel handling)
- TR() the one hardcoded status string in the synchronous live-revalidation guard
("Cannot send now …") -> new send_cannot_send_now key, 8 langs (em-dash preserved)
The fund path is byte-for-byte unchanged: the live re-validation guard, the
app->sendTransaction call + its success/failure callback, the lite-locked
requestLiteUnlock branch, the s_sending/s_show_confirm state, the Escape handler,
and the FROM/TO cards + fee-tier/summary rendering.
Verified: build + ctest + hygiene clean; a 2-lens adversarial review
(fund-path-untouched / ui-i18n) returned zero findings, with the fund-path lens
proving the send path diffs byte-for-byte identical to HEAD.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -696,7 +696,11 @@ void RenderSendConfirmPopup(App* app) {
|
||||
float popupAvailW = ImGui::GetMainViewport()->Size.x * S.drawElement("tabs.send", "confirm-popup-width-ratio").size;
|
||||
float popupW = std::min(schema::UI().drawElement("tabs.send", "confirm-popup-max-width").size, popupAvailW);
|
||||
float popVs = Layout::vScale();
|
||||
if (material::BeginOverlayDialog(TR("confirm_send"), nullptr, popupW, 0.94f)) {
|
||||
material::OverlayDialogSpec ov;
|
||||
ov.title = TR("confirm_send"); ov.p_open = nullptr;
|
||||
ov.style = material::OverlayStyle::BlurFloat;
|
||||
ov.cardWidth = popupW; ov.idSuffix = "confirmsend";
|
||||
if (material::BeginOverlayDialog(ov)) {
|
||||
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_Escape) && !s_sending) {
|
||||
s_show_confirm = false;
|
||||
@@ -826,7 +830,7 @@ void RenderSendConfirmPopup(App* app) {
|
||||
double liveAvail = GetAvailableBalance(app);
|
||||
if (!app->isConnected() || liveState.sync.syncing || s_amount <= 0 ||
|
||||
(s_amount + s_fee) > liveAvail) {
|
||||
s_tx_status = "Cannot send now — check connection, sync, and available balance.";
|
||||
s_tx_status = TR("send_cannot_send_now");
|
||||
s_status_success = false;
|
||||
s_status_timestamp = ImGui::GetTime();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user