feat: allow setting permissions in multi preview
This adds a Message::ShiftPermissions to handle setting permissions for user, group or other for either 1 or more items and a Command::SetMultiplePermissions to set permissions on multiple items at the same time. The permission dropdown will only have a selection if all selected items have the same permission, otherwise it will be empty but still allow changing. Up to 5 owners and groups will be displayed for all selected items with an ellipses if there are more. The OperationSelection for setting permissions now also returns the path as selected such that the tab will be re-scanned and update the dropdown to correctly.
This commit is contained in:
parent
17325a5f5a
commit
41cdf89604
3 changed files with 152 additions and 2 deletions
|
|
@ -4478,6 +4478,13 @@ impl Application for App {
|
|||
tab::Command::SetPermissions(path, mode) => {
|
||||
commands.push(self.operation(Operation::SetPermissions { path, mode }));
|
||||
}
|
||||
tab::Command::SetMultiplePermissions(permissions) => {
|
||||
commands.push(Task::batch(permissions.into_iter().map(
|
||||
|(path, mode)| {
|
||||
self.operation(Operation::SetPermissions { path, mode })
|
||||
},
|
||||
)));
|
||||
}
|
||||
tab::Command::WindowDrag => {
|
||||
if let Some(window_id) = self.core.main_window_id() {
|
||||
commands.push(window::drag(window_id));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue