cocktailpeanut / breadboard

Stable Diffusion Browser for Windows, Mac, and Linux
https://breadboard.me
384 stars 38 forks source link

Deleting file #8

Open washinoboku opened 1 year ago

washinoboku commented 1 year ago

Shouldn't there be an option to move deleted files into the bin/trashcan? Sometimes I accidentally delete the wrong file haha.

Harvester62 commented 1 year ago

I think this should be the default behaviour when deleting/removing an image from the board. I second this Feature Request and hope this is feasible.

cocktailpeanut commented 1 year ago

I looked into this issue, and it's a bit involved because the only cross platform way to do it is using this library https://github.com/sindresorhus/trash

And if you know the NPM ecosystem, you know what it means to have that guy as the author of the package: You need to switch everything to ESM.

Currently breadboard is a pure node.js electron app and doesn't use ESM because I know there are supposed to be some convoluted things I need to do to build the project (but I may be wrong, someone correct me if I'm wrong).

I think it is technically possible to do it, but have no idea if there are unknown challenges when it comes to packaging electron as an ESM challenges, so would rather first focus on features that solve immediate problems for now. Will revisit when I have some more time.

But in the meantime, if anyone is willing to take a stab at turning the whole repo into ESM AND make the build work (just to incorporate that trash library), I would be happy to merge the PR if it works.

Harvester62 commented 1 year ago

Thank you for your feedback on this subject. Hopefully, this feature might be added in future releases.

cocktailpeanut commented 1 year ago

note: if this is implemented, there should be a toggle option because some operating systems don't have the trash feature