chore: update search textfield and sign up button text

This commit is contained in:
CMK 2022-05-23 11:17:26 +08:00
parent e1c670a7ed
commit 250de39972
2 changed files with 10 additions and 7 deletions

View File

@ -96,11 +96,13 @@ final class PickServerServerSectionTableHeaderView: UIView {
textField.tintColor = Asset.Colors.Label.primary.color
textField.textColor = Asset.Colors.Label.primary.color
textField.adjustsFontForContentSizeCategory = true
textField.attributedPlaceholder =
NSAttributedString(
string: L10n.Scene.ServerPicker.Input.placeholder,
attributes: [.font: UIFont.systemFont(ofSize: 15, weight: .regular),
.foregroundColor: Asset.Colors.Label.secondary.color.withAlphaComponent(0.6)])
textField.attributedPlaceholder = NSAttributedString(
string: L10n.Scene.ServerPicker.Input.searchServersOrEnterUrl,
attributes: [
.font: UIFont.systemFont(ofSize: 15, weight: .regular),
.foregroundColor: Asset.Colors.Label.secondary.color.withAlphaComponent(0.6)
]
)
textField.clearButtonMode = .whileEditing
textField.autocapitalizationType = .none
textField.autocorrectionType = .no

View File

@ -50,7 +50,8 @@ final class WelcomeViewController: UIViewController, NeedsDependency {
private(set) lazy var signUpButton: PrimaryActionButton = {
let button = PrimaryActionButton()
button.adjustsBackgroundImageWhenUserInterfaceStyleChanges = false
button.setTitle(L10n.Scene.Welcome.getStarted, for: .normal)
button.titleLabel?.font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 17, weight: .semibold))
button.setTitle(L10n.Common.Controls.Actions.signUp, for: .normal)
let backgroundImageColor: UIColor = .white
let backgroundImageHighlightedColor: UIColor = UIColor(white: 0.8, alpha: 1.0)
button.setBackgroundImage(.placeholder(color: backgroundImageColor), for: .normal)
@ -63,7 +64,7 @@ final class WelcomeViewController: UIViewController, NeedsDependency {
private(set) lazy var signInButton: PrimaryActionButton = {
let button = PrimaryActionButton()
button.adjustsBackgroundImageWhenUserInterfaceStyleChanges = false
button.titleLabel?.font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 15, weight: .semibold))
button.titleLabel?.font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 17, weight: .semibold))
button.setTitle(L10n.Scene.Welcome.logIn, for: .normal)
let backgroundImageColor = Asset.Scene.Welcome.signInButtonBackground.color
let backgroundImageHighlightedColor = Asset.Scene.Welcome.signInButtonBackground.color.withAlphaComponent(0.8)