Skip to content

Add Permanent Deletion Feature with Confirmation Dialog #79

Merged
babarot merged 7 commits intomainfrom
babarot/permanently-delete
Feb 19, 2025
Merged

Add Permanent Deletion Feature with Confirmation Dialog #79
babarot merged 7 commits intomainfrom
babarot/permanently-delete

Conversation

@babarot
Copy link
Copy Markdown
Owner

@babarot babarot commented Feb 18, 2025

This PR introduces a permanent deletion feature that allows users to completely remove files from the trash. To prevent accidental deletions, a confirmation dialog has also been added.

  • Permanent Deletion:
    • Users can now permanently delete files from the trash using the D key.
    • Deleted files are completely removed and cannot be recovered.
  • Delete Confirmation Dialog:
    • Before a file is permanently deleted, a confirmation prompt appears.
    • Users must press "Y" to confirm or "N" to cancel.
    • Default deletion dialog color is configurable in config.go.
  • Key Bindings Enhancements:
    • D key: Triggers permanent deletion.
    • Esc key: Resets selection.
    • Q key: Added as an alternative to Ctrl+C for quitting.
  • Code Refactoring & Improvements:
    • Introduced setViewType() for better view state management.
    • Added deletePermanentlyCmd() to handle permanent deletions cleanly.
    • Improved UI styling for confirmation dialogs.

This update ensures safe and deliberate file deletion, preventing accidental removals while giving users full control over their trash management.

@babarot babarot added kind/feature A feature request; new or enhanced behavior release/minor Indicates minor version to bump up next when creating release PR. labels Feb 18, 2025
@babarot babarot merged commit 6cc3ec8 into main Feb 19, 2025
5 checks passed
@babarot babarot deleted the babarot/permanently-delete branch February 19, 2025 16:50
@github-actions github-actions bot mentioned this pull request Feb 18, 2025
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Mar 6, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [babarot/gomi](https://github.com/babarot/gomi) | minor | `v1.4.3` -> `v1.5.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>babarot/gomi (babarot/gomi)</summary>

### [`v1.5.1`](https://github.com/babarot/gomi/blob/HEAD/CHANGELOG.md#v151---2025-02-23)

[Compare Source](babarot/gomi@v1.5.0...v1.5.1)

##### New Features

-   Add Log Rotation feature by [@&#8203;babarot](https://github.com/babarot) in babarot/gomi#82

### [`v1.5.0`](https://github.com/babarot/gomi/blob/HEAD/CHANGELOG.md#v150---2025-02-21)

[Compare Source](babarot/gomi@v1.4.3...v1.5.0)

##### New Features

-   Add Permanent Deletion Feature with Confirmation Dialog   by [@&#8203;babarot](https://github.com/babarot) in babarot/gomi#79

##### Refactorings

-   Large-scale Code Refactoring for Better Architecture by [@&#8203;babarot](https://github.com/babarot) in babarot/gomi#81

##### Others

-   Create missing log path by [@&#8203;kariudo](https://github.com/kariudo) in babarot/gomi#80

</details>

---

### Configuration

πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

β™» **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

πŸ”• **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODIuNCIsInVwZGF0ZWRJblZlciI6IjM5LjE4Mi40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature A feature request; new or enhanced behavior release/minor Indicates minor version to bump up next when creating release PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant