Skip to content
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

Recycle bin #57

Open
wants to merge 54 commits into
base: main
Choose a base branch
from
Open

Recycle bin #57

wants to merge 54 commits into from

Conversation

0x4f53
Copy link
Member

@0x4f53 0x4f53 commented Feb 6, 2023

♻️ Current situation

Accidents can happen when you're in a hurry. When you tap the delete button, the item is permanently deleted. If you do this on accident, you lose data forever.

💡 Proposed solution

Adding support for a "deleted items" feature, which kinda works like the .Trash directory on some Linux distros or Recycle Bin on Windows. This section lets you:

  • Restore an item
  • Delete an item forever
  • Restore all items
  • Delete all items forever

📷 Screenshots

Account dialog Delete confirmation dialog Deleted items menu
Screenshot_20230206-105715 Screenshot_20230206-105739 Screenshot_20230206-094656

📚 Release Notes

KeyspaceFS changes

Added a boolean value called deleted to KeyspaceFS. This value is set to false by default (for the first time / when an item is created). If the item is being edited, the trash icon appears on the editing screen. Tapping that icon sets the value to true after user confirmation, then writes that change to

  • The local vault KeyspaceFS file
  • The backend, via a PUT request

When the deleted items list is displayed, the vault is first sorted by recently edited items to (for obvious reasons).

UI changes

Added a new button called "Deleted items" to the user account menu on the Dashboard.

📝 Testing

Deleting an item

  • Create a login, note or card.
  • Save it.
  • Edit it.
  • Tap the delete icon.
  • Go back to the Dashboard and tap the user account icon → Deleted items.
  • You will see your deleted item here.

Restoring an item

  • Go to the Dashboard and tap the user account icon → Deleted items.
  • You will see your deleted items here.
  • Tap on an item, then tap restore.
  • Go back to the Dashboard. You will see the item reappear here.

4f77616973 and others added 30 commits January 12, 2023 19:20
Co-authored-by: Rohan Chaturvedi <rohan.chaturvedi@protonmail.com>
Revamped Keyspace settings to match Android 13 AOSP settings
Co-authored-by: Rohan Chaturvedi <rohan.chaturvedi@protonmail.com>
@0x4f53 0x4f53 marked this pull request as draft February 6, 2023 05:07
@0x4f53 0x4f53 marked this pull request as ready for review February 8, 2023 06:05
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.

3 participants