feat(directory): add 'Create Bucket' option to actions menu
This commit is contained in:
parent
f7352eb3c3
commit
4a01371fad
@ -267,7 +267,7 @@ class _DirectoryViewState extends State<DirectoryView> {
|
||||
itemBuilder: (context) {
|
||||
List<PopupMenuEntry<int>> menuItems = [];
|
||||
|
||||
// Section: Actions (Always visible now)
|
||||
// Section: Actions
|
||||
menuItems.add(
|
||||
const PopupMenuItem<int>(
|
||||
enabled: false,
|
||||
@ -282,6 +282,38 @@ class _DirectoryViewState extends State<DirectoryView> {
|
||||
),
|
||||
);
|
||||
|
||||
// Create Bucket option
|
||||
menuItems.add(
|
||||
PopupMenuItem<int>(
|
||||
value: 2,
|
||||
child: Row(
|
||||
children: const [
|
||||
Icon(Icons.add_box_outlined,
|
||||
size: 20, color: Colors.black87),
|
||||
SizedBox(width: 10),
|
||||
Expanded(child: Text("Create Bucket")),
|
||||
Icon(Icons.chevron_right,
|
||||
size: 20, color: Colors.red),
|
||||
],
|
||||
),
|
||||
onTap: () {
|
||||
Future.delayed(Duration.zero, () async {
|
||||
final created = await showModalBottomSheet<bool>(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
builder: (_) => const CreateBucketBottomSheet(),
|
||||
);
|
||||
|
||||
if (created == true) {
|
||||
await controller.fetchBuckets();
|
||||
}
|
||||
});
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
// Manage Buckets option
|
||||
menuItems.add(
|
||||
PopupMenuItem<int>(
|
||||
value: 1,
|
||||
@ -318,6 +350,7 @@ class _DirectoryViewState extends State<DirectoryView> {
|
||||
),
|
||||
);
|
||||
|
||||
// Show Inactive switch
|
||||
menuItems.add(
|
||||
PopupMenuItem<int>(
|
||||
value: 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user