diff --git a/lib/app_shell.dart b/lib/app_shell.dart index 5a0ad88e1e..21e340d0bc 100644 --- a/lib/app_shell.dart +++ b/lib/app_shell.dart @@ -2,7 +2,7 @@ import 'package:ardrive/blocs/prompt_to_snapshot/prompt_to_snapshot_bloc.dart'; import 'package:ardrive/blocs/prompt_to_snapshot/prompt_to_snapshot_event.dart'; import 'package:ardrive/components/profile_card.dart'; import 'package:ardrive/components/side_bar.dart'; -import 'package:ardrive/drive_explorer/multi_thumbnail_creation/bloc/multi_thumbnail_creation_bloc.dart'; +import 'package:ardrive/drive_explorer/multi_thumbnail_creation/multi_thumbnail_creation_warn_modal.dart'; import 'package:ardrive/gift/reedem_button.dart'; import 'package:ardrive/misc/misc.dart'; import 'package:ardrive/pages/drive_detail/components/hover_widget.dart'; @@ -10,6 +10,7 @@ import 'package:ardrive/shared/blocs/banner/app_banner_bloc.dart'; import 'package:ardrive/sync/domain/cubit/sync_cubit.dart'; import 'package:ardrive/sync/domain/sync_progress.dart'; import 'package:ardrive/utils/logger.dart'; +import 'package:ardrive/utils/show_general_dialog.dart'; import 'package:ardrive/utils/size_constants.dart'; import 'package:ardrive_ui/ardrive_ui.dart'; import 'package:ardrive_utils/ardrive_utils.dart'; @@ -218,11 +219,9 @@ class AppShellState extends State { text: 'add them now!', recognizer: TapGestureRecognizer() ..onTap = () { - context - .read< - MultiThumbnailCreationBloc>() - .add( - const CreateMultiThumbnailForAllDrives()); + showArDriveDialog(context, + content: + const MultiThumbnailCreationWarningModal()); }, style: typography .paragraphNormal( diff --git a/lib/drive_explorer/multi_thumbnail_creation/multi_thumbnail_creation_warn_modal.dart b/lib/drive_explorer/multi_thumbnail_creation/multi_thumbnail_creation_warn_modal.dart new file mode 100644 index 0000000000..85d34b803e --- /dev/null +++ b/lib/drive_explorer/multi_thumbnail_creation/multi_thumbnail_creation_warn_modal.dart @@ -0,0 +1,34 @@ +import 'package:ardrive/drive_explorer/multi_thumbnail_creation/bloc/multi_thumbnail_creation_bloc.dart'; +import 'package:ardrive_ui/ardrive_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; + +class MultiThumbnailCreationWarningModal extends StatelessWidget { + const MultiThumbnailCreationWarningModal({super.key}); + + @override + Widget build(BuildContext context) { + return ArDriveStandardModalNew( + actions: [ + ModalAction( + action: () { + Navigator.of(context).pop(); + }, + title: 'Cancel', + ), + ModalAction( + action: () { + context + .read() + .add(const CreateMultiThumbnailForAllDrives()); + Navigator.of(context).pop(); + }, + title: 'Continue', + ), + ], + title: 'Create thumbnails', + description: + 'This will create thumnails for the images stored in all your public and private drives. You will not be charged!\nThis may take a while', + ); + } +} diff --git a/pubspec.yaml b/pubspec.yaml index 7ef5263b4e..6fd5ccdf74 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: Secure, permanent storage publish_to: 'none' -version: 2.49.0 +version: 2.49.1 environment: sdk: '>=3.2.0 <4.0.0'