Skip to content

Commit

Permalink
Merge pull request #1775 from ardriveapp/PE-6375-add-create-snapshot-…
Browse files Browse the repository at this point in the history
…button-to-drive-options

PE-6375: add create snapshot to drive options on desktop and mobile
  • Loading branch information
thiagocarvalhodev authored Jul 2, 2024
2 parents c367e36 + 1838a90 commit f600ede
Showing 1 changed file with 32 additions and 5 deletions.
37 changes: 32 additions & 5 deletions lib/pages/drive_detail/drive_detail_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import 'package:ardrive/blocs/prompt_to_snapshot/prompt_to_snapshot_state.dart';
import 'package:ardrive/components/app_bottom_bar.dart';
import 'package:ardrive/components/app_top_bar.dart';
import 'package:ardrive/components/components.dart';
import 'package:ardrive/components/create_snapshot_dialog.dart';
import 'package:ardrive/components/csv_export_dialog.dart';
import 'package:ardrive/components/details_panel.dart';
import 'package:ardrive/components/drive_detach_dialog.dart';
Expand Down Expand Up @@ -473,7 +474,7 @@ class _DriveDetailPageState extends State<DriveDetailPage> {
),
),
),
if (isDriveOwner)
if (isDriveOwner) ...[
ArDriveDropdownItem(
onClick: () {
promptToRenameDrive(
Expand All @@ -484,14 +485,28 @@ class _DriveDetailPageState extends State<DriveDetailPage> {
.currentDrive.name,
);
},
content: ArDriveDropdownItemTile(
name: appLocalizationsOf(context)
content: _buildItem(
appLocalizationsOf(context)
.renameDrive,
icon: ArDriveIcons.edit(
ArDriveIcons.edit(
size: defaultIconSize,
),
),
),
],
ArDriveDropdownItem(
onClick: () {
promptToCreateSnapshot(context,
driveDetailState.currentDrive);
},
content: _buildItem(
appLocalizationsOf(context)
.createSnapshot,
ArDriveIcons.iconCreateSnapshot(
size: defaultIconSize,
),
),
),
ArDriveDropdownItem(
onClick: () {
promptToShareDrive(
Expand Down Expand Up @@ -1111,7 +1126,7 @@ class MobileFolderNavigation extends StatelessWidget {
size: defaultIconSize,
),
)),
if (isOwner)
if (isOwner) ...[
ArDriveDropdownItem(
onClick: () {
promptToRenameDrive(
Expand All @@ -1127,6 +1142,18 @@ class MobileFolderNavigation extends StatelessWidget {
),
),
),
ArDriveDropdownItem(
onClick: () {
promptToCreateSnapshot(context, state.currentDrive);
},
content: _buildItem(
appLocalizationsOf(context).createSnapshot,
ArDriveIcons.iconCreateSnapshot(
size: defaultIconSize,
),
),
),
],
ArDriveDropdownItem(
onClick: () {
promptToShareDrive(
Expand Down

0 comments on commit f600ede

Please sign in to comment.