mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-16 17:27:39 +00:00
Refactor "Do not close this window." message out of FusionProgress
This commit is contained in:
parent
8c1df0f2cf
commit
7e9baccedb
3 changed files with 39 additions and 32 deletions
|
@ -138,8 +138,23 @@ class _FusionProgressViewState extends ConsumerState<FusionProgressView> {
|
|||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
children: [
|
||||
// TODO if (_succeeded but roundCount > roundCount)
|
||||
// show "Fusion completed" as snackBarBackSuccess.
|
||||
if (_fusionRoundsCompleted == 0)
|
||||
RoundedContainer(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.snackBarBackError,
|
||||
child: Text(
|
||||
"Do not close this window. If you exit, "
|
||||
"the process will be canceled.",
|
||||
style:
|
||||
STextStyles.smallMed14(context).copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.snackBarTextError,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
if (_fusionRoundsCompleted > 0)
|
||||
Expanded(
|
||||
child: RoundedContainer(
|
||||
|
@ -158,10 +173,9 @@ class _FusionProgressViewState extends ConsumerState<FusionProgressView> {
|
|||
),
|
||||
),
|
||||
),
|
||||
if (_fusionRoundsCompleted > 0)
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
FusionProgress(
|
||||
walletId: widget.walletId,
|
||||
),
|
||||
|
|
|
@ -183,6 +183,22 @@ class _FusionDialogViewState extends ConsumerState<FusionDialogView> {
|
|||
),
|
||||
child: Column(
|
||||
children: [
|
||||
if (_fusionRoundsCompleted == 0)
|
||||
RoundedContainer(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.snackBarBackError,
|
||||
child: Text(
|
||||
"Do not close this window. If you exit, "
|
||||
"the process will be canceled.",
|
||||
style: STextStyles.smallMed14(context).copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.snackBarTextError,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
if (_fusionRoundsCompleted > 0)
|
||||
/*Expanded(
|
||||
child: */
|
||||
|
@ -201,10 +217,9 @@ class _FusionDialogViewState extends ConsumerState<FusionDialogView> {
|
|||
),
|
||||
),
|
||||
// ),
|
||||
if (_fusionRoundsCompleted > 0)
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
FusionProgress(
|
||||
walletId: widget.walletId,
|
||||
),
|
||||
|
|
|
@ -21,28 +21,6 @@ class FusionProgress extends ConsumerWidget {
|
|||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
RoundedContainer(
|
||||
color: Theme.of(context).extension<StackColors>()!.snackBarBackError,
|
||||
child: Text(
|
||||
"Do not close this window. If you exit, "
|
||||
"the process will be canceled.",
|
||||
style: Util.isDesktop
|
||||
? STextStyles.smallMed14(context).copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.snackBarTextError,
|
||||
)
|
||||
: STextStyles.w500_14(context).copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.snackBarTextError,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
_ProgressItem(
|
||||
iconAsset: Assets.svg.node,
|
||||
label: "Connecting to server",
|
||||
|
|
Loading…
Reference in a new issue