Commit a94f6aa7 authored by Thomas Markiewicz's avatar Thomas Markiewicz

Updated drawer menus for Librem One

parent b825a5a8
......@@ -63,7 +63,7 @@ class MenuViewController: AutolayoutViewController {
@IBOutlet private weak var tableView: UITableView!
@IBOutlet private weak var viewHeader: UIView!
// Removed for L1 @IBOutlet private weak var viewHeader: UIView!
@IBOutlet private weak var labelUsername: UILabel!
......@@ -78,7 +78,7 @@ class MenuViewController: AutolayoutViewController {
private lazy var allItems: [[Item]] = [
[
.selectRegion,
.account,
// Taking out for L1 .account,
.settings,
.logout
], [
......@@ -132,7 +132,7 @@ class MenuViewController: AutolayoutViewController {
modalPresentationCapturesStatusBarAppearance = true
imvAvatar.image = Asset.imageRobot.image
// Removed for L1 imvAvatar.image = Asset.imageRobot.image
var planDescription = ""
if let currentUser = Client.providers.accountProvider.currentUser,
......@@ -149,6 +149,7 @@ class MenuViewController: AutolayoutViewController {
planDescription = L10n.Account.Subscriptions.trial
}
/* Removed for L1
labelVersion.numberOfLines = 0
labelVersion.attributedText = Theme.current.smallTextWithColoredLink(
withMessage: planDescription + "\n" + L10n.Account.Subscriptions.Short.message,
......@@ -156,9 +157,10 @@ class MenuViewController: AutolayoutViewController {
labelVersion.isUserInteractionEnabled = true
let tap = UITapGestureRecognizer(target: self, action: #selector(openManageSubscription))
labelVersion.addGestureRecognizer(tap)
*/
} else {
labelVersion.text = Macros.localizedVersionFullString()
// Removed for L1: labelVersion.text = Macros.localizedVersionFullString()
allItems[1].removeLast()
}
}
......@@ -174,8 +176,10 @@ class MenuViewController: AutolayoutViewController {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
currentUser = Client.providers.accountProvider.currentUser
/* Removed for L1
labelUsername.text = Client.providers.accountProvider.publicUsername ?? ""
labelUsername.accessibilityLabel = L10n.Menu.Accessibility.loggedAs(Client.providers.accountProvider.publicUsername ?? "")
*/
}
override func didRefreshOrientationConstraints() {
......@@ -422,10 +426,10 @@ class MenuViewController: AutolayoutViewController {
super.viewShouldRestyle()
Theme.current.applyMenuBackground(view)
Theme.current.applyMenuBackground(viewHeader)
// Removed for L1 Theme.current.applyMenuBackground(viewHeader)
Theme.current.applyMenuBackground(tableView)
Theme.current.applyTitle(labelUsername, appearance: .light)
Theme.current.applyMenuSubtitle(labelVersion)
// Removed for L1 Theme.current.applyTitle(labelUsername, appearance: .light)
// Removed for L1 Theme.current.applyMenuSubtitle(labelVersion)
tableView.reloadData()
}
}
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment