Commit 45741a5160
Unsigned
Layout: unified · split
DomainDig/AppInfoView.swift +6 −9
| @@ -1,14 +1,11 @@ | ||
| 1 | import StoreKit | |
| 2 | 1 | import SwiftUI |
| 3 | 2 | |
| 4 | 3 | /// Settings → App Info. Shows app/build metadata and links out to docs, source, |
| 5 | 4 | /// privacy, support, and the App Store. The actionable rows are driven by a |
| 6 | 5 | /// single declarative `AppInfoRow` model so titles, icons, and destinations live |
| 7 | /// in one place; only the Rate and Share rows are special-cased (a StoreKit | |
| 8 | /// action and a `ShareLink` view, respectively). | |
| 6 | /// in one place; only the Share row is special-cased (a `ShareLink` view). | |
| 9 | 7 | struct AppInfoView: View { |
| 10 | 8 | @Environment(\.openURL) private var openURL |
| 11 | @Environment(\.requestReview) private var requestReview | |
| 12 | 9 | @State private var cloudSyncService = CloudSyncService.shared |
| 13 | 10 | @State private var activeSheet: AppInfoSheet? |
| 14 | 11 | |
| @@ -29,20 +26,20 @@ struct AppInfoView: View { | ||
| 29 | 26 | ForEach(supportRows) { row($0) } |
| 30 | 27 | } |
| 31 | 28 | |
| 32 | Section("Support the App") { | |
| 29 | Section { | |
| 33 | 30 | Button { |
| 34 | requestReview() | |
| 31 | openURL(AppLinks.writeReview) | |
| 35 | 32 | } label: { |
| 36 | 33 | Label("Rate DomainDig", systemImage: "star") |
| 37 | 34 | } |
| 35 | .accessibilityHint("Opens the App Store") | |
| 38 | 36 | |
| 39 | 37 | ShareLink(item: AppLinks.appStoreListing) { |
| 40 | 38 | Label("Share DomainDig", systemImage: "square.and.arrow.up") |
| 41 | 39 | } |
| 42 | 40 | .accessibilityHint("Opens the share sheet") |
| 43 | } | |
| 44 | ||
| 45 | Section { | |
| 41 | } header: { | |
| 42 | Text("Support the App") | |
| 46 | 43 | } footer: { |
| 47 | 44 | Text(AppLinks.copyright) |
| 48 | 45 | .frame(maxWidth: .infinity, alignment: .center) |