Skip to content

ui: themed confirm/alert dialogs in place of the native ones - #278

Open
jseifeddine wants to merge 1 commit into
sol1:mainfrom
jseifeddine:feat/themed-dialogs
Open

jseifeddine wants to merge 1 commit into
sol1:mainfrom
jseifeddine:feat/themed-dialogs

Conversation

@jseifeddine

@jseifeddine jseifeddine commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Based on current main on its own: one commit, nothing from any other open PR.

Fixes #260.

static/ui.js: promise-based rgConfirm/rgAlert; every native alert()/confirm() replaced on admin, tokens, recordings, client and connections; red confirm for destructive actions; Enter acts on the focused button, Tab trapped, a second call resolves the first.

Testing

  • Browser: themed-dialogs.spec.mjs (fails if any native dialog is raised).
  • Manual: delete a recording: themed dialog, Escape cancels, OK deletes.

static/ui.js provides promise-based rgConfirm/rgAlert that show a themed
modal matching the app, injected self-contained so it works on any page
including the standalone client. Every native alert()/confirm() is
replaced: delete user and revoke token (admin), revoke token (tokens),
delete recording (recordings), popup-blocked (client), and terminate
session, delete entry, delete folder and the SSH host-key probe
(connections). Destructive actions get a red confirm button, the host-key
trust prompt an accent one.

From an independent review of the module: rgConfirm/rgAlert resolve any
already-open dialog before replacing it, so a second call can't leave the
first promise hanging; Enter acts on the focused button (Cancel cancels),
and Tab is trapped between the two buttons.

Part of sol1#254

tests: themed confirm/alert dialogs replace the native ones
@jseifeddine
jseifeddine marked this pull request as ready for review October 13, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native alert()/confirm() dialogs break the app's look

1 participant