1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-06 19:40:08 +02:00

👌 Cleanup

This commit is contained in:
2024-03-19 14:22:10 +01:00
parent 52ea64db40
commit 92e7418158

View File

@ -95,22 +95,7 @@ class DomainListVC: NSViewController, NSTableViewDelegate, NSTableViewDataSource
override func viewDidLoad() {
tableView.doubleAction = #selector(self.doubleClicked(sender:))
let child = NSHostingController(
rootView: UnavailableContentView(
title: "No domains available.",
description: "You can always link a new domain from within PHP Monitor.",
icon: "globe",
button: "Add domain",
action: {
App.shared.domainListWindowController?
.pressedAddLink(nil)
}
)
.frame(width: 300, height: 300)
).view
self.noResultsView.addSubview(child)
child.frame = self.noResultsView.bounds
addNoResultsView()
let mapping = [
"SECURE": "domain_list.columns.secure",
@ -134,6 +119,25 @@ class DomainListVC: NSViewController, NSTableViewDelegate, NSTableViewDataSource
}
}
private func addNoResultsView() {
let child = NSHostingController(
rootView: UnavailableContentView(
title: "domain_list.domains_empty.title".localized,
description: "domain_list.domains_empty.desc".localized,
icon: "globe",
button: "domain_list.domains_empty.button".localized,
action: {
App.shared.domainListWindowController?
.pressedAddLink(nil)
}
)
.frame(width: 300, height: 300)
).view
self.noResultsView.addSubview(child)
child.frame = self.noResultsView.bounds
}
// MARK: - Async Operations
/**