Replace native confirm() with an in-site confirmation dialog
Add App.confirm() in common.js: a promise-based dialog styled like the site's modals, with a title, multi-line message and custom button labels. Destructive actions use a red OK button and focus Cancel by default; Escape and backdrop clicks cancel, and Tab stays inside the dialog. Use it for folding when a check is possible, leaving the table, confirming showdown winners and deleting tables from the lobby. After the dialog closes, re-check that the action is still valid (turn not passed, pot not already awarded, table still listed) before sending it. Also add a "poker-test" launch config that runs on port 4672 with the example keys from .env.example, for local browser testing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d89ce1dd30
commit
680aa20d30
5 files changed
+122
-11
No files matched your search
@@ -6,6 +6,13 @@
|
||||
"runtimeExecutable": "node",
|
||||
"runtimeArgs": ["server/index.js"],
|
||||
"port": 4671
|
||||
},
|
||||
{
|
||||
"name": "poker-test",
|
||||
"runtimeExecutable": "node",
|
||||
"runtimeArgs": ["server/index.js"],
|
||||
"env": { "ACCESS_KEY": "000000", "ADMIN_KEY": "000001", "PORT": "4672" },
|
||||
"port": 4672
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user