Tools View & Crash Report & OOM Report

This commit is contained in:
世界
2026-04-23 08:12:52 +08:00
parent 73180f0230
commit b48f4ad97f
46 changed files with 4279 additions and 533 deletions
+2
View File
@@ -7,11 +7,13 @@ import UserNotifications
open class ApplicationDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDelegate {
public func applicationDidFinishLaunching(_: Notification) {
NativeCrashReporter.installForCurrentProcess()
NSLog("Here I stand")
let options = LibboxSetupOptions()
options.basePath = FilePath.sharedDirectory.relativePath
options.workingPath = FilePath.workingDirectory.relativePath
options.tempPath = FilePath.cacheDirectory.relativePath
options.crashReportSource = "Application"
var error: NSError?
LibboxSetup(options, &error)
LibboxSetLocale(Locale.current.identifier)
+3
View File
@@ -26,10 +26,12 @@ private struct SidebarContentView: View {
}
ForEach(NavigationPage.macosDefaultPages, id: \.self) { it in
it.label
.badge(it == .tools ? environments.totalUnreadReportCount : 0)
}
} else {
ForEach(NavigationPage.allCases.filter { $0.visible(profile) }, id: \.self) { it in
it.label
.badge(it == .tools ? environments.totalUnreadReportCount : 0)
}
}
}
@@ -95,6 +97,7 @@ public struct SidebarView: View {
List(selection: $localSelection) {
ForEach(NavigationPage.allCases.filter { $0.visible(nil) }, id: \.self) { it in
it.label
.badge(it == .tools ? environments.totalUnreadReportCount : 0)
}
}
.listStyle(.sidebar)