Files
OSGKeyboard/OSGKeyboard/Views/PrivacyPolicyView.swift
T
Rocky 498f407585 feat(account): add managed credits and cloud gateway
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.
2026-08-20 11:43:21 +08:00

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"
}
}
}