Address registration design feedback

This commit is contained in:
Pete Walters 2025-09-23 14:11:59 -05:00 committed by GitHub
parent 8c3e299a90
commit 973e5f0c8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
16 changed files with 79 additions and 10 deletions

View File

@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "Continue 48.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "No Phone 48.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "QR Code 48.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "Signal Backups 48.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "Transfer 48.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -8,6 +8,7 @@ import SignalUI
class RegistrationChoiceButton: OWSFlatButton
{
var iconView: UIImageView?
let titleLabel = UILabel()
let bodyLabel = UILabel()
let disclosureView = UILabel()
@ -25,7 +26,7 @@ class RegistrationChoiceButton: OWSFlatButton
// Icon
let iconContainer = UIView()
let iconView = UIImageView(image: UIImage(named: iconName))
let iconView = UIImageView(image: UIImage(named: iconName)?.withRenderingMode(.alwaysTemplate))
iconView.contentMode = .scaleAspectFit
iconContainer.addSubview(iconView)
iconContainer.autoSetDimensions(to: CGSize(square: 48))
@ -35,6 +36,7 @@ class RegistrationChoiceButton: OWSFlatButton
} else {
iconView.autoPinEdgesToSuperviewEdges()
}
self.iconView = iconView
// Labels
@ -91,5 +93,6 @@ class RegistrationChoiceButton: OWSFlatButton
// Unfortunately, these don't update automatically because they're
// being converted to images for UIButton's background API.
setBackgroundColors(upColor: UIColor.Signal.quaternaryFill, downColor: UIColor.Signal.tertiaryFill)
iconView?.tintColor = UIColor.Signal.ultramarine
}
}

View File

@ -76,8 +76,8 @@ class RegistrationChooseRestoreMethodViewController: OWSViewController {
"ONBOARDING_CHOOSE_RESTORE_METHOD_BACKUPS_BODY",
comment: "The body for the device transfer 'choice' view 'transfer' option"
),
iconName: "backup-light",
iconSize: 32,
iconName: "signal-backups-48",
iconSize: 48,
selector: #selector(didSelectRestoreFromBackup)
)
@ -90,7 +90,7 @@ class RegistrationChooseRestoreMethodViewController: OWSViewController {
"ONBOARDING_CHOOSE_RESTORE_METHOD_TRANSFER_BODY",
comment: "The body for the device transfer 'choice' view 'transfer' option"
),
iconName: Theme.iconName(.transfer),
iconName: "transfer-48",
selector: #selector(didSelectDeviceTransfer)
)
@ -103,7 +103,7 @@ class RegistrationChooseRestoreMethodViewController: OWSViewController {
"ONBOARDING_CHOOSE_RESTORE_METHOD_SKIP_RESTORE_BODY",
comment: "The body for the skip restore 'choice' option"
),
iconName: Theme.iconName(.register),
iconName: "continue-48",
selector: #selector(didSkipRestore)
)

View File

@ -120,13 +120,13 @@ class RegistrationEnterAccountEntropyPoolViewController: EnterAccountEntropyPool
self?.presenter?.forgotKeyAction()
}
},
secondaryButton: .init(title: CommonStrings.learnMore) { [weak self] sheet in
secondaryButton: .init(title: CommonStrings.learnMore, style: .secondary, action: .custom({ [weak self] sheet in
guard let self else { return }
let vc = SFSafariViewController(url: URL.Support.backups)
self.dismiss(animated: true) {
self.present(vc, animated: true, completion: nil)
}
}
}))
)
self.present(sheet, animated: true)
}

View File

@ -238,7 +238,7 @@ private class RestoreOrTransferPickerController: StackSheetViewController {
"ONBOARDING_SPLASH_HAVE_OLD_DEVICE_BODY",
comment: "Explanation of 'have old device' flow for the 'Restore or Transfer' prompt"
),
iconName: Theme.iconName(.qrCodeLight)
iconName: "qr-code-48"
)
hasDeviceButton.addTarget(target: self, selector: #selector(hasDevice))
stackView.addArrangedSubview(hasDeviceButton)
@ -252,7 +252,7 @@ private class RestoreOrTransferPickerController: StackSheetViewController {
"ONBOARDING_SPLASH_DO_NOT_HAVE_OLD_DEVICE_BODY",
comment: "Explanation of 'do not have old device' flow for the 'Restore or Transfer' prompt"
),
iconName: Theme.iconName(.noDevice)
iconName: "no-phone-48"
)
noDeviceButton.addTarget(target: self, selector: #selector(noDevice))
stackView.addArrangedSubview(noDeviceButton)

View File

@ -5537,7 +5537,7 @@
"ONBOARDING_2FA_SKIP_PIN_ENTRY_TITLE" = "Skip PIN Entry?";
/* The body for the device transfer 'choice' view 'transfer' option */
"ONBOARDING_CHOOSE_RESTORE_METHOD_BACKUPS_BODY" = "Restore your text messages and media from your paid Signal backup plan";
"ONBOARDING_CHOOSE_RESTORE_METHOD_BACKUPS_BODY" = "Restore your account and messages from your Signal Backup";
/* The title for the device transfer 'choice' view 'transfer' option */
"ONBOARDING_CHOOSE_RESTORE_METHOD_BACKUPS_TITLE" = "Restore Signal Backup";