Change the local account icon.

This commit is contained in:
Maurice Parker 2019-10-23 13:52:07 -05:00
parent 0dff95e51f
commit 4fcd134c6a
7 changed files with 31 additions and 5 deletions

View File

@ -11,8 +11,12 @@ import Account
struct AppAssets { struct AppAssets {
static var accountLocalImage: UIImage = { static var accountLocalPadImage: UIImage = {
return UIImage(named: "accountLocal")! return UIImage(named: "accountLocalPad")!
}()
static var accountLocalPhoneImage: UIImage = {
return UIImage(named: "accountLocalPhone")!
}() }()
static var accountFeedbinImage: UIImage = { static var accountFeedbinImage: UIImage = {
@ -177,7 +181,11 @@ struct AppAssets {
static func image(for accountType: AccountType) -> UIImage? { static func image(for accountType: AccountType) -> UIImage? {
switch accountType { switch accountType {
case .onMyMac: case .onMyMac:
return AppAssets.accountLocalImage if UIDevice.current.userInterfaceIdiom == .pad {
return AppAssets.accountLocalPadImage
} else {
return AppAssets.accountLocalPhoneImage
}
case .feedbin: case .feedbin:
return AppAssets.accountFeedbinImage return AppAssets.accountFeedbinImage
case .freshRSS: case .freshRSS:

View File

@ -2,7 +2,7 @@
"images" : [ "images" : [
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "accountLocal.pdf" "filename" : "localAccountPad.pdf"
} }
], ],
"info" : { "info" : {

View File

@ -0,0 +1,16 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "localAccountPhone.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template",
"preserves-vector-representation" : true
}
}

View File

@ -15,11 +15,12 @@ protocol AddAccountDismissDelegate: UIViewController {
class AddAccountViewController: UITableViewController, AddAccountDismissDelegate { class AddAccountViewController: UITableViewController, AddAccountDismissDelegate {
@IBOutlet private weak var localAccountImageView: UIImageView!
@IBOutlet private weak var localAccountNameLabel: UILabel! @IBOutlet private weak var localAccountNameLabel: UILabel!
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
localAccountImageView.image = AppAssets.image(for: .onMyMac)
localAccountNameLabel.text = Account.defaultLocalAccountName localAccountNameLabel.text = Account.defaultLocalAccountName
} }

View File

@ -595,6 +595,7 @@
</connections> </connections>
</tableView> </tableView>
<connections> <connections>
<outlet property="localAccountImageView" destination="tb2-dO-AhR" id="PCa-g7-grR"/>
<outlet property="localAccountNameLabel" destination="116-rt-msI" id="h6M-5V-392"/> <outlet property="localAccountNameLabel" destination="116-rt-msI" id="h6M-5V-392"/>
</connections> </connections>
</tableViewController> </tableViewController>