Skip to content

feat: add Move to Trash/Recycle Bin option for image deletion#273

Merged
lstein merged 5 commits into
masterfrom
claude/issue-209-20260523-0002
May 25, 2026
Merged

feat: add Move to Trash/Recycle Bin option for image deletion#273
lstein merged 5 commits into
masterfrom
claude/issue-209-20260523-0002

Conversation

@lstein

@lstein lstein commented May 23, 2026

Copy link
Copy Markdown
Owner

Add a "Move deleted image files into Trash/Recycle Bin" checkbox to the Appearance section of Settings (after "Confirm before deleting images"), defaulting to true. When enabled, deleted images are sent to the system trash via send2trash instead of being permanently removed.

Closes #209

Generated with Claude Code

github-actions Bot and others added 3 commits May 23, 2026 00:07
Add a new "Move deleted image files into Trash/Recycle Bin" checkbox to
the Appearance section of Settings (after "Confirm before deleting
images"), defaulting to true. When enabled, deleted images are sent to
the system trash via send2trash instead of being permanently removed.

- Add send2trash dependency to pyproject.toml
- Add moveToTrash state variable (default: true) and persisted setting
- Add settings checkbox wired to state.moveToTrash
- Pass move_to_trash query param from deleteImage() and bulk-delete in bookmarks
- Backend delete_image endpoint uses send2trash when move_to_trash=true

Closes #209

Co-authored-by: Lincoln Stein <lstein@users.noreply.github.com>

@lstein lstein left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude Please change the settings panel to look like this:

Confirm before deleting images: [X]
Delete images by: (*) Move to Trash/Recycle   ( ) Immediately Delete

@claude

claude Bot commented May 25, 2026

Copy link
Copy Markdown

Claude finished @lstein's task in 1m 39s —— View job


Updating Settings Panel UI

  • Analyze the request
  • Read current settings HTML template and JavaScript
  • Update HTML to use radio buttons for deletion method
  • Update settings.js to handle radio button state
  • Add CSS for radio group
  • Commit and push changes

Done. The settings panel now shows:

Confirm before deleting images: [X]
Delete images by: (*) Move to Trash/Recycle   ( ) Immediately Delete

Changes made:

  • settings.html: Replaced the moveToTrashCheckbox with a deleteMethodRadioGroup containing two radio buttons (deleteMethodTrash / deleteMethodImmediate)
  • settings.js: Updated cacheElements, populateModalFields, and setupMoveToTrashControl to work with the new radio buttons; state.moveToTrash is true when "Move to Trash/Recycle" is selected
  • settings.css: Added #deleteMethodRadioGroup styles (flex row, 16px gap) matching the existing #modeRadioGroup pattern
    |

github-actions Bot and others added 2 commits May 25, 2026 00:37
…group

Change the "Move to Trash" checkbox to a "Delete images by:" radio group
with "Move to Trash/Recycle" and "Immediately Delete" options, as requested.

Co-authored-by: Lincoln Stein <lstein@users.noreply.github.com>
@lstein lstein enabled auto-merge (squash) May 25, 2026 00:44
@lstein lstein merged commit 79477a5 into master May 25, 2026
6 checks passed
@lstein lstein deleted the claude/issue-209-20260523-0002 branch May 25, 2026 01:20
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.

[Enhancement] Delete to Recycle Bin

1 participant