mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 03:49:22 +00:00
desktop forgot password ui
This commit is contained in:
parent
cede571350
commit
97b4407957
3 changed files with 112 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/forgot_password_desktop_view.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/home/desktop_home_view.dart';
|
||||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
|
@ -168,7 +169,9 @@ class _DesktopLoginViewState extends State<DesktopLoginView> {
|
|||
text: "Forgot password?",
|
||||
textSize: 20,
|
||||
onTap: () {
|
||||
// todo: new screen
|
||||
Navigator.of(context).pushNamed(
|
||||
ForgotPasswordDesktopView.routeName,
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
|
|
101
lib/pages_desktop_specific/forgot_password_desktop_view.dart
Normal file
101
lib/pages_desktop_specific/forgot_password_desktop_view.dart
Normal file
|
@ -0,0 +1,101 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
||||
import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
|
||||
import 'package:stackwallet/widgets/desktop/primary_button.dart';
|
||||
import 'package:stackwallet/widgets/desktop/secondary_button.dart';
|
||||
|
||||
class ForgotPasswordDesktopView extends StatefulWidget {
|
||||
const ForgotPasswordDesktopView({
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
|
||||
static const String routeName = "/forgotPasswordDesktop";
|
||||
|
||||
@override
|
||||
State<ForgotPasswordDesktopView> createState() =>
|
||||
_ForgotPasswordDesktopViewState();
|
||||
}
|
||||
|
||||
class _ForgotPasswordDesktopViewState extends State<ForgotPasswordDesktopView> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DesktopScaffold(
|
||||
appBar: DesktopAppBar(
|
||||
leading: AppBarBackButton(
|
||||
onPressed: () async {
|
||||
if (mounted) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
},
|
||||
),
|
||||
isCompactHeight: false,
|
||||
),
|
||||
body: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 480,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
Assets.svg.stackIcon(context),
|
||||
width: 100,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 42,
|
||||
),
|
||||
Text(
|
||||
"Stack Wallet",
|
||||
style: STextStyles.desktopH1(context),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 24,
|
||||
),
|
||||
SizedBox(
|
||||
width: 400,
|
||||
child: Text(
|
||||
"Stack Wallet does not store your password. Create new wallet or use a Stack backup file to restore your wallet.",
|
||||
textAlign: TextAlign.center,
|
||||
style: STextStyles.desktopTextSmall(context).copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textSubtitle1,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 48,
|
||||
),
|
||||
PrimaryButton(
|
||||
label: "Create new wallet",
|
||||
onPressed: () {
|
||||
// // todo delete everything and start fresh?
|
||||
},
|
||||
),
|
||||
const SizedBox(
|
||||
height: 24,
|
||||
),
|
||||
SecondaryButton(
|
||||
label: "Restore from backup",
|
||||
onPressed: () {
|
||||
// todo SWB restore
|
||||
},
|
||||
),
|
||||
const SizedBox(
|
||||
height: kDesktopAppBarHeight,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -85,6 +85,7 @@ import 'package:stackwallet/pages/wallet_view/transaction_views/transaction_sear
|
|||
import 'package:stackwallet/pages/wallet_view/wallet_view.dart';
|
||||
import 'package:stackwallet/pages/wallets_view/wallets_view.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/create_password/create_password_view.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/forgot_password_desktop_view.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/home/desktop_home_view.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/home/desktop_settings_view.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/my_stack_view.dart';
|
||||
|
@ -998,6 +999,12 @@ class RouteGenerator {
|
|||
builder: (_) => const CreatePasswordView(),
|
||||
settings: RouteSettings(name: settings.name));
|
||||
|
||||
case ForgotPasswordDesktopView.routeName:
|
||||
return getRoute(
|
||||
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||
builder: (_) => const ForgotPasswordDesktopView(),
|
||||
settings: RouteSettings(name: settings.name));
|
||||
|
||||
case DesktopHomeView.routeName:
|
||||
return getRoute(
|
||||
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||
|
|
Loading…
Reference in a new issue