ReadKeep/readeck/UI/Settings/LegalPrivacySettingsView.swift
Ilyas Hallak a227c275f3 feat: Implement extended font system and offline sync improvements
- Add 10 new fonts (Literata, Merriweather, Source Serif, Lato, Montserrat, Source Sans)
- Support Apple system fonts and Google Fonts (OFL 1.1 licensed)
- Extend FontFamily enum with new fonts and categories
- Update FontSettingsViewModel and WebView with font support
- Force WebView reload when font settings change
- Refactor OfflineSyncManager with protocol and improved error handling
- Add test mocks and OfflineSyncManagerTests with 9 test cases
- Add OpenSourceLicensesView and FontDebugView
- Bump build number
- Update localization strings
2025-12-10 21:25:39 +01:00

115 lines
3.8 KiB
Swift

import SwiftUI
struct LegalPrivacySettingsView: View {
@State private var showingPrivacyPolicy = false
@State private var showingLegalNotice = false
@State private var showReleaseNotes = false
@State private var showingLicenses = false
var body: some View {
Group {
Section {
Button(action: {
showReleaseNotes = true
}) {
HStack {
Text("What's New")
Spacer()
Text("Version \(VersionManager.shared.currentVersion)")
.font(.caption)
.foregroundColor(.secondary)
Image(systemName: "chevron.right")
.font(.caption)
.foregroundColor(.secondary)
}
}
Button(action: {
showingPrivacyPolicy = true
}) {
HStack {
Text(NSLocalizedString("Privacy Policy", comment: ""))
Spacer()
Image(systemName: "chevron.right")
.font(.caption)
.foregroundColor(.secondary)
}
}
Button(action: {
showingLegalNotice = true
}) {
HStack {
Text(NSLocalizedString("Legal Notice", comment: ""))
Spacer()
Image(systemName: "chevron.right")
.font(.caption)
.foregroundColor(.secondary)
}
}
Button(action: {
showingLicenses = true
}) {
HStack {
Text("Open Source Licenses")
Spacer()
Image(systemName: "chevron.right")
.font(.caption)
.foregroundColor(.secondary)
}
}
Button(action: {
if let url = URL(string: "https://github.com/ilyas-hallak/readeck-ios/issues") {
UIApplication.shared.open(url)
}
}) {
HStack {
Text(NSLocalizedString("Report an Issue", comment: ""))
Spacer()
Image(systemName: "arrow.up.right")
.font(.caption)
.foregroundColor(.secondary)
}
}
Button(action: {
if let url = URL(string: "mailto:hi@ilyashallak.de?subject=readeck%20iOS") {
UIApplication.shared.open(url)
}
}) {
HStack {
Text(NSLocalizedString("Contact Support", comment: ""))
Spacer()
Image(systemName: "arrow.up.right")
.font(.caption)
.foregroundColor(.secondary)
}
}
} header: {
Text("Legal, Privacy & Support")
}
}
.sheet(isPresented: $showingPrivacyPolicy) {
PrivacyPolicyView()
}
.sheet(isPresented: $showingLegalNotice) {
LegalNoticeView()
}
.sheet(isPresented: $showReleaseNotes) {
ReleaseNotesView()
}
.sheet(isPresented: $showingLicenses) {
OpenSourceLicensesView()
}
}
}
#Preview {
List {
LegalPrivacySettingsView()
}
.listStyle(.insetGrouped)
}