mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
desktop dialog for cancel stack restore
This commit is contained in:
parent
de896d30bc
commit
7a0ef96851
1 changed files with 93 additions and 31 deletions
|
@ -1,6 +1,11 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
|
||||
import 'package:stackwallet/widgets/desktop/primary_button.dart';
|
||||
import 'package:stackwallet/widgets/desktop/secondary_button.dart';
|
||||
import 'package:stackwallet/widgets/rounded_container.dart';
|
||||
import 'package:stackwallet/widgets/stack_dialog.dart';
|
||||
|
||||
class CancelStackRestoreDialog extends StatelessWidget {
|
||||
|
@ -14,7 +19,8 @@ class CancelStackRestoreDialog extends StatelessWidget {
|
|||
onWillPop: () async {
|
||||
return false;
|
||||
},
|
||||
child: StackDialog(
|
||||
child: !Util.isDesktop
|
||||
? StackDialog(
|
||||
title: "Cancel restore process",
|
||||
message:
|
||||
"Cancelling will revert any changes that may have been applied",
|
||||
|
@ -37,14 +43,70 @@ class CancelStackRestoreDialog extends StatelessWidget {
|
|||
child: Text(
|
||||
"Yes, cancel",
|
||||
style: STextStyles.itemSubtitle12(context).copyWith(
|
||||
color:
|
||||
Theme.of(context).extension<StackColors>()!.buttonTextPrimary,
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.buttonTextPrimary,
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(true);
|
||||
},
|
||||
),
|
||||
)
|
||||
: DesktopDialog(
|
||||
maxHeight: 250,
|
||||
maxWidth: 600,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 20, left: 32, right: 32, bottom: 20),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
"Cancel Restore Process",
|
||||
style: STextStyles.desktopH3(context),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
SizedBox(
|
||||
width: 500,
|
||||
child: RoundedContainer(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.snackBarBackError,
|
||||
child: Text(
|
||||
"If you cancel, the restore will not complete, and "
|
||||
"the wallets will not appear in your Stack.",
|
||||
style: STextStyles.desktopTextMedium(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SecondaryButton(
|
||||
width: 248,
|
||||
desktopMed: true,
|
||||
enabled: true,
|
||||
label: "Keep restoring",
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(false);
|
||||
},
|
||||
),
|
||||
const SizedBox(width: 20),
|
||||
PrimaryButton(
|
||||
width: 248,
|
||||
desktopMed: true,
|
||||
enabled: true,
|
||||
label: "Cancel anyway",
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(true);
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue