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),
|
padding: const EdgeInsets.all(16),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// TODO if (_succeeded but roundCount > roundCount)
|
if (_fusionRoundsCompleted == 0)
|
||||||
// show "Fusion completed" as snackBarBackSuccess.
|
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)
|
if (_fusionRoundsCompleted > 0)
|
||||||
Expanded(
|
Expanded(
|
||||||
child: RoundedContainer(
|
child: RoundedContainer(
|
||||||
|
@ -158,10 +173,9 @@ class _FusionProgressViewState extends ConsumerState<FusionProgressView> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (_fusionRoundsCompleted > 0)
|
const SizedBox(
|
||||||
const SizedBox(
|
height: 20,
|
||||||
height: 20,
|
),
|
||||||
),
|
|
||||||
FusionProgress(
|
FusionProgress(
|
||||||
walletId: widget.walletId,
|
walletId: widget.walletId,
|
||||||
),
|
),
|
||||||
|
|
|
@ -183,6 +183,22 @@ class _FusionDialogViewState extends ConsumerState<FusionDialogView> {
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
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)
|
if (_fusionRoundsCompleted > 0)
|
||||||
/*Expanded(
|
/*Expanded(
|
||||||
child: */
|
child: */
|
||||||
|
@ -201,10 +217,9 @@ class _FusionDialogViewState extends ConsumerState<FusionDialogView> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// ),
|
// ),
|
||||||
if (_fusionRoundsCompleted > 0)
|
const SizedBox(
|
||||||
const SizedBox(
|
height: 20,
|
||||||
height: 20,
|
),
|
||||||
),
|
|
||||||
FusionProgress(
|
FusionProgress(
|
||||||
walletId: widget.walletId,
|
walletId: widget.walletId,
|
||||||
),
|
),
|
||||||
|
|
|
@ -21,28 +21,6 @@ class FusionProgress extends ConsumerWidget {
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
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(
|
_ProgressItem(
|
||||||
iconAsset: Assets.svg.node,
|
iconAsset: Assets.svg.node,
|
||||||
label: "Connecting to server",
|
label: "Connecting to server",
|
||||||
|
|
Loading…
Reference in a new issue