2025-10-05 06:28:29 +03:00

48 lines
1.9 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import SwiftUI
struct FAQView: View {
private struct FAQItem: Identifiable {
let id = UUID()
let question: String
let answer: String
}
private let faqItems: [FAQItem] = [
FAQItem(
question: NSLocalizedString("Как сбросить пароль?", comment: "FAQ question: reset password"),
answer: NSLocalizedString("Перейдите в раздел \"Настройки > Сменить пароль\" и следуйте инструкциям.", comment: "FAQ answer: reset password")
),
FAQItem(
question: NSLocalizedString("Где найти сохранённые черновики?", comment: "FAQ question: drafts"),
answer: NSLocalizedString("Черновики доступны в боковом меню в разделе Drafts.", comment: "FAQ answer: drafts")
),
FAQItem(
question: NSLocalizedString("Как связаться с поддержкой?", comment: "FAQ question: support"),
answer: NSLocalizedString("Напишите нам через форму обратной связи в разделе \"Поддержка\".", comment: "FAQ answer: support")
)
]
var body: some View {
List(faqItems) { item in
VStack(alignment: .leading, spacing: 6) {
Text(item.question)
.font(.headline)
Text(item.answer)
.font(.subheadline)
.foregroundColor(.secondary)
}
.padding(.vertical, 6)
}
.listStyle(.insetGrouped)
.navigationTitle(NSLocalizedString("Частые вопросы", comment: "FAQ navigation title"))
}
}
struct FAQView_Previews: PreviewProvider {
static var previews: some View {
NavigationView {
FAQView()
}
}
}