Skip to content
Snippets Groups Projects
Commit 61f90265 authored by Bruno Muniz's avatar Bruno Muniz :apple:
Browse files

Update ui for terms feature

parent 8123ef70
No related branches found
No related tags found
3 merge requests!71Releasing v1.1.5 (214),!69Implemented filtering for banned/blocked users and reporting,!67v1.1.5 b(203)
......@@ -18,7 +18,7 @@ public struct FetchBannedList {
extension FetchBannedList {
public static let live = FetchBannedList { completion in
let url = URL(string: "https://elixxir-bins.s3.us-west-1.amazonaws.com/client/bannedUsers/bannedTesting.csv")!
let url = URL(string: "https://elixxir-bins.s3.us-west-1.amazonaws.com/client/bannedUsers/banned.csv")!
let session = URLSession.shared
let request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData)
let task = session.dataTask(with: request) { data, response, error in
......
......@@ -136,7 +136,7 @@ public final class SettingsController: UIViewController {
title: Localized.Settings.Drawer.title(Localized.Settings.privacyPolicy),
subtitle: Localized.Settings.Drawer.subtitle(Localized.Settings.privacyPolicy),
actionTitle: Localized.ChatList.Dashboard.open) {
guard let url = URL(string: "https://xx.network/privategrity-corporation-privacy-policy") else { return }
guard let url = URL(string: "https://elixxir.io/privategrity-corporation-privacy-policy/") else { return }
UIApplication.shared.open(url, options: [:])
}
}.store(in: &cancellables)
......@@ -149,7 +149,7 @@ public final class SettingsController: UIViewController {
title: Localized.Settings.Drawer.title(Localized.Settings.disclosures),
subtitle: Localized.Settings.Drawer.subtitle(Localized.Settings.disclosures),
actionTitle: Localized.ChatList.Dashboard.open) {
guard let url = URL(string: "https://xx.network/privategrity-corporation-terms-of-use") else { return }
guard let url = URL(string: "https://elixxir.io/privategrity-corporation-terms-of-use/") else { return }
UIApplication.shared.open(url, options: [:])
}
}.store(in: &cancellables)
......
......@@ -30,7 +30,7 @@ public extension CapsuleButtonStyle {
borderWidth: 0,
borderColor: nil,
titleColor: Asset.brandPrimary.color,
disabledTitleColor: Asset.neutralWhite.color
disabledTitleColor: Asset.neutralWhite.color.withAlphaComponent(0.5)
)
static let brandColored = CapsuleButtonStyle(
......
......@@ -11,12 +11,12 @@ final class RadioButton: UIControl {
containerView.layer.borderWidth = 1
containerView.layer.cornerRadius = 15
containerView.layer.masksToBounds = true
containerView.layer.borderColor = UIColor.gray.cgColor
containerView.layer.borderColor = Asset.neutralWhite.color.cgColor
filledView.isHidden = true
filledView.layer.cornerRadius = 10
filledView.layer.masksToBounds = true
filledView.backgroundColor = Asset.brandPrimary.color
filledView.backgroundColor = Asset.neutralWhite.color
containerView.isUserInteractionEnabled = false
filledView.isUserInteractionEnabled = false
......
......@@ -13,7 +13,7 @@ final class RadioTextComponent: UIView {
super.init(frame: .zero)
titleLabel.numberOfLines = 0
titleLabel.textColor = Asset.neutralBody.color
titleLabel.textColor = Asset.neutralWhite.color
titleLabel.font = Fonts.Mulish.regular.font(size: 13.0)
addSubview(titleLabel)
......
......@@ -31,8 +31,28 @@ public final class TermsConditionsController: UIViewController {
public override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationItem.backButtonTitle = ""
statusBarController.style.send(.darkContent)
navigationController?.navigationBar.customize(translucent: true)
navigationController?.navigationBar.customize(
translucent: true,
tint: Asset.neutralWhite.color
)
}
public override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
let gradient = CAGradientLayer()
gradient.colors = [
UIColor(red: 122/255, green: 235/255, blue: 239/255, alpha: 1).cgColor,
UIColor(red: 56/255, green: 204/255, blue: 232/255, alpha: 1).cgColor,
UIColor(red: 63/255, green: 186/255, blue: 253/255, alpha: 1).cgColor,
UIColor(red: 98/255, green: 163/255, blue: 255/255, alpha: 1).cgColor
]
gradient.startPoint = CGPoint(x: 0, y: 0)
gradient.endPoint = CGPoint(x: 1, y: 1)
gradient.frame = screenView.bounds
screenView.layer.insertSublayer(gradient, at: 0)
}
public override func viewDidLoad() {
......
......@@ -2,8 +2,8 @@ import UIKit
import Shared
final class TermsConditionsView: UIView {
let titleLabel = UILabel()
let nextButton = CapsuleButton()
let logoImageView = UIImageView()
let showTermsButton = CapsuleButton()
let radioComponent = RadioTextComponent()
......@@ -11,30 +11,15 @@ final class TermsConditionsView: UIView {
super.init(frame: .zero)
backgroundColor = Asset.neutralWhite.color
let attString = NSMutableAttributedString(string: Localized.Terms.title)
let paragraph = NSMutableParagraphStyle()
paragraph.alignment = .left
paragraph.lineHeightMultiple = 1.15
attString.addAttribute(.paragraphStyle, value: paragraph)
attString.addAttribute(.foregroundColor, value: Asset.neutralActive.color)
attString.addAttribute(.font, value: Fonts.Mulish.bold.font(size: 34.0) as Any)
attString.addAttributes(attributes: [
.font: Fonts.Mulish.bold.font(size: 34.0) as Any,
.foregroundColor: Asset.brandPrimary.color
], betweenCharacters: "#")
titleLabel.numberOfLines = 0
titleLabel.attributedText = attString
logoImageView.contentMode = .center
logoImageView.image = Asset.onboardingLogoStart.image
radioComponent.titleLabel.text = Localized.Terms.radio
nextButton.isEnabled = false
nextButton.set(style: .brandColored, title: Localized.Terms.accept)
showTermsButton.set(style: .seeThrough, title: Localized.Terms.show)
nextButton.set(style: .white, title: Localized.Terms.accept)
showTermsButton.set(style: .seeThroughWhite, title: Localized.Terms.show)
addSubview(titleLabel)
addSubview(logoImageView)
addSubview(nextButton)
addSubview(radioComponent)
addSubview(showTermsButton)
......@@ -45,10 +30,9 @@ final class TermsConditionsView: UIView {
required init?(coder: NSCoder) { nil }
private func setupConstraints() {
titleLabel.snp.makeConstraints {
logoImageView.snp.makeConstraints {
$0.top.equalTo(safeAreaLayoutGuide).offset(30)
$0.left.equalToSuperview().offset(38)
$0.right.equalToSuperview().offset(-44)
$0.centerX.equalToSuperview()
}
radioComponent.snp.makeConstraints {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment