From 867b02428521079bccca2b4c5ddb0991adf157b9 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 2 Jul 2024 23:26:17 +0800 Subject: [PATCH] :bug: Bug fixes in sign up --- ios/Runner/AppDelegate.swift | 1 - lib/screens/auth/signup.dart | 6 +++--- lib/translations.dart | 11 +++++++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index e41fd37..915bf79 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -13,6 +13,5 @@ import Flutter override func applicationDidBecomeActive(_ application: UIApplication) { application.applicationIconBadgeNumber = 0; - UNUserNotificationCenter.current().removeAllDeliveredNotifications(); } } diff --git a/lib/screens/auth/signup.dart b/lib/screens/auth/signup.dart index 062d355..572bf65 100644 --- a/lib/screens/auth/signup.dart +++ b/lib/screens/auth/signup.dart @@ -20,7 +20,7 @@ class _SignUpPopupState extends State { void performAction(BuildContext context) async { final email = _emailController.value.text; final username = _usernameController.value.text; - final nickname = _passwordController.value.text; + final nickname = _nicknameController.value.text; final password = _passwordController.value.text; if (email.isEmpty || username.isEmpty || @@ -45,14 +45,14 @@ class _SignUpPopupState extends State { content: Text('signupDoneCaption'.tr), actions: [ TextButton( - child: Text('confirmOkay'.tr), + child: Text('okay'.tr), onPressed: () => Navigator.pop(context), ), ], ); }, ).then((_) { - AppRouter.instance.replaceNamed('auth.sign-in'); + Navigator.pop(context); }); } else { context.showErrorDialog(resp.bodyString); diff --git a/lib/translations.dart b/lib/translations.dart index b44eb40..0c09f3a 100644 --- a/lib/translations.dart +++ b/lib/translations.dart @@ -58,12 +58,17 @@ class SolianMessages extends Translations { 'Sign in to create post, start a realm, message your friend and more!', 'signinRiskDetected': 'Risk detected, click Next to open a webpage and signin through it to pass security check.', - 'signinResetPasswordHint': 'Please enter username to request reset password.', - 'signinResetPasswordSent': 'Reset password request sent, check your inbox!', + 'signinResetPasswordHint': + 'Please enter username to request reset password.', + 'signinResetPasswordSent': + 'Reset password request sent, check your inbox!', 'signup': 'Sign up', 'signupGreeting': 'Welcome onboard', 'signupCaption': 'Create an account on Solarpass and then get the access of entire Solar Network!', + 'signupDone': 'Sign up successfully.', + 'signupDoneCaption': + 'You successfully created an account on Solar Network. Now go sign in!', 'signout': 'Sign out', 'joinedAt': 'Joined at @date', 'riskDetection': 'Risk Detected', @@ -300,6 +305,8 @@ class SolianMessages extends Translations { 'signup': '注册', 'signupGreeting': '欢迎加入\nSolar Network', 'signupCaption': '在 Solarpass 注册一个账号以获得整个 Solar Network 的存取权!', + 'signupDone': '注册成功', + 'signupDoneCaption': '你成功地注册了一个帐户,现在去尝试登陆吧!', 'signout': '登出', 'joinedAt': '加入于 @date', 'riskDetection': '检测到风险',