Redesign:
- Nach Login landet User direkt im neuen DeviceHubView statt
Auto-Mac-Registrierung. Hub zeigt: User-Email, X/5-Slot-Counter,
Liste aller registrierten Geraete + 'Geraet hinzufuegen' mit
iPhone/iPad vs Mac Wahl.
- Mac wird NUR registriert wenn User aktiv 'Mac' im Hub waehlt
(frueher: auto on app-start, frass Slot).
- iOS-Pfad: Hub -> Welcome/Preflight/Supervise/Enroll/Configure
-> Done -> 'Zurueck zur Geraete-Uebersicht'.
- Mac-Pfad: Hub -> MacRegistrationView (Register+DNS-Install)
-> 'Fertig -> Hub'.
- Wizard-Header hat jetzt Grid-Icon 'Zur Geraete-Uebersicht' als
Escape-Hatch jederzeit.
- Per-Device-Loeschung im Hub: Trash-Icon -> Confirm-Dialog
('Auf X muss Freigabe bestaetigt werden, 24h Cooldown') ->
request-release-Endpoint (existing infra).
- Device-Limit 3 -> 5 in backend (Staging-Testing + Legend-Wert
fuer spaeter).
- StepIndicator/Step-Counter: macRegistration zaehlt nicht im
iOS-Flow.
84 lines
2.9 KiB
Swift
84 lines
2.9 KiB
Swift
import SwiftUI
|
|
|
|
struct DoneView: View {
|
|
@Environment(WizardModel.self) private var model
|
|
|
|
var body: some View {
|
|
VStack(spacing: 24) {
|
|
Image(systemName: "checkmark.seal.fill")
|
|
.font(.system(size: 80))
|
|
.foregroundStyle(.green)
|
|
|
|
Text("Schutz aktiv")
|
|
.font(.largeTitle).bold()
|
|
|
|
Text("Dein iPhone ist jetzt an ReBreak gebunden. Casino-Domains werden via NEFilter blockiert — auch wenn du es willst.")
|
|
.multilineTextAlignment(.center)
|
|
.foregroundStyle(.secondary)
|
|
.padding(.horizontal, 40)
|
|
|
|
statusSummary
|
|
|
|
cooldownNote
|
|
|
|
VStack(spacing: 8) {
|
|
Button("ReBreak öffnen") {
|
|
if let url = URL(string: "rebreak://") {
|
|
NSWorkspace.shared.open(url)
|
|
}
|
|
}
|
|
.buttonStyle(.borderedProminent)
|
|
.controlSize(.large)
|
|
|
|
Button("Zurück zur Geräte-Übersicht") {
|
|
model.returnToHub()
|
|
}
|
|
.buttonStyle(.plain)
|
|
.foregroundStyle(.secondary)
|
|
}
|
|
}
|
|
.padding(40)
|
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
}
|
|
|
|
private var statusSummary: some View {
|
|
VStack(alignment: .leading, spacing: 8) {
|
|
statusRow(label: "Supervised", on: model.device?.isSupervised == true)
|
|
statusRow(label: "MDM-Enrolled", on: model.device?.isEnrolled == true)
|
|
statusRow(label: "App managed (nicht löschbar)", on: model.device?.isManaged == true)
|
|
statusRow(label: "NEFilter aktiv (Casino-Block)", on: model.device?.isFilterActive == true)
|
|
}
|
|
.padding()
|
|
.frame(maxWidth: 400)
|
|
.background(Color.green.opacity(0.05))
|
|
.cornerRadius(8)
|
|
}
|
|
|
|
private func statusRow(label: String, on: Bool) -> some View {
|
|
HStack {
|
|
Image(systemName: on ? "checkmark.circle.fill" : "circle")
|
|
.foregroundStyle(on ? .green : .gray)
|
|
Text(label)
|
|
Spacer()
|
|
}
|
|
.font(.callout)
|
|
}
|
|
|
|
private var cooldownNote: some View {
|
|
HStack(alignment: .top, spacing: 8) {
|
|
Image(systemName: "clock.badge.exclamationmark")
|
|
.foregroundStyle(.orange)
|
|
VStack(alignment: .leading, spacing: 4) {
|
|
Text("7-Tage-Cooldown").bold()
|
|
Text("Wenn du den Schutz aufheben willst, gibt's eine 7-Tage-Wartezeit. Das ist Absicht — die Bindung soll deinen impulsiven 'jetzt-doch-zocken'-Moment überdauern.")
|
|
.font(.caption)
|
|
.foregroundStyle(.secondary)
|
|
}
|
|
}
|
|
.padding(10)
|
|
.frame(maxWidth: 400, alignment: .leading)
|
|
.background(Color.orange.opacity(0.08))
|
|
.cornerRadius(6)
|
|
}
|
|
}
|