Skip to content

Commit

Permalink
Updated latest changes to Swift 3
Browse files Browse the repository at this point in the history
  • Loading branch information
cocojoe committed Nov 24, 2016
1 parent 11ee4c7 commit 53a7cd5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Lock/AuthCollectionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ class AuthCollectionView: UIView, View {
func oauth2Buttons(forConnections connections: [OAuth2Connection], customStyle: [String: AuthStyle], isLogin login: Bool, onAction: @escaping (String) -> ()) -> [AuthButton] {
return connections.map { connection -> AuthButton in
let style = customStyle[connection.name] ?? connection.style
let button = AuthButton(size: .Big)
button.title = login ? style.localizedLoginTitle().uppercaseString : style.localizedSignUpTitle().uppercaseString
let button = AuthButton(size: .big)
button.title = login ? style.localizedLoginTitle().uppercased() : style.localizedSignUpTitle().uppercased()
button.normalColor = style.normalColor
button.highlightedColor = style.highlightedColor
button.titleColor = style.foregroundColor
Expand Down
2 changes: 1 addition & 1 deletion Lock/Connections.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public struct EnterpriseConnection : OAuth2Connection {
public let name: String
public let domains: [String]
public let style: AuthStyle

init(name: String, domains: [String], style: AuthStyle? = nil) {
self.name = name
self.domains = domains
Expand Down
4 changes: 2 additions & 2 deletions Lock/EnterpriseDomainPresenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ class EnterpriseDomainPresenter: Presentable, Loggable {
func EnterpriseButton(forConnections connections: [EnterpriseConnection], customStyle: [String: AuthStyle], isLogin login: Bool, onAction: @escaping () -> () ) -> AuthButton? {
guard let connection = connections.first, connections.count == 1 else { return nil }
let style = customStyle[connection.name] ?? connection.style
let button = AuthButton(size: .Big)
button.title = style.localizedLoginTitle(connection.domains.first).uppercaseString
let button = AuthButton(size: .big)
button.title = style.localizedLoginTitle(title: connection.domains.first).uppercased()
button.normalColor = style.normalColor
button.highlightedColor = style.highlightedColor
button.titleColor = style.foregroundColor
Expand Down

0 comments on commit 53a7cd5

Please sign in to comment.