link color update MOBFIRST-20060
This commit is contained in:
parent
24bce846f4
commit
10ed8bcb66
@ -25,7 +25,7 @@ open class ExternalLink: Link {
|
||||
|
||||
guard let model = model as? ExternalLinkModel else { return }
|
||||
|
||||
exportImageView?.tintColor = model.textColor.uiColor
|
||||
exportImageView?.tintColor = model.enabledColor.uiColor
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -52,7 +52,7 @@ import UIKit
|
||||
guard let model = model as? LinkModel else { return }
|
||||
|
||||
setTitle(model.title, for: .normal)
|
||||
setTitleColor(model.textColor.uiColor, for: .normal)
|
||||
setTitleColor(model.enabledColor.uiColor, for: .normal)
|
||||
setTitleColor(model.disabledColor.uiColor, for: .disabled)
|
||||
isEnabled = model.enabled
|
||||
set(with: model.action, delegateObject: delegateObject, additionalData: additionalData)
|
||||
|
||||
@ -21,7 +21,7 @@ open class LinkModel: ButtonModelProtocol, MoleculeModelProtocol {
|
||||
public var title: String
|
||||
public var action: ActionModelProtocol
|
||||
public var enabled = true
|
||||
public var textColor = Color(uiColor: .mvmBlack)
|
||||
public var enabledColor = Color(uiColor: .mvmBlack)
|
||||
public var disabledColor = Color(uiColor: .mvmCoolGray6)
|
||||
|
||||
//--------------------------------------------------
|
||||
@ -43,7 +43,7 @@ open class LinkModel: ButtonModelProtocol, MoleculeModelProtocol {
|
||||
case title
|
||||
case action
|
||||
case enabled
|
||||
case textColor
|
||||
case enabledColor
|
||||
case disabledColor
|
||||
}
|
||||
|
||||
@ -60,8 +60,8 @@ open class LinkModel: ButtonModelProtocol, MoleculeModelProtocol {
|
||||
if let enabled = try typeContainer.decodeIfPresent(Bool.self, forKey: .enabled) {
|
||||
self.enabled = enabled
|
||||
}
|
||||
if let color = try typeContainer.decodeIfPresent(Color.self, forKey: .textColor) {
|
||||
textColor = color
|
||||
if let color = try typeContainer.decodeIfPresent(Color.self, forKey: .enabledColor) {
|
||||
enabledColor = color
|
||||
}
|
||||
|
||||
if let color = try typeContainer.decodeIfPresent(Color.self, forKey: .disabledColor) {
|
||||
@ -76,7 +76,7 @@ open class LinkModel: ButtonModelProtocol, MoleculeModelProtocol {
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
try container.encodeModel(action, forKey: .action)
|
||||
try container.encode(enabled, forKey: .enabled)
|
||||
try container.encode(textColor, forKey: .textColor)
|
||||
try container.encode(enabledColor, forKey: .enabledColor)
|
||||
try container.encode(disabledColor, forKey: .disabledColor)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user