-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(web): undo delete #18729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(web): undo delete #18729
Conversation
- Update English translation
Make onUndoDelete optional in Props interface
Head branch was pushed to by a user without write access
…bled. - Enforce lint requirement for no-negated-condition
| button: { text: $t('undo'), onClick: () => undoDeleteAssets(onUndoDelete, assets) }, | ||
| timeout: 5000, | ||
| }), | ||
| ...(onUndoDelete && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prettier tends to have some weird opinions on formatting lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can run npm run format:fix in the web directory for fix everything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do in the future. Didn't here since I didn't expect it to have an issue and make things arguably less readable.
I'll fix up the lint issue then I think we'll be good
* feat(web): Undo asset delete * - lints and checks - Update English translation * Update delete-assets.svelte Make onUndoDelete optional in Props interface * - Ensure undo button not available on permanent delete, or trash disabled. - Enforce lint requirement for no-negated-condition * Fix formatting * fix: lint --------- Co-authored-by: Alex Tran <[email protected]>
Description
Adds undo button to the Assets Trashed notification.
Addresses #9571
How Has This Been Tested?
Tested on web using both trash menu button and delete key shortcut. Applies to most photos pages except Archive, Trash, and Locked. Undo option does not appear on those pages.
The notification timeout is extended to 5s when the undo button is present.
Screenshots (if appropriate)
Checklist:
src/services/uses repositories implementations for database calls, filesystem operations, etc.src/repositories/is pretty basic/simple and does not have any immich specific logic (that belongs insrc/services/)