🐛 Bug fixes in sign up

This commit is contained in:
LittleSheep 2024-07-02 23:26:17 +08:00
parent f1abdad54d
commit 867b024285
3 changed files with 12 additions and 6 deletions

View File

@ -13,6 +13,5 @@ import Flutter
override func applicationDidBecomeActive(_ application: UIApplication) { override func applicationDidBecomeActive(_ application: UIApplication) {
application.applicationIconBadgeNumber = 0; application.applicationIconBadgeNumber = 0;
UNUserNotificationCenter.current().removeAllDeliveredNotifications();
} }
} }

View File

@ -20,7 +20,7 @@ class _SignUpPopupState extends State<SignUpPopup> {
void performAction(BuildContext context) async { void performAction(BuildContext context) async {
final email = _emailController.value.text; final email = _emailController.value.text;
final username = _usernameController.value.text; final username = _usernameController.value.text;
final nickname = _passwordController.value.text; final nickname = _nicknameController.value.text;
final password = _passwordController.value.text; final password = _passwordController.value.text;
if (email.isEmpty || if (email.isEmpty ||
username.isEmpty || username.isEmpty ||
@ -45,14 +45,14 @@ class _SignUpPopupState extends State<SignUpPopup> {
content: Text('signupDoneCaption'.tr), content: Text('signupDoneCaption'.tr),
actions: [ actions: [
TextButton( TextButton(
child: Text('confirmOkay'.tr), child: Text('okay'.tr),
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
), ),
], ],
); );
}, },
).then((_) { ).then((_) {
AppRouter.instance.replaceNamed('auth.sign-in'); Navigator.pop(context);
}); });
} else { } else {
context.showErrorDialog(resp.bodyString); context.showErrorDialog(resp.bodyString);

View File

@ -58,12 +58,17 @@ class SolianMessages extends Translations {
'Sign in to create post, start a realm, message your friend and more!', 'Sign in to create post, start a realm, message your friend and more!',
'signinRiskDetected': 'signinRiskDetected':
'Risk detected, click Next to open a webpage and signin through it to pass security check.', 'Risk detected, click Next to open a webpage and signin through it to pass security check.',
'signinResetPasswordHint': 'Please enter username to request reset password.', 'signinResetPasswordHint':
'signinResetPasswordSent': 'Reset password request sent, check your inbox!', 'Please enter username to request reset password.',
'signinResetPasswordSent':
'Reset password request sent, check your inbox!',
'signup': 'Sign up', 'signup': 'Sign up',
'signupGreeting': 'Welcome onboard', 'signupGreeting': 'Welcome onboard',
'signupCaption': 'signupCaption':
'Create an account on Solarpass and then get the access of entire Solar Network!', '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', 'signout': 'Sign out',
'joinedAt': 'Joined at @date', 'joinedAt': 'Joined at @date',
'riskDetection': 'Risk Detected', 'riskDetection': 'Risk Detected',
@ -300,6 +305,8 @@ class SolianMessages extends Translations {
'signup': '注册', 'signup': '注册',
'signupGreeting': '欢迎加入\nSolar Network', 'signupGreeting': '欢迎加入\nSolar Network',
'signupCaption': '在 Solarpass 注册一个账号以获得整个 Solar Network 的存取权!', 'signupCaption': '在 Solarpass 注册一个账号以获得整个 Solar Network 的存取权!',
'signupDone': '注册成功',
'signupDoneCaption': '你成功地注册了一个帐户,现在去尝试登陆吧!',
'signout': '登出', 'signout': '登出',
'joinedAt': '加入于 @date', 'joinedAt': '加入于 @date',
'riskDetection': '检测到风险', 'riskDetection': '检测到风险',