- LegalDocumentView: renderiza HTML do bundle usando WebView nativo do WebKit (iOS 26+) com suporte a dark mode - AboutView: tela com identidade visual do app, links para os documentos legais e contato - politicadeprivacidade.html / termosecondicoes.html: adicionados ao bundle com CSS para dark mode - BooksView: botão ⓘ na barra de navegação abre AboutView como sheet - PlanSettingsView: seção "Legal" com links diretos para os documentos Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
109 lines
3.5 KiB
Swift
109 lines
3.5 KiB
Swift
//
|
|
// AboutView.swift
|
|
// Bible-Week
|
|
//
|
|
// Tela "Sobre o App": identidade visual, versão e acesso aos documentos legais.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct AboutView: View {
|
|
@Environment(\.dismiss) private var dismiss
|
|
|
|
var body: some View {
|
|
NavigationStack {
|
|
List {
|
|
Section {
|
|
appHeader
|
|
}
|
|
.listRowBackground(Color.clear)
|
|
.listRowInsets(.init())
|
|
|
|
Section("Legal") {
|
|
NavigationLink {
|
|
LegalDocumentView(
|
|
title: "Política de Privacidade",
|
|
htmlFileName: "politicadeprivacidade"
|
|
)
|
|
} label: {
|
|
Label("Política de Privacidade", systemImage: "hand.raised.fill")
|
|
}
|
|
|
|
NavigationLink {
|
|
LegalDocumentView(
|
|
title: "Termos e Condições",
|
|
htmlFileName: "termosecondicoes"
|
|
)
|
|
} label: {
|
|
Label("Termos e Condições", systemImage: "doc.text.fill")
|
|
}
|
|
}
|
|
|
|
Section("Contato") {
|
|
Label("app@handix.com.br", systemImage: "envelope.fill")
|
|
.foregroundStyle(.secondary)
|
|
}
|
|
|
|
Section {
|
|
Text("© 2026 Handix Do Brasil. Todos os direitos reservados.")
|
|
.font(.caption)
|
|
.foregroundStyle(.secondary)
|
|
.frame(maxWidth: .infinity, alignment: .center)
|
|
}
|
|
.listRowBackground(Color.clear)
|
|
}
|
|
.navigationTitle("Sobre")
|
|
.navigationBarTitleDisplayMode(.large)
|
|
.toolbar {
|
|
ToolbarItem(placement: .confirmationAction) {
|
|
Button("OK") { dismiss() }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
private var appHeader: some View {
|
|
VStack(spacing: 16) {
|
|
ZStack {
|
|
LinearGradient(
|
|
colors: [
|
|
Color(red: 0.18, green: 0.45, blue: 0.98),
|
|
Color(red: 0.38, green: 0.18, blue: 0.88)
|
|
],
|
|
startPoint: .topLeading,
|
|
endPoint: .bottomTrailing
|
|
)
|
|
Image(systemName: "book.closed.fill")
|
|
.font(.system(size: 52, weight: .medium))
|
|
.foregroundStyle(.white)
|
|
}
|
|
.frame(width: 110, height: 110)
|
|
.clipShape(RoundedRectangle(cornerRadius: 24, style: .continuous))
|
|
.shadow(color: .black.opacity(0.15), radius: 12, y: 4)
|
|
|
|
VStack(spacing: 4) {
|
|
Text("Semana Bíblica")
|
|
.font(.title2)
|
|
.fontWeight(.bold)
|
|
|
|
if let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String,
|
|
let build = Bundle.main.infoDictionary?["CFBundleVersion"] as? String {
|
|
Text("Versão \(version) (\(build))")
|
|
.font(.subheadline)
|
|
.foregroundStyle(.secondary)
|
|
}
|
|
|
|
Text("Handix Do Brasil")
|
|
.font(.caption)
|
|
.foregroundStyle(.tertiary)
|
|
}
|
|
}
|
|
.frame(maxWidth: .infinity)
|
|
.padding(.vertical, 20)
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
AboutView()
|
|
}
|