Commit 25b02d6c authored by Thomas Markiewicz's avatar Thomas Markiewicz

Added register and forgot passphrase buttons to the login screen

parent 3c8626c6
Pipeline #35369 passed with stage
in 15 minutes and 5 seconds
......@@ -66,7 +66,7 @@
"auth_login_single_sign_on" = "Sign in with single sign-on";
"auth_send_reset_email" = "Send Reset Email";
"auth_return_to_login" = "Return to login screen";
"auth_user_id_placeholder" = "Librem One address";
"auth_user_id_placeholder" = "name@librem.one";
"auth_password_placeholder" = "Passphrase";
"auth_new_password_placeholder" = "New password";
"auth_user_name_placeholder" = "User name";
......@@ -97,7 +97,7 @@
"auth_untrusted_id_server" = "The identity server is not trusted";
"auth_password_dont_match" = "Passwords don't match";
"auth_username_in_use" = "Username in use";
"auth_forgot_password" = "Forgot password?";
"auth_forgot_password" = "Forgot passphrase?";
"auth_email_not_found" = "Failed to send email: This email address was not found";
"auth_use_server_options" = "Use custom server options (advanced)";
"auth_email_validation_message" = "Please check your email to continue registration";
......
......@@ -70,7 +70,7 @@ internal enum VectorL10n {
internal static var authEmailValidationMessage: String {
return VectorL10n.tr("Vector", "auth_email_validation_message")
}
/// Forgot password?
/// Forgot passphrase?
internal static var authForgotPassword: String {
return VectorL10n.tr("Vector", "auth_forgot_password")
}
......@@ -286,7 +286,7 @@ internal enum VectorL10n {
internal static var authUseServerOptions: String {
return VectorL10n.tr("Vector", "auth_use_server_options")
}
/// Librem One address
/// name@librem.one
internal static var authUserIdPlaceholder: String {
return VectorL10n.tr("Vector", "auth_user_id_placeholder")
}
......
......@@ -29,6 +29,7 @@
@property (weak, nonatomic) IBOutlet UIButton *skipButton;
@property (weak, nonatomic) IBOutlet UIButton *forgotPasswordButton;
@property (weak, nonatomic) IBOutlet UIButton *registerButton;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *submitButtonMinLeadingConstraint;
......
/*
Copyright 2015 OpenMarket Ltd
Copyright 2015 OpenMarket Ltdx
Copyright 2017 Vector Creations Ltd
Copyright 2019 New Vector Ltd
......@@ -193,6 +193,14 @@
self.noFlowLabel.textColor = ThemeService.shared.theme.warningColor;
// register button
NSMutableAttributedString *registerButtonTitle = [[NSMutableAttributedString alloc] initWithString:NSLocalizedStringFromTable(@"auth_register", @"Vector", nil)];
[registerButtonTitle addAttribute:NSUnderlineStyleAttributeName value:@(NSUnderlineStyleSingle) range:NSMakeRange(0, registerButtonTitle.length)];
[registerButtonTitle addAttribute:NSForegroundColorAttributeName value:ThemeService.shared.theme.tintColor range:NSMakeRange(0, registerButtonTitle.length)];
[self.registerButton setAttributedTitle:registerButtonTitle forState:UIControlStateNormal];
[self.registerButton setAttributedTitle:registerButtonTitle forState:UIControlStateHighlighted];
// forgot passphrase button
NSMutableAttributedString *forgotPasswordTitle = [[NSMutableAttributedString alloc] initWithString:NSLocalizedStringFromTable(@"auth_forgot_password", @"Vector", nil)];
[forgotPasswordTitle addAttribute:NSUnderlineStyleAttributeName value:@(NSUnderlineStyleSingle) range:NSMakeRange(0, forgotPasswordTitle.length)];
[forgotPasswordTitle addAttribute:NSForegroundColorAttributeName value:ThemeService.shared.theme.tintColor range:NSMakeRange(0, forgotPasswordTitle.length)];
......@@ -665,6 +673,10 @@
{
[self hideCustomServers:!self.customServersContainer.hidden];
}
else if (sender == self.registerButton) {
NSURL *url = [NSURL URLWithString:@"https://librem.one"];
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
}
else if (sender == self.forgotPasswordButton)
{
// Update UI to reset password
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment