From 4f7461a26287ecbb001c46ebe6dbd9451dc35d4a Mon Sep 17 00:00:00 2001 From: Stephen Cooper <1970249+scooper4711@users.noreply.github.com> Date: Mon, 16 Nov 2026 06:47:37 +0100 Subject: [PATCH 1/2] docs: Specify About in the iPad's menu bar --- docs/specs/library-manager/requirements.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/specs/library-manager/requirements.md b/docs/specs/library-manager/requirements.md index eccf7cd..73b5098 100644 --- a/docs/specs/library-manager/requirements.md +++ b/docs/specs/library-manager/requirements.md @@ -256,8 +256,9 @@ once, online or off. 11.1 The app is free. No feature depends on a payment. 11.2 The notice that Paizo's Community Use Policy prescribes is shown, in the - policy's own wording, in the README, in the Mac app's About panel, and in - the settings of both apps. + policy's own wording, in the README, in the Mac app's About panel, in the + settings of both apps, and in the window About Scrollkeeper opens from the + iPad's menu bar, which otherwise opens an empty window. 11.3 The Mac app and the README link to a page for optional donations. The iPad app does not, because Apple restricts links to outside payment pages. 11.4 Cover images and product descriptions are shown unmodified. The app icon From e5171ac992287e85466bee844ec9b523ce42ea62 Mon Sep 17 00:00:00 2001 From: Stephen Cooper <1970249+scooper4711@users.noreply.github.com> Date: Mon, 16 Nov 2026 06:47:37 +0100 Subject: [PATCH 2/2] fix: Show the About screen from the iPad's menu bar On the iPad the menu bar's About Scrollkeeper opened an empty window. It now opens a window with the Community Use Policy notice, links and acknowledgments that Settings shows. --- Sources/ScrollkeeperUI/ScrollkeeperApp.swift | 4 ++ .../ScrollkeeperUI/Views/AboutWindow.swift | 52 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 Sources/ScrollkeeperUI/Views/AboutWindow.swift diff --git a/Sources/ScrollkeeperUI/ScrollkeeperApp.swift b/Sources/ScrollkeeperUI/ScrollkeeperApp.swift index 6a5a8e5..5498d20 100644 --- a/Sources/ScrollkeeperUI/ScrollkeeperApp.swift +++ b/Sources/ScrollkeeperUI/ScrollkeeperApp.swift @@ -31,6 +31,8 @@ public struct ScrollkeeperApp: App { #else AboutCommands(updater: updater) #endif + #else + PadAboutCommands() #endif } @@ -39,6 +41,8 @@ public struct ScrollkeeperApp: App { SettingsView() .environment(store) } + #else + AboutWindow() #endif } diff --git a/Sources/ScrollkeeperUI/Views/AboutWindow.swift b/Sources/ScrollkeeperUI/Views/AboutWindow.swift new file mode 100644 index 0000000..90f41de --- /dev/null +++ b/Sources/ScrollkeeperUI/Views/AboutWindow.swift @@ -0,0 +1,52 @@ +#if os(iOS) +import SwiftUI + +/// Replaces the About item in the iPad's menu bar, whose default opens an empty window, with one that opens +/// `AboutWindow`. +struct PadAboutCommands: Commands { + var body: some Commands { + CommandGroup(replacing: .appInfo) { AboutWindowButton() } + } +} + +/// The notice, links and acknowledgments that Settings shows, in a window of their own. It takes no links, which +/// still reach the library window. +struct AboutWindow: Scene { + static let id = "about" + + var body: some Scene { + WindowGroup("About \(AboutInfo.appName)", id: Self.id) { + AboutWindowContent() + } + .handlesExternalEvents(matching: []) + } +} + +/// Opens the About window; a view of its own, since `openWindow` is read from a view's environment. +private struct AboutWindowButton: View { + @Environment(\.openWindow) private var openWindow + + var body: some View { + Button("About \(AboutInfo.appName)") { openWindow(id: AboutWindow.id) } + } +} + +private struct AboutWindowContent: View { + @Environment(\.dismissWindow) private var dismissWindow + + var body: some View { + NavigationStack { + Form { + AboutView() + AcknowledgmentsView() + } + .navigationTitle("About \(AboutInfo.appName)") + .toolbar { + ToolbarItem(placement: .confirmationAction) { + Button("Done") { dismissWindow(id: AboutWindow.id) } + } + } + } + } +} +#endif