Select more than one file at a time
Moving or deleting five files meant doing it five times, each with its own confirm. Rows now select the way they do in a file manager: a plain click replaces the selection, ctrl or cmd adds and removes one, shift takes the run from the last row clicked, clicking past the last row or pressing Escape clears it. Two or more selected raises a bar with Move to... and Delete, and the row menu offers the same for the whole selection. The move is one `FileNode/set` rather than a loop, and not only for the round trip: a loop would apply half the moves and then throw, leaving a selection split across two folders with nothing saying which half went. One call is one answer, and `notUpdated` names whatever the server refused. Right-clicking inside the selection acts on all of it; right-clicking outside means you meant that row, so the selection follows the pointer rather than the menu quietly applying to something off-screen. A drag carries the whole selection the same way, which is why the payload is now a list -- and why a drop is refused unless every file in it can land, since a drag that moves four of five and skips the fifth is worse than one that will not start. A selection belongs to the folder it was made in, so changing folder or account drops it: rows left selected off-screen make the delete two folders later a surprise.
This commit is contained in:
@@ -1355,6 +1355,10 @@ button.dp-open:disabled { cursor: default; opacity: .5; }
|
||||
/* Files: the sidebar tree reuses .nav-item, so only the parts the mail tree has
|
||||
no equivalent for are here. A row in the list is a drop target the same way a
|
||||
folder in the tree is, and says so the same way. */
|
||||
/* Shown only when more than one row is selected: with a single row the row
|
||||
menu already says everything this would. */
|
||||
.selection-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin: 0 12px 4px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-soft-fg); }
|
||||
.selection-bar .grow { font-weight: 600; }
|
||||
.files-table tbody tr.drop-target > td { background: var(--accent-soft); }
|
||||
.files-table tbody tr.drop-target > td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
|
||||
.files-table tbody tr[draggable="true"] { cursor: grab; }
|
||||
|
||||
Reference in New Issue
Block a user