apps/rebreak-binder-mac/ — neue macOS-App die User durch den kompletten Self-Bind-Prozess führt: Welcome → Preflight → Supervise → Enroll → Configure (MDM-Push + Pre/Post-Check) → Sideload Lock-Profile (AirDrop). 3-Layer Smart-Resume: supervised? + Enrollment-Profil installed (cfgutil Ground-Truth)? + MDM-Ack fresh (NanoMDM-DB via ssh+psql)? Services: DeviceDetector (ideviceinfo + cfgutil), SuperviseRunner (spawnt supervise-magic CLI), MDMClient (PUT /v1/enqueue?push=1, Apple XML-Plist, identisch zum server-watcher-Format), MDMStatus (DB-Real- Check + ManagedApplicationList-Result-Read). Plus: - fix(supervise-magic): EOF nach ProcessMessage Response (ErrorCode=0) ist Success, nicht Error — vermeidet false-fail bei iPhone-Restore- Reboot - feat(mdm-profiles): rebreak-content-filter-mdm.mobileconfig als MDM-Push-Variante (ohne ConsentText, ohne globales allowAppRemoval= false — per-app via managed-state) End-to-End validiert: App-Push via Ad-Hoc-Manifest (silent), Managed- State via ManagedApplicationList-Query, NEFilter-Mode nach App-Force- Quit, Lock-Profile non-removable nach Sideload. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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("Wizard schließen / Neuer Bind") {
|
|
model.reset()
|
|
}
|
|
.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)
|
|
}
|
|
}
|