05e005e9ce
Batch of in-progress app work from the working tree. - feat(keyboard): CursorNavigation + CursorDragPad for caret movement; KeyboardSoundFeedback for system key click sounds - feat(dictionary): DictionaryAliasGenerator + PersonalDictionaryEntrySheet; TranscriptPostProcessor quality gate; retire DictionaryLearner - feat(ui): TabBarVisibility handling; drop PageHeaderRow / PageHeaderConfirmButton; refresh views and localizable strings - fix(security): move the hardcoded DeepSeek key out of PreconfiguredKeys.swift into a gitignored PreconfiguredKeys.local.swift (seeded from .example by generate-xcodeproj.sh) - docs(agents): add Conventional Commits versioning + bilingual changelog rules - chore(gitignore): ignore PreconfiguredKeys.local.swift, .cache/, pycache Custom language model / lexicon work stays on feature/custom-language-model-asr. Changelog bullets added under [Unreleased]; no version bump.
35 lines
981 B
Swift
35 lines
981 B
Swift
// PrivacyPolicyView.swift
|
|
// OSGKeyboard · Main App
|
|
//
|
|
// Bundled privacy policy HTML. Reached from Settings → About.
|
|
|
|
import SwiftUI
|
|
import OSGKeyboardShared
|
|
|
|
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"
|
|
}
|
|
}
|
|
}
|