Add server picker to Home
This commit is contained in:
@@ -33,6 +33,18 @@ final class HomeViewController: RefreshingTableViewController {
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
let servers = UIBarButtonItem(
|
||||
image: context.symbol("server.rack"),
|
||||
primaryAction: UIAction { [weak self] _ in
|
||||
guard let self else { return }
|
||||
self.navigationController?.pushViewController(
|
||||
ServersViewController(context: self.context),
|
||||
animated: true
|
||||
)
|
||||
}
|
||||
)
|
||||
servers.accessibilityLabel = "Servers"
|
||||
navigationItem.leftBarButtonItem = servers
|
||||
let settings = UIBarButtonItem(
|
||||
image: context.symbol("gearshape"),
|
||||
primaryAction: UIAction { [weak self] _ in
|
||||
@@ -57,7 +69,7 @@ final class HomeViewController: RefreshingTableViewController {
|
||||
guard context.core.activeServerIndex() != nil else {
|
||||
tableView.backgroundView = EmptyBackgroundView(
|
||||
title: "No server selected",
|
||||
detail: "Open Issues or Repos to select a server or add your first one."
|
||||
detail: "Use the server button to select a server or add your first one."
|
||||
)
|
||||
refreshControl?.endRefreshing()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user