From d01c67fc45eb35037bdc713a24d923f990ac5ea2 Mon Sep 17 00:00:00 2001 From: JoshHeaps Date: Mon, 31 Aug 2026 18:22:50 -0600 Subject: [PATCH] Replace the browser confirm boxes with undo and in-page dialogs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three system confirm() dialogs sat in the middle of dealing. The worst was on Next Hand — the most-pressed button in a session, asking "are you sure?" every single time, stealing focus and, on a phone, taking over the screen. Next Hand now just happens, and a toast says where the button landed with an Undo beside it for the few seconds anyone would notice a misclick. The same undo covers the pot wizard, which is the more valuable case: paying the wrong player is a real mistake, and rolling it back restores the hand history entry and the session standings along with the seats. The snapshot is in-memory only — an undo is for the mistake you just made, not one from last night. The two genuinely destructive actions keep a confirmation, but as an in-page dialog that matches the table instead of the browser's own: Escape or the backdrop cancels, Enter confirms, and on a phone the buttons go full width with Cancel nearest the thumb. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb --- JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml | 14 ++ JoshHeaps.Net/wwwroot/css/casino/holdem.css | 142 ++++++++++++++++++ .../wwwroot/js/casino/holdem/feedback.js | 115 ++++++++++++++ .../wwwroot/js/casino/holdem/main.js | 70 +++++++-- 4 files changed, 329 insertions(+), 12 deletions(-) create mode 100644 JoshHeaps.Net/wwwroot/js/casino/holdem/feedback.js diff --git a/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml b/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml index e7464c8..bc575fd 100644 --- a/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml +++ b/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml @@ -210,6 +210,19 @@ +
+ + +