Commit Graph

329 Commits

Author SHA1 Message Date
Nic Luckie d3e6302526 refactor: simplify access token toast and remove unnecessary fragment wrapper
- Removed redundant React fragment in Attachments.tsx for cleaner structure
- Removed fallback logic for access token description in toast; use created.description directly since description is always required by client-side validation.
- Removed unused i18n key access-token-created-default since description is always present
2025-09-26 20:57:38 -04:00
Nic Luckie c7b53930cc Update CreateAccessTokenDialog and AccessTokenSection; improve handling 2025-09-25 19:26:33 -04:00
Nic Luckie ea3b6a7c77 refactor(ui): remove Markdown rendering from ConfirmDialog component
- Removed Markdown rendering capability from ConfirmDialog component
- Removed marked library dependency from package.json and lockfile
- Updated all component usages to use plain text descriptions
- Converted irreversible action warnings from Markdown to plain text
- Simplified component API by removing descriptionMarkdown prop
- Updated ConfirmDialog README to reflect simplified implementation
- Retained DOMPurify dependency for other components that need it
- Updated en.json translations to remove Markdown formatting
2025-09-24 11:47:55 -04:00
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
2025-09-24 07:47:26 -04:00
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
2025-09-23 21:51:32 -04:00
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.
2025-09-20 12:08:07 -04:00
Steven 6d1485d168 fix: reset state on dialog close and improve dialog open handling 2025-09-17 21:51:46 +08:00
Steven 5a1af7b240 fix: adjust badge height 2025-09-02 23:18:11 +08:00
Johnny 0b4252d1a3 chore: fix linter 2025-08-25 19:52:53 +08:00
Johnny cf29684882 chore: tweak links 2025-08-25 19:51:01 +08:00
Johnny e93f3cbb8b refactor: unify theme and apperance 2025-08-17 11:27:59 +08:00
Steven 1fcafd807e chore: enable memo comments by default 2025-07-29 22:31:18 +08:00
Johnny 5074268f4f fix: action styles in memo editor 2025-07-29 22:10:31 +08:00
johnnyjoy c5d497a1f0 chore: update user settings 2025-07-27 23:12:42 +08:00
johnnyjoy 3f56ce47d2 chore: update definition of workspace setting 2025-07-27 15:50:09 +08:00
Steven ac386c218d fix: workspace setting keys 2025-07-22 22:59:54 +08:00
Steven c133f5528a fix: workspace setting keys in frontend 2025-07-22 22:45:47 +08:00
Johnny e3735d2de3 fix: storage setting 2025-07-17 22:02:40 +08:00
Steven 3ac4a03229 chore: update i18n 2025-07-08 20:33:44 +08:00
Steven 533591af2b chore: theme in user setting 2025-07-08 19:50:04 +08:00
Johnny f907619752 chore: move frontend store 2025-07-07 22:44:08 +08:00
Johnny 1b3083b216
feat: themes (#4824) 2025-07-07 20:13:22 +08:00
Johnny 240d89fbca feat: migrate dialogs 2025-07-06 22:01:55 +08:00
Johnny 35928ce5ba chore: unify colors 2025-07-06 13:55:08 +08:00
Johnny 41fdc7a484 chore: fix frontend linter 2025-07-05 11:44:01 +08:00
Johnny a3de61a141 chore: fix dark mode 2025-07-05 11:40:49 +08:00
Johnny db4b1f5fde chore: tweak styles 2025-07-05 11:26:59 +08:00
Johnny 91be2f68d1
feat: variant colors (#4816) 2025-07-04 23:03:13 +08:00
Johnny 493832aeb4 refactor: unify components 2025-07-01 19:29:48 +08:00
Steven c18d6927ba chore: update user session table 2025-06-27 00:00:06 +08:00
johnnyjoy 1fffc41f79 feat: sliding expiration for user sessions 2025-06-26 23:03:28 +08:00
johnnyjoy d6a75bba4c refactor: webhook service 2025-06-24 21:28:21 +08:00
Steven 59eae4465a chore: update user session section 2025-06-23 20:12:29 +08:00
Johnny 4e3a4e36f6 feat: implement user sessions 2025-06-23 09:13:51 +08:00
Steven 1ea4cc453c refactor: workspace setting service 2025-06-16 22:51:26 +08:00
Steven 3b0c87591f refactor: webhook service 2025-06-16 22:10:43 +08:00
Steven c9ab03e1a0 refactor: user service 2025-06-16 21:49:38 +08:00
Johnny acb71dfb69 chore: tweak button styles 2025-06-10 22:51:42 +08:00
Johnny f2a01d9ccb chore: use popover instead of dropdown/menu 2025-06-08 23:21:23 +08:00
Johnny 522da2a114 fix: border color 2025-06-08 00:39:51 +08:00
Johnny f5c64849d2 chore: upgrade tailwindcss to v4 2025-06-07 10:15:12 +08:00
Johnny 663e56747f chore: replace switch kit 2025-06-02 01:01:29 +08:00
Johnny e6fe088ac0 chore: fix missing observer 2025-06-01 09:22:33 +08:00
Steven 46900f9807 refactor: move store prefixes to common module 2025-05-27 07:49:46 +08:00
eya46 4924b23884
fix: state mismatch in Storage and System pages (#4719)
* fix: sync storage setting state

* fix: sync customProfile state
2025-05-26 21:50:10 +08:00
dabeeduu 6964c1df05
fix: make the save button disabled after a successful update (#4721)
* fix: make the save button disabled after a successful update

* fix: fixing formatting error

---------

Co-authored-by: didi <didi@localhost.localdomain>
2025-05-26 14:50:13 +08:00
Brian c6e6b7b93b
feat: add infinite scrolling for memos (#4715)
* feat(WIP): add prop-driven infinite scroll

* feat(WIP): add global toggle for infinite scrolling under settings

* feat: integrate newly added scroll-mode selection state with backend for persists across refreshes

* fix: default to infinite scrolling over load more button & remove redundant setting option

* fix: rectify linting issues

* Update web/src/components/PagedMemoList/PagedMemoList.tsx

---------

Co-authored-by: Johnny <yourselfhosted@gmail.com>
2025-05-25 23:12:47 +08:00
johnnyjoy ee99afd7a4 chore: enable location by default 2025-05-19 21:25:51 +08:00
Steven 606924b4c9 chore: unify form styles 2025-05-15 22:15:01 +08:00
johnnyjoy f9e07a2245 feat: support update user's role 2025-05-15 19:36:15 +08:00