Change the local account icon.
This commit is contained in:
parent
0dff95e51f
commit
4fcd134c6a
|
@ -11,8 +11,12 @@ import Account
|
|||
|
||||
struct AppAssets {
|
||||
|
||||
static var accountLocalImage: UIImage = {
|
||||
return UIImage(named: "accountLocal")!
|
||||
static var accountLocalPadImage: UIImage = {
|
||||
return UIImage(named: "accountLocalPad")!
|
||||
}()
|
||||
|
||||
static var accountLocalPhoneImage: UIImage = {
|
||||
return UIImage(named: "accountLocalPhone")!
|
||||
}()
|
||||
|
||||
static var accountFeedbinImage: UIImage = {
|
||||
|
@ -177,7 +181,11 @@ struct AppAssets {
|
|||
static func image(for accountType: AccountType) -> UIImage? {
|
||||
switch accountType {
|
||||
case .onMyMac:
|
||||
return AppAssets.accountLocalImage
|
||||
if UIDevice.current.userInterfaceIdiom == .pad {
|
||||
return AppAssets.accountLocalPadImage
|
||||
} else {
|
||||
return AppAssets.accountLocalPhoneImage
|
||||
}
|
||||
case .feedbin:
|
||||
return AppAssets.accountFeedbinImage
|
||||
case .freshRSS:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "accountLocal.pdf"
|
||||
"filename" : "localAccountPad.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
Binary file not shown.
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "localAccountPhone.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "template",
|
||||
"preserves-vector-representation" : true
|
||||
}
|
||||
}
|
BIN
iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/localAccountPhone.pdf
vendored
Normal file
BIN
iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/localAccountPhone.pdf
vendored
Normal file
Binary file not shown.
|
@ -15,11 +15,12 @@ protocol AddAccountDismissDelegate: UIViewController {
|
|||
|
||||
class AddAccountViewController: UITableViewController, AddAccountDismissDelegate {
|
||||
|
||||
@IBOutlet private weak var localAccountImageView: UIImageView!
|
||||
@IBOutlet private weak var localAccountNameLabel: UILabel!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
localAccountImageView.image = AppAssets.image(for: .onMyMac)
|
||||
localAccountNameLabel.text = Account.defaultLocalAccountName
|
||||
}
|
||||
|
||||
|
|
|
@ -595,6 +595,7 @@
|
|||
</connections>
|
||||
</tableView>
|
||||
<connections>
|
||||
<outlet property="localAccountImageView" destination="tb2-dO-AhR" id="PCa-g7-grR"/>
|
||||
<outlet property="localAccountNameLabel" destination="116-rt-msI" id="h6M-5V-392"/>
|
||||
</connections>
|
||||
</tableViewController>
|
||||
|
|
Loading…
Reference in New Issue