Skip to content

Confirmation Deletion#204

Merged
c0derMo merged 11 commits intomainfrom
deletion-confirmation
Feb 22, 2026
Merged

Confirmation Deletion#204
c0derMo merged 11 commits intomainfrom
deletion-confirmation

Conversation

@c0derMo
Copy link
Copy Markdown
Contributor

@c0derMo c0derMo commented Jan 4, 2026

Adds a timed confirmation button, which needs to be pressed twice within a definable period of time to actually trigger.
Uses this button for deletion buttons of items and inventories. Fixes #200

@c0derMo c0derMo requested a review from Kr0nox as a code owner January 4, 2026 23:14
@ProgramPhoenix ProgramPhoenix self-requested a review as a code owner January 5, 2026 08:54
ProgramPhoenix
ProgramPhoenix previously approved these changes Jan 5, 2026
@ProgramPhoenix
Copy link
Copy Markdown
Member

I also added fixes for two Problems in the backend.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a reusable TimedConfirmationButton component that requires two clicks within a configurable time period to confirm destructive actions. The component replaces browser-native confirm() dialogs for item and inventory deletion operations, providing a more modern and consistent user experience.

Key changes:

  • New TimedConfirmationButton.vue component with countdown timer functionality
  • Updated deletion UI in ItemRowDisplay and InventoryContainer to use the new confirmation button
  • Backend bug fixes: corrected inventory deletion permission check and prevented DM users from being added as readers/writers of their own inventories

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
frontend/src/components/TimedConfirmationButton.vue New component implementing timed two-click confirmation with countdown display
frontend/src/components/ItemRowDisplay.vue Replaces standard delete button with TimedConfirmationButton for item deletion
frontend/src/components/InventoryContainer.vue Replaces browser confirm() dialog with TimedConfirmationButton for inventory deletion
backend/inventarwerk_api/src/routers/inventory_router.rs Fixes deletion permission logic and prevents self-assignment of DM permissions during inventory creation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/components/TimedConfirmationButton.vue
Comment thread frontend/src/components/TimedConfirmationButton.vue Outdated
ProgramPhoenix
ProgramPhoenix previously approved these changes Jan 5, 2026
ProgramPhoenix
ProgramPhoenix previously approved these changes Jan 5, 2026
ProgramPhoenix
ProgramPhoenix previously approved these changes Jan 11, 2026
Comment thread backend/inventarwerk_api/src/routers/inventory_router.rs
Comment thread frontend/src/components/TimedConfirmationButton.vue Outdated
Comment thread frontend/src/components/TimedConfirmationButton.vue Outdated
Comment thread frontend/src/components/TimedConfirmationButton.vue Outdated
Comment thread frontend/src/components/TimedConfirmationButton.vue Outdated
Comment thread frontend/src/components/TimedConfirmationButton.vue Outdated
Comment thread frontend/src/components/InventoryContainer.vue Outdated
Comment thread frontend/src/components/ItemRowDisplay.vue Outdated
@c0derMo c0derMo requested a review from Kr0nox February 11, 2026 11:02
Kr0nox
Kr0nox previously approved these changes Feb 13, 2026
@c0derMo c0derMo merged commit 5e337b9 into main Feb 22, 2026
5 checks passed
@c0derMo c0derMo deleted the deletion-confirmation branch February 22, 2026 10:14
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.

Deleteconfirmation

4 participants