Merge branch 'main' into 540-cmd-click-new-tab

This commit is contained in:
BPH 2024-03-28 21:53:00 +01:00 committed by GitHub
commit 402fb294f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View File

@ -157,6 +157,12 @@ struct RootView: View {
navigation.currentItem = .reading navigation.currentItem = .reading
browser.load(url: url) browser.load(url: url)
} }
.onReceive(NotificationCenter.default.publisher(for: NSWindow.willCloseNotification), perform: { output in
guard let window = output.object as? NSWindow else { return }
if window.isKeyWindow && window.isMainWindow { // if this is the very last window, close the app
NSApp.terminate(nil)
}
})
.onReceive(appTerminates) { _ in .onReceive(appTerminates) { _ in
browser.persistAllTabIdsFromWindows() browser.persistAllTabIdsFromWindows()
}.task { }.task {

View File

@ -65,7 +65,6 @@ targetTemplates:
path: Support/Kiwix.entitlements path: Support/Kiwix.entitlements
properties: properties:
com.apple.security.app-sandbox: true com.apple.security.app-sandbox: true
com.apple.security.files.downloads.read-write: true
com.apple.security.files.user-selected.read-only: true com.apple.security.files.user-selected.read-only: true
com.apple.security.network.client: true com.apple.security.network.client: true
dependencies: dependencies:
@ -92,6 +91,9 @@ targets:
Kiwix: Kiwix:
templates: templates:
- ApplicationTemplate - ApplicationTemplate
entitlements:
properties:
com.apple.security.files.downloads.read-write: true
settings: settings:
base: base:
MARKETING_VERSION: "3.3.0" MARKETING_VERSION: "3.3.0"