From 5de445daa53c13aa6ba993dd3f6eaa0f9879a66c Mon Sep 17 00:00:00 2001 From: psmattas Date: Fri, 21 Aug 2026 01:38:11 +0100 Subject: [PATCH] feat(app): rewire account footer menu - App Store feedback, support link Center-aligned TipJarView's "Support Outpost" heading and thank-you/ error text to match the rest of AboutInfoView (was VStack(alignment: .leading), out of place among everything else there being centered). AccountFooter's Documentation/API Documentation/Changelog links pointed at Outpost's own repo or the signed-in Outline server's own /developers page - not actually useful here, removed along with the now-unused repositoryURL/issuesURL/apiDocumentationURL. Send Us Feedback and Report a Bug (previously both just opening the Gitea issues page) collapsed into one "Leave Us Feedback" wired to Apple's native requestReview() prompt - there's no separate Apple-native channel for "bug" vs "feedback", so one button covers both. Added "Support Outpost" near the bottom of the same menu, alongside Profile/Settings (same visual weight, not pinned to the top) - opens Settings -> About, same navigation the app-menu's "About Outpost" command already uses. Also checking in the shared Xcode scheme (previously untracked/ nonexistent) now that it references Configuration.storekit, so the StoreKit testing setup travels with the repo instead of being machine-local. Not compiler-verified - Outpost app target has no CLI build path. --- .../xcshareddata/xcschemes/Outpost.xcscheme | 101 ++++++++++++++++++ Outpost/Features/About/TipJarView.swift | 2 +- Outpost/Features/Account/AccountFooter.swift | 32 +++--- 3 files changed, 116 insertions(+), 19 deletions(-) create mode 100644 Outpost.xcodeproj/xcshareddata/xcschemes/Outpost.xcscheme diff --git a/Outpost.xcodeproj/xcshareddata/xcschemes/Outpost.xcscheme b/Outpost.xcodeproj/xcshareddata/xcschemes/Outpost.xcscheme new file mode 100644 index 0000000..cf7bbda --- /dev/null +++ b/Outpost.xcodeproj/xcshareddata/xcschemes/Outpost.xcscheme @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Outpost/Features/About/TipJarView.swift b/Outpost/Features/About/TipJarView.swift index ee73611..2bf7902 100644 --- a/Outpost/Features/About/TipJarView.swift +++ b/Outpost/Features/About/TipJarView.swift @@ -9,7 +9,7 @@ struct TipJarView: View { @State private var store = TipJarStore() var body: some View { - VStack(alignment: .leading, spacing: 8) { + VStack(spacing: 8) { Text("Support Outpost") .font(.callout.weight(.semibold)) diff --git a/Outpost/Features/Account/AccountFooter.swift b/Outpost/Features/Account/AccountFooter.swift index e4c2033..885a615 100644 --- a/Outpost/Features/Account/AccountFooter.swift +++ b/Outpost/Features/Account/AccountFooter.swift @@ -1,5 +1,6 @@ #if os(macOS) import SwiftUI +import StoreKit import OutlineKit /// Uses a plain `Button` + `.popover` rather than `Menu`. A `Menu` whose label @@ -9,20 +10,13 @@ import OutlineKit struct AccountFooter: View { @Environment(SessionStore.self) private var session @Environment(AppNavigation.self) private var navigation - @Environment(\.openURL) private var openURL + @Environment(\.requestReview) private var requestReview @AppStorage("outpost.appearance") private var appearance: AppAppearance = .system @AppStorage(CachingOutlineAPIClient.offlineModeDefaultsKey) private var isOfflineModeEnabled = false @State private var isMenuPresented = false @State private var isShowingLogoutConfirmation = false @State private var isShowingProfile = false - private let repositoryURL = URL(string: "https://git.psmattas.com/psmattas/Outpost")! - private let issuesURL = URL(string: "https://git.psmattas.com/psmattas/Outpost/issues")! - - private var apiDocumentationURL: URL? { - session.serverURL?.appendingPathComponent("developers") - } - var body: some View { Button { isMenuPresented = true @@ -62,16 +56,10 @@ struct AccountFooter: View { private var menuContent: some View { VStack(alignment: .leading, spacing: 2) { - menuItem("Documentation") { openURL(repositoryURL) } - if let apiDocumentationURL { - menuItem("API Documentation") { openURL(apiDocumentationURL) } - } - menuItem("Changelog") { openURL(repositoryURL) } - - Divider() - - menuItem("Send Us Feedback") { openURL(issuesURL) } - menuItem("Report a Bug") { openURL(issuesURL) } + // Apple's own review/feedback prompt — there's no separate + // native channel for "bug" vs. "feedback", so one button covers + // both. + menuItem("Leave Us Feedback") { requestReview() } Divider() @@ -101,6 +89,14 @@ struct AccountFooter: View { // as "Invalid attempt to open a new transaction during CA // commit") — letting the popover's dismissal finish first avoids it. menuItem("Settings…") { Task { @MainActor in navigation.isShowingSettings = true } } + // Same deferred-Task reasoning as Settings… above — this also + // sets isShowingSettings synchronously. + menuItem("Support Outpost") { + Task { @MainActor in + navigation.selectedSettingsSection = .about + navigation.isShowingSettings = true + } + } Divider()