Change the local account icon.
This commit is contained in:
parent
0dff95e51f
commit
4fcd134c6a
|
@ -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:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"filename" : "accountLocal.pdf"
|
"filename" : "localAccountPad.pdf"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"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 {
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue