dialog

Confirmations and prompts — promises, no authored modals

The dialog calls — every one returns a Promise (live)

  • Destructive actions ALWAYS ride g.confirm(message, { title, danger: true, confirmText }) — never a hand-built modal, never a bare browser confirm. The resolved value is the answer; nothing happens on dismiss.
  • g.alert is for must-acknowledge information (rare — most feedback is a toast); g.prompt for one required value (validate via its options).
  • Email/SMS-code confirmations ALWAYS ride g.codePrompt — the house code look (centered, spaced digits) + the resend line with the register-style countdown. The confirm callback is the SERVER check: return the error to keep the dialog open, falsy when done; resend re-requests the code. Never collect a verification code through g.prompt or an inline input — the auth PAGES (register, reset) are the one panel-form exception and the look's reference.
  • AUTHORED modals (forms, pickers) are Bootstrap modals + former — the dialog lib is only for these one-shot questions.
  • Docs: templates/app/docs/libs/dialog.md; every flavor live: /tests/dialog.