refactor(status): Support batch and all changes discard functionality

The file discarding mechanism has been significantly refactored to improve handling of multi-file operations. Instead of processing discards on a per-file basis, the system now supports batch actions for selected files or reverting all tracked modifications simultaneously. This update centralizes complex discard logic into dedicated functions across the component suite.

- Updated state management and types to handle arrays of file changes.
- Added UI elements and handlers for discarding all staged/unstaged changes.
- Enhanced the confirmation dialog to display multiple discarded targets in a list view.
This commit is contained in:
Christoph Brandau
2026-07-10 11:36:15 +02:00
parent 44a5b776d7
commit 7ef1a2dac8
4 changed files with 134 additions and 26 deletions
+17
View File
@@ -3188,6 +3188,23 @@
align-items: center;
gap: 6px;
}
.discard-target-list {
display: grid;
gap: 4px;
max-height: 168px;
overflow: auto;
margin: 0;
padding: 0;
list-style: none;
}
.discard-target-list .discard-target {
max-height: none;
}
.discard-target-more {
padding: 2px 2px 0;
color: var(--color-ink-muted);
font-size: 12px;
}
.discard-warning-text {
color: #ffb8bf;
font-weight: 650;