Commit Graph

86 Commits (72fcbf7e1062c0bcf5a67f058c5d53491c397c59)

Author SHA1 Message Date
Nic Luckie 72fcbf7e10 fix(web): improve ConfirmDialog reliability
- Fixed potential undefined username toast in MemberSection by storing username locally before clearing target state
- Standardized data-loading attribute on confirm button to use boolean value directly
3 weeks ago
Nic Luckie 9beb6ca5c1 fix(web): improve destructive flows, i18n specificity, and remove unused attachments dialog
- Attachments: reverted unused bulk "Delete all unused" ConfirmDialog and pruned related unused vars (flow not user-triggered)
- Members: capture username before clearing archive/delete targets to avoid brittle state reads
- Access tokens: capture fields before clearing delete target; safe toast + functional state update
- Sessions: use “Revoke” label instead of generic delete wording
- Tags: replace incorrect generic deletion success message with tag.delete-success i18n key
- ConfirmDialog: restructured into its own folder (index + module + README) to align with component organization guidelines
- General: eliminate reliance on reading state immediately after reset; tighten handler robustness
3 weeks ago
Nic Luckie 30795d1d9c feat(web): introduce accessible ConfirmDialog and migrate confirmations; add Markdown-safe descriptions
Why
- window.confirm is not supported on Brave Mobile for iOS, which blocked destructive actions like deleting memos. Replacing it with an accessible, app-native dialog restores mobile functionality and improves UX.

What changed
- New ConfirmDialog component
  - Replaces window.confirm usage across the app.
  - Props: open/onOpenChange, title, description or descriptionMarkdown, confirm/cancel labels, onConfirm, confirmVariant.
  - Prevents double-submit and accidental dismiss while confirming (loading state).
- Markdown support for dialog descriptions
  - descriptionMarkdown renders via marked and is sanitized with DOMPurify before injection.
  - Keeps translations readable (Markdown) and safe (sanitized HTML).
- Member management flows
  - Updated archive/delete dialogs to use ConfirmDialog.
  - Added toast notifications for archive, restore, and delete actions.
- i18n: added/updated relevant translation keys (en).

Accessibility and mobile
- Dialog buttons are touch-friendly.
- Escape and outside-click behavior matches expectations.

Manual Tests - Verified in Brave desktop (v1.82.166) and Brave for iOS (v1.81 (134))
- Memos:
  - Archive → confirm archival and shows success toast.
  - Restore (only when archived) → confirm restoration and shows success toast.
  - Delete → destructive dialog → confirm deletion and shows success toast.
- Shortcuts: create → menu → Delete → dialog appears; cancel keeps; confirm deletes and list refreshes.
- Access tokens: Settings → Access Tokens → Delete → dialog title shows masked token; confirm deletes.
- Members: Settings → Members → non-current user:
  - Archive → warning dialog → confirm archives.
  - Delete (only when archived) → destructive dialog → confirm deletes.
- Sessions: Settings → Sessions → Revoke non-current session → dialog appears; confirm revokes; current session remains disabled.
- Webhooks: Settings → Webhooks → Delete → dialog appears; confirm deletes and list refreshes.
- Mobile/accessibility: focus trap, inert background, tappable buttons, Escape/outside-click behavior verified.

Notes / follow-ups
- Deleting a member currently removes the account but does not cascade-delete the member’s content. Not sure if this is intended or not, so I left the warning description more general for now.
4 weeks ago
Johnny f907619752 chore: move frontend store 3 months ago
Johnny 240d89fbca feat: migrate dialogs 3 months ago
Johnny 35928ce5ba chore: unify colors 3 months ago
Johnny 91be2f68d1
feat: variant colors (#4816) 3 months ago
Johnny 493832aeb4 refactor: unify components 4 months ago
Steven c9ab03e1a0 refactor: user service 4 months ago
Johnny acb71dfb69 chore: tweak button styles 4 months ago
Johnny f2a01d9ccb chore: use popover instead of dropdown/menu 4 months ago
Johnny 522da2a114 fix: border color 4 months ago
Johnny e6fe088ac0 chore: fix missing observer 5 months ago
johnnyjoy f9e07a2245 feat: support update user's role 5 months ago
Johnny 47a9b434e6 fix: translate in members section 8 months ago
taosin a7fef80384
chore: update chinese i18n at member setting section (#4405) 8 months ago
Johnny 7a57b5c6e7 refactor: user store 8 months ago
johnnyjoy 2a8c4cb750 chore: update styles 8 months ago
Steven 8b7e9f5443 chore: remove unused user id 9 months ago
johnnyjoy 2a861ea430 refactor: tweak resource state in api 9 months ago
Steven db2b34a850 chore: update input source 12 months ago
Steven 963706aebd refactor: update button source 12 months ago
Michel Heusschen 2dbf92f7f1
perf: reduce bundle size by 21% with direct icon imports (#3844) 1 year ago
Steven 1ad5d9bf0a chore: update confirm dialog 1 year ago
Steven 40a5503d45 chore: tweak i18n locales 1 year ago
Steven 1b291422e7 refactor: api version 1 year ago
Steven 5f2d6b22be chore: tweak memo structure 2 years ago
Steven 68468927dd chore: tweak setting styles 2 years ago
Steven 606e574e19 chore: update enum type 2 years ago
Steven 7f5148d490 chore: clean dropdown 2 years ago
Steven 6d5e1def76 chore: update member section 2 years ago
Steven 1994c20c54 chore: tweak setting page 2 years ago
Steven 73baeaa0ad chore: tweak dark mode styles 2 years ago
Steven 8e325f9986 chore: return username in user response 2 years ago
Steven df5aeb6d88 chore: remove v1 prefix in store name 2 years ago
Steven df3303dcd3 chore: update list users 2 years ago
Steven e83d483454 refactor(frontend): use auth service 2 years ago
Steven e5f660a006 chore: migrate update user 2 years ago
Steven c0628ef95b chore: migrate create user 2 years ago
Steven c0b5070e46 chore: migrate delete user 2 years ago
Steven c2ab05d422 chore: fix member section style 2 years ago
Athurg Gooth 664c9c4a7c
chore: extend height of setting page (#2407)
Extend height of setting page
2 years ago
Steven 1489feb054 chore: update common dialog default color 2 years ago
Steven 0d803bf45f chore: update dark mode styles 2 years ago
Steven 866937787c chore: clean duplicated requests 2 years ago
boojack c67a69629e
chore: update user menu items (#2179) 2 years ago
boojack 4af0d03e93
chore: add user profile page (#2175)
chore: some enhancements
2 years ago
boojack d3bd3ddab0
chore: update some detail styles (#2168)
* chore: update some detail styls

* chore: update
2 years ago
boojack d114b630d2
feat: add prettier sort import plugin (#2058) 2 years ago
boojack 220cba84ae
chore: add dev guard for memo chat (#1968) 2 years ago