mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2026-03-27 22:40:08 +01:00
✨ Indicate "PHP Monitor EAP" in menu when applicable
This commit is contained in:
@@ -17,6 +17,11 @@ class App {
|
||||
/** Use to determine whether a loaded testable configuration is being used. */
|
||||
static var hasLoadedTestableConfiguration: Bool = false
|
||||
|
||||
/** The name of the app. Has EAP suffixed when an actual EAP build. */
|
||||
static var name: String {
|
||||
return Bundle.main.infoDictionary?["CFBundleName"] as! String
|
||||
}
|
||||
|
||||
/** Retrieve the version number from the main info dictionary, Info.plist. */
|
||||
static var version: String {
|
||||
let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String
|
||||
|
||||
@@ -127,9 +127,9 @@ extension StatusMenu {
|
||||
@MainActor func addCoreMenuItems() {
|
||||
addItems([
|
||||
NSMenuItem.separator(),
|
||||
NSMenuItem(title: "mi_about".localized,
|
||||
NSMenuItem(title: "mi_about".localized.replacing("PHP Monitor", with: App.name),
|
||||
action: #selector(MainMenu.openAbout)),
|
||||
NSMenuItem(title: "mi_quit".localized,
|
||||
NSMenuItem(title: "mi_quit".localized.replacing("PHP Monitor", with: App.name),
|
||||
action: #selector(MainMenu.terminateApp), keyEquivalent: "q")
|
||||
])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user