|
| 1 | +// |
| 2 | +// HelpView.swift |
| 3 | +// CycleOne |
| 4 | +// |
| 5 | + |
| 6 | +import SwiftUI |
| 7 | + |
| 8 | +struct HelpView: View { |
| 9 | + var body: some View { |
| 10 | + List { |
| 11 | + Section("User Guide") { |
| 12 | + GuideRow( |
| 13 | + icon: "calendar", |
| 14 | + title: "Calendar", |
| 15 | + description: "The main screen shows your cycle at a glance. Tap any date to view details or log data." |
| 16 | + ) |
| 17 | + GuideRow( |
| 18 | + icon: "pencil.and.outline", |
| 19 | + title: "Logging", |
| 20 | + description: "Log your flow, symptoms, mood, and energy. Data is auto-saved when you navigate away." |
| 21 | + ) |
| 22 | + GuideRow( |
| 23 | + icon: "chart.bar.fill", |
| 24 | + title: "Insights", |
| 25 | + description: "View your average cycle length, period duration, and top symptoms over time." |
| 26 | + ) |
| 27 | + GuideRow( |
| 28 | + icon: "bell.fill", |
| 29 | + title: "Reminders", |
| 30 | + description: "Enable notifications in Settings to get alerts before your next period or fertile window." |
| 31 | + ) |
| 32 | + } |
| 33 | + |
| 34 | + Section("Navigation Tips") { |
| 35 | + TipItem(text: "Swipe left or right on the calendar to change months.") |
| 36 | + TipItem(text: "Tap the 'Today' button in the calendar header to quickly return to current date.") |
| 37 | + TipItem(text: "Tap a cycle in the Insights history to see its full breakdown.") |
| 38 | + } |
| 39 | + |
| 40 | + Section("App Philosophy") { |
| 41 | + VStack(alignment: .leading, spacing: 10) { |
| 42 | + Text("Privacy First") |
| 43 | + .font(.headline) |
| 44 | + Text( |
| 45 | + "CycleOne is designed with zero cloud sync and zero tracking. Your data is stored exclusively on your device in a secure local database." |
| 46 | + ) |
| 47 | + .font(.subheadline) |
| 48 | + .foregroundColor(.secondary) |
| 49 | + |
| 50 | + Divider() |
| 51 | + |
| 52 | + Text("No Subscriptions") |
| 53 | + .font(.headline) |
| 54 | + Text("We believe you shouldn't pay monthly to access your own health data. " + |
| 55 | + "One purchase, forever yours.") |
| 56 | + .font(.subheadline) |
| 57 | + .foregroundColor(.secondary) |
| 58 | + } |
| 59 | + .padding(.vertical, 8) |
| 60 | + } |
| 61 | + |
| 62 | + Section("Manual & Support") { |
| 63 | + Link(destination: URL(string: "https://github.com/VoxDroid/CycleOne")!) { |
| 64 | + Label("View Project on GitHub", systemImage: "link") |
| 65 | + } |
| 66 | + |
| 67 | + NavigationLink(destination: PrivacyPolicyView()) { |
| 68 | + Label("Privacy Policy", systemImage: "shield.fill") |
| 69 | + } |
| 70 | + } |
| 71 | + } |
| 72 | + .navigationTitle("Help & Guide") |
| 73 | + .navigationBarTitleDisplayMode(.inline) |
| 74 | + } |
| 75 | +} |
| 76 | + |
| 77 | +struct GuideRow: View { |
| 78 | + let icon: String |
| 79 | + let title: String |
| 80 | + let description: String |
| 81 | + |
| 82 | + var body: some View { |
| 83 | + HStack(alignment: .top, spacing: 16) { |
| 84 | + Image(systemName: icon) |
| 85 | + .font(.title3) |
| 86 | + .foregroundColor(.themeAccent) |
| 87 | + .frame(width: 24) |
| 88 | + VStack(alignment: .leading, spacing: 4) { |
| 89 | + Text(title) |
| 90 | + .font(.headline) |
| 91 | + Text(description) |
| 92 | + .font(.caption) |
| 93 | + .foregroundColor(.secondary) |
| 94 | + } |
| 95 | + } |
| 96 | + .padding(.vertical, 4) |
| 97 | + } |
| 98 | +} |
| 99 | + |
| 100 | +struct TipItem: View { |
| 101 | + let text: String |
| 102 | + |
| 103 | + var body: some View { |
| 104 | + HStack(alignment: .top, spacing: 12) { |
| 105 | + Image(systemName: "lightbulb.fill") |
| 106 | + .foregroundColor(.yellow) |
| 107 | + .font(.caption) |
| 108 | + .padding(.top, 2) |
| 109 | + Text(text) |
| 110 | + .font(.subheadline) |
| 111 | + } |
| 112 | + } |
| 113 | +} |
| 114 | + |
| 115 | +#Preview { |
| 116 | + NavigationStack { |
| 117 | + HelpView() |
| 118 | + } |
| 119 | +} |
0 commit comments