From b04c4d1c939338bb969e495ceb02ed42a965a018 Mon Sep 17 00:00:00 2001 From: chahinebrini Date: Thu, 18 Jun 2026 08:34:45 +0200 Subject: [PATCH] fix(magic): melde Lock-Profil ans Backend und zeige 'Voller Schutz aktiv' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Nach lokaler Lock-Profil-Installation wird der Status per reportDeviceProtectionState ans Backend gemeldet - Backend-Status wird danach neu geladen - Bei vollständigem Schutz wird 'Voller Schutz aktiv' angezeigt und die Aktion deaktiviert --- .../app/components/IosDeviceCard.vue | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/apps/rebreak-magic/app/components/IosDeviceCard.vue b/apps/rebreak-magic/app/components/IosDeviceCard.vue index 4ba6329..f1d7384 100644 --- a/apps/rebreak-magic/app/components/IosDeviceCard.vue +++ b/apps/rebreak-magic/app/components/IosDeviceCard.vue @@ -271,7 +271,7 @@ {{ action.label }} {{ action.label }} @@ -325,6 +325,7 @@ const { stopLocalProfileServer, getInstalledProfiles, mdmPush, + reportDeviceProtectionState, } = useTauri(); const enrollmentPhase = ref<"idle" | "loading" | "waiting" | "checking" | "success" | "error">("idle"); @@ -540,6 +541,13 @@ const topBadge = computed(() => { variant: "subtle" as const, }; } + if (props.isConnected && props.iphone) { + return { + label: "Voller Schutz aktiv", + color: "success" as const, + variant: "subtle" as const, + }; + } const cfg = statusConfig[props.device.status]; return { label: cfg.label, color: cfg.color, variant: cfg.variant }; }); @@ -550,6 +558,7 @@ interface IosAction { color: "primary" | "warning" | "success" | "error" | "neutral"; variant: "solid" | "soft" | "outline" | "ghost"; to?: string; + disabled?: boolean; } const action = computed(() => { @@ -678,10 +687,11 @@ const action = computed(() => { } return { - label: "Synchronisieren", - icon: "i-heroicons-arrow-path", + label: "Voller Schutz aktiv", + icon: "i-heroicons-shield-check", color: "success", variant: "soft", + disabled: true, }; }); @@ -888,7 +898,21 @@ async function checkInlineLockProfile() { } lockLogs.value.push("✓ Lock-Profil erkannt"); + + lockLogs.value.push("→ Melde Lock-Profil-Status an Backend …"); + await reportDeviceProtectionState( + props.device.deviceId, + "ios", + "nefilter", + true, + "Lock-Profil via QR-Code installiert", + ); + lockLogs.value.push("✓ Backend aktualisiert"); + + lockLogs.value.push("→ Hole aktuellen Backend-Status …"); await refreshMdmStatus(); + lockLogs.value.push("✓ Status aktualisiert"); + lockPhase.value = "success"; } catch (e: any) { lockError.value = e?.message ?? "Prüfung fehlgeschlagen";