Adiciona tela Sobre o App com Política de Privacidade e Termos e Condições
- 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>
This commit is contained in:
34
Bible-Week/LegalDocumentView.swift
Normal file
34
Bible-Week/LegalDocumentView.swift
Normal file
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// LegalDocumentView.swift
|
||||
// Bible-Week
|
||||
//
|
||||
// Renderiza documentos legais em HTML usando o WebView nativo do SwiftUI/WebKit.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import WebKit
|
||||
|
||||
struct LegalDocumentView: View {
|
||||
let title: String
|
||||
let htmlFileName: String
|
||||
|
||||
private var fileURL: URL? {
|
||||
Bundle.main.url(forResource: htmlFileName, withExtension: "html")
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
Group {
|
||||
if let url = fileURL {
|
||||
WebView(url: url)
|
||||
} else {
|
||||
ContentUnavailableView(
|
||||
"Documento não encontrado",
|
||||
systemImage: "doc.slash",
|
||||
description: Text("O documento não pôde ser carregado.")
|
||||
)
|
||||
}
|
||||
}
|
||||
.navigationTitle(title)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user