swb desktop layout tweaks

This commit is contained in:
julian 2022-11-07 16:30:17 -06:00
parent 3c627a5ddb
commit 2f6b1278fe
4 changed files with 115 additions and 88 deletions

View file

@ -157,7 +157,7 @@ class _RestoreFromFileViewState extends State<CreateBackupView> {
.textDark3), .textDark3),
), ),
), ),
// child, child,
const SizedBox(height: 20), const SizedBox(height: 20),
Row( Row(
children: [ children: [
@ -442,7 +442,7 @@ class _RestoreFromFileViewState extends State<CreateBackupView> {
const SizedBox( const SizedBox(
height: 16, height: 16,
), ),
const Spacer(), if (!isDesktop) const Spacer(),
TextButton( TextButton(
style: shouldEnableCreate style: shouldEnableCreate
? Theme.of(context) ? Theme.of(context)

View file

@ -142,7 +142,7 @@ class _RestoreFromFileViewState extends ConsumerState<RestoreFromFileView> {
textAlign: TextAlign.left, textAlign: TextAlign.left,
), ),
), ),
// child, child,
const SizedBox(height: 20), const SizedBox(height: 20),
Row( Row(
children: [ children: [
@ -285,7 +285,7 @@ class _RestoreFromFileViewState extends ConsumerState<RestoreFromFileView> {
const SizedBox( const SizedBox(
height: 16, height: 16,
), ),
const Spacer(), if (!isDesktop) const Spacer(),
TextButton( TextButton(
style: passwordController.text.isEmpty || style: passwordController.text.isEmpty ||
fileLocationController.text.isEmpty fileLocationController.text.isEmpty

View file

@ -64,48 +64,56 @@ class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
height: 48, height: 48,
), ),
Center( Center(
child: Padding( child: Row(
padding: const EdgeInsets.all(10), children: [
child: RichText( Expanded(
textAlign: TextAlign.start, child: Padding(
text: TextSpan( padding: const EdgeInsets.all(10),
children: [ child: RichText(
TextSpan( textAlign: TextAlign.start,
text: "Auto Backup", text: TextSpan(
style: children: [
STextStyles.desktopTextSmall(context), TextSpan(
text: "Auto Backup",
style: STextStyles.desktopTextSmall(
context),
),
TextSpan(
text:
"\n\nAuto backup is a custom Stack Wallet feature that offers a convenient backup of your data."
"To ensure maximum security, we recommend using a unique password that you haven't used anywhere "
"else on the internet before. Your password is not stored.",
style: STextStyles
.desktopTextExtraExtraSmall(
context),
),
TextSpan(
text:
"\n\nFor more information, please see our website ",
style: STextStyles
.desktopTextExtraExtraSmall(
context),
),
TextSpan(
text: "stackwallet.com",
style: STextStyles.richLink(context)
.copyWith(fontSize: 14),
recognizer: TapGestureRecognizer()
..onTap = () {
launchUrl(
Uri.parse(
"https://stackwallet.com/"),
mode: LaunchMode
.externalApplication,
);
},
),
],
),
), ),
TextSpan( ),
text:
"\n\nAuto backup is a custom Stack Wallet feature that offers a convenient backup of your data."
"To ensure maximum security, we recommend using a unique password that you haven't used anywhere "
"else on the internet before. Your password is not stored.",
style: STextStyles
.desktopTextExtraExtraSmall(context),
),
TextSpan(
text:
"\n\nFor more information, please see our website ",
style: STextStyles
.desktopTextExtraExtraSmall(context),
),
TextSpan(
text: "stackwallet.com",
style: STextStyles.richLink(context)
.copyWith(fontSize: 14),
recognizer: TapGestureRecognizer()
..onTap = () {
launchUrl(
Uri.parse(
"https://stackwallet.com/"),
mode:
LaunchMode.externalApplication,
);
},
),
],
), ),
), ],
), ),
), ),
Column( Column(
@ -148,39 +156,49 @@ class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
), ),
Center( Center(
child: Padding( child: Row(
padding: const EdgeInsets.all(10), children: [
child: RichText( Expanded(
textAlign: TextAlign.start, child: Padding(
text: TextSpan( padding: const EdgeInsets.all(10),
children: [ child: RichText(
TextSpan( textAlign: TextAlign.start,
text: "Manual Backup", text: TextSpan(
style: children: [
STextStyles.desktopTextSmall(context), TextSpan(
text: "Manual Backup",
style: STextStyles.desktopTextSmall(
context),
),
TextSpan(
text:
"\n\nCreate manual backup to easily transfer your data between devices. "
"You will create a backup file that can be later used in the Restore option. "
"Use a strong password to encrypt your data.",
style: STextStyles
.desktopTextExtraExtraSmall(
context),
),
],
),
), ),
TextSpan( ),
text:
"\n\nCreate manual backup to easily transfer your data between devices. "
"You will create a backup file that can be later used in the Restore option. "
"Use a strong password to encrypt your data.",
style: STextStyles
.desktopTextExtraExtraSmall(context),
),
],
), ),
), ],
), ),
), ),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Padding(
padding: EdgeInsets.all( padding: const EdgeInsets.all(
10, 10,
), ),
child: createBackup child: createBackup
? const CreateBackupView() ? const SizedBox(
width: 512,
child: CreateBackupView(),
)
: PrimaryButton( : PrimaryButton(
desktopMed: true, desktopMed: true,
width: 200, width: 200,
@ -217,27 +235,34 @@ class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
), ),
Center( Center(
child: Padding( child: Row(
padding: const EdgeInsets.all(10), children: [
child: RichText( Expanded(
textAlign: TextAlign.start, child: Padding(
text: TextSpan( padding: const EdgeInsets.all(10),
children: [ child: RichText(
TextSpan( textAlign: TextAlign.start,
text: "Restore Backup", text: TextSpan(
style: children: [
STextStyles.desktopTextSmall(context), TextSpan(
text: "Restore Backup",
style: STextStyles.desktopTextSmall(
context),
),
TextSpan(
text:
"\n\nUse your Stack Wallet backup file to restore your wallets, address book "
"and wallet preferences.",
style: STextStyles
.desktopTextExtraExtraSmall(
context),
),
],
),
), ),
TextSpan( ),
text:
"\n\nUse your Stack Wallet backup file to restore your wallets, address book "
"and wallet preferences.",
style: STextStyles
.desktopTextExtraExtraSmall(context),
),
],
), ),
), ],
), ),
), ),
Column( Column(
@ -248,7 +273,10 @@ class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
10, 10,
), ),
child: restoreBackup child: restoreBackup
? RestoreFromFileView() ? const SizedBox(
width: 512,
child: RestoreFromFileView(),
)
: PrimaryButton( : PrimaryButton(
desktopMed: true, desktopMed: true,
width: 200, width: 200,

View file

@ -61,8 +61,7 @@ class EnableBackupDialog extends StatelessWidget {
child: SecondaryButton( child: SecondaryButton(
label: "Cancel", label: "Cancel",
onPressed: () { onPressed: () {
int count = 0; Navigator.of(context).pop();
Navigator.of(context).popUntil((_) => count++ >= 2);
}, },
), ),
), ),