498f407585
Introduce optional Apple account-backed credits with scoped gateway access while preserving local and BYOK paths. Refresh assistant behavior, tests, privacy disclosures, docs, and the website for the 2.0 experience.
35 lines
981 B
Swift
35 lines
981 B
Swift
// PrivacyPolicyView.swift
|
|
// OSGKeyboard · Main App
|
|
//
|
|
// Bundled privacy policy HTML. Reached from Settings → About.
|
|
|
|
import OSGKeyboardShared
|
|
import SwiftUI
|
|
|
|
struct PrivacyPolicyView: View {
|
|
@Environment(\.themePalette) private var palette: ThemePalette
|
|
@ObservedObject private var config = ProviderConfig.shared
|
|
|
|
var body: some View {
|
|
LegalWebView(
|
|
resourceName: "PrivacyPolicy",
|
|
scrollToAnchor: privacyScrollAnchor
|
|
)
|
|
.background(palette.background.ignoresSafeArea())
|
|
.navigationTitle("settings.privacy.policy")
|
|
.navigationBarTitleDisplayMode(.inline)
|
|
.hidesTabBarWhenPushed()
|
|
}
|
|
|
|
private var privacyScrollAnchor: String? {
|
|
switch config.uiLanguage {
|
|
case .chinese:
|
|
return "zh"
|
|
case .english:
|
|
return "top"
|
|
case .auto:
|
|
return config.uiLanguage.resolvedLanguageCode().hasPrefix("zh") ? "zh" : "top"
|
|
}
|
|
}
|
|
}
|