Bug gixes, features added, GUI updates and more

This commit is contained in:
2026-02-12 14:29:35 +01:00
parent 52447b5e17
commit 7265d22438
21 changed files with 2187 additions and 123 deletions

View File

@@ -6,6 +6,9 @@
//
import SwiftUI
#if os(macOS)
import AppKit
#endif
@main
struct oAIApp: App {
@@ -32,7 +35,25 @@ struct oAIApp: App {
showAbout = true
}
}
CommandGroup(replacing: .help) {
Button("oAI Help") {
openHelp()
}
.keyboardShortcut("?", modifiers: .command)
}
}
#endif
}
#if os(macOS)
private func openHelp() {
if let helpBookURL = Bundle.main.url(forResource: "oAI.help", withExtension: nil) {
NSWorkspace.shared.open(helpBookURL.appendingPathComponent("Contents/Resources/en.lproj/index.html"))
} else {
// Fallback to Apple Help if help book not found
NSHelpManager.shared.openHelpAnchor("", inBook: Bundle.main.object(forInfoDictionaryKey: "CFBundleHelpBookName") as? String)
}
}
#endif
}