Fix title for login-screen (#690)
Was a norma label, is the _real_ title now
This commit is contained in:
parent
023e70ebcb
commit
485ecc8e57
|
@ -13,9 +13,7 @@ class MastodonLoginView: UIView {
|
||||||
|
|
||||||
// List with (filtered) domains
|
// List with (filtered) domains
|
||||||
|
|
||||||
let titleLabel: UILabel
|
let explanationTextLabel: UILabel
|
||||||
let subtitleLabel: UILabel
|
|
||||||
private let headerStackView: UIStackView
|
|
||||||
|
|
||||||
let searchTextField: UITextField
|
let searchTextField: UITextField
|
||||||
private let searchTextFieldLeftView: UIView
|
private let searchTextFieldLeftView: UIView
|
||||||
|
@ -28,22 +26,12 @@ class MastodonLoginView: UIView {
|
||||||
|
|
||||||
override init(frame: CGRect) {
|
override init(frame: CGRect) {
|
||||||
|
|
||||||
titleLabel = UILabel()
|
explanationTextLabel = UILabel()
|
||||||
titleLabel.font = MastodonLoginViewController.largeTitleFont
|
explanationTextLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||||
titleLabel.textColor = MastodonLoginViewController.largeTitleTextColor
|
explanationTextLabel.font = MastodonLoginViewController.subTitleFont
|
||||||
titleLabel.text = L10n.Scene.Login.title
|
explanationTextLabel.textColor = MastodonLoginViewController.subTitleTextColor
|
||||||
titleLabel.numberOfLines = 0
|
explanationTextLabel.text = L10n.Scene.Login.subtitle
|
||||||
|
explanationTextLabel.numberOfLines = 0
|
||||||
subtitleLabel = UILabel()
|
|
||||||
subtitleLabel.font = MastodonLoginViewController.subTitleFont
|
|
||||||
subtitleLabel.textColor = MastodonLoginViewController.subTitleTextColor
|
|
||||||
subtitleLabel.text = L10n.Scene.Login.subtitle
|
|
||||||
subtitleLabel.numberOfLines = 0
|
|
||||||
|
|
||||||
headerStackView = UIStackView(arrangedSubviews: [titleLabel, subtitleLabel])
|
|
||||||
headerStackView.axis = .vertical
|
|
||||||
headerStackView.spacing = 16
|
|
||||||
headerStackView.translatesAutoresizingMaskIntoConstraints = false
|
|
||||||
|
|
||||||
searchTextFieldMagnifyingGlass = UIImageView(image: UIImage(
|
searchTextFieldMagnifyingGlass = UIImageView(image: UIImage(
|
||||||
systemName: "magnifyingglass",
|
systemName: "magnifyingglass",
|
||||||
|
@ -81,7 +69,7 @@ class MastodonLoginView: UIView {
|
||||||
|
|
||||||
super.init(frame: frame)
|
super.init(frame: frame)
|
||||||
|
|
||||||
addSubview(headerStackView)
|
addSubview(explanationTextLabel)
|
||||||
addSubview(searchTextField)
|
addSubview(searchTextField)
|
||||||
addSubview(tableView)
|
addSubview(tableView)
|
||||||
addSubview(navigationActionView)
|
addSubview(navigationActionView)
|
||||||
|
@ -99,12 +87,11 @@ class MastodonLoginView: UIView {
|
||||||
let bottomConstraint = safeAreaLayoutGuide.bottomAnchor.constraint(equalTo: navigationActionView.bottomAnchor)
|
let bottomConstraint = safeAreaLayoutGuide.bottomAnchor.constraint(equalTo: navigationActionView.bottomAnchor)
|
||||||
|
|
||||||
let constraints = [
|
let constraints = [
|
||||||
|
explanationTextLabel.topAnchor.constraint(equalTo: safeAreaLayoutGuide.topAnchor),
|
||||||
|
explanationTextLabel.leadingAnchor.constraint(equalTo: readableContentGuide.leadingAnchor),
|
||||||
|
explanationTextLabel.trailingAnchor.constraint(equalTo: readableContentGuide.trailingAnchor),
|
||||||
|
|
||||||
headerStackView.topAnchor.constraint(equalTo: safeAreaLayoutGuide.topAnchor),
|
searchTextField.topAnchor.constraint(equalTo: explanationTextLabel.bottomAnchor, constant: 32),
|
||||||
headerStackView.leadingAnchor.constraint(equalTo: readableContentGuide.leadingAnchor),
|
|
||||||
headerStackView.trailingAnchor.constraint(equalTo: readableContentGuide.trailingAnchor),
|
|
||||||
|
|
||||||
searchTextField.topAnchor.constraint(equalTo: headerStackView.bottomAnchor, constant: 32),
|
|
||||||
searchTextField.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 16),
|
searchTextField.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 16),
|
||||||
searchTextField.heightAnchor.constraint(equalToConstant: 55),
|
searchTextField.heightAnchor.constraint(equalToConstant: 55),
|
||||||
trailingAnchor.constraint(equalTo: searchTextField.trailingAnchor, constant: 16),
|
trailingAnchor.constraint(equalTo: searchTextField.trailingAnchor, constant: 16),
|
||||||
|
|
|
@ -11,6 +11,7 @@ import MastodonCore
|
||||||
import MastodonAsset
|
import MastodonAsset
|
||||||
import Combine
|
import Combine
|
||||||
import AuthenticationServices
|
import AuthenticationServices
|
||||||
|
import MastodonLocalization
|
||||||
|
|
||||||
protocol MastodonLoginViewControllerDelegate: AnyObject {
|
protocol MastodonLoginViewControllerDelegate: AnyObject {
|
||||||
func backButtonPressed(_ viewController: MastodonLoginViewController)
|
func backButtonPressed(_ viewController: MastodonLoginViewController)
|
||||||
|
@ -97,6 +98,9 @@ class MastodonLoginViewController: UIViewController, NeedsDependency {
|
||||||
|
|
||||||
defer { setupNavigationBarBackgroundView() }
|
defer { setupNavigationBarBackgroundView() }
|
||||||
setupOnboardingAppearance()
|
setupOnboardingAppearance()
|
||||||
|
|
||||||
|
title = L10n.Scene.Login.title
|
||||||
|
navigationItem.hidesBackButton = true
|
||||||
}
|
}
|
||||||
|
|
||||||
override func viewWillAppear(_ animated: Bool) {
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
|
|
Loading…
Reference in New Issue