fix(magic): melde Lock-Profil ans Backend und zeige 'Voller Schutz aktiv'
- 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
This commit is contained in:
parent
4e60081be9
commit
b04c4d1c93
@ -271,7 +271,7 @@
|
||||
{{ action.label }}
|
||||
</UButton>
|
||||
<UButton v-else :color="action.color" :variant="action.variant" size="sm" :icon="action.icon"
|
||||
:loading="manualSyncing || autoSyncing || isSearching" :disabled="autoSyncing || isSearching"
|
||||
:loading="manualSyncing || autoSyncing || isSearching" :disabled="autoSyncing || isSearching || action.disabled"
|
||||
@click="onActionClick">
|
||||
{{ action.label }}
|
||||
</UButton>
|
||||
@ -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<IosAction>(() => {
|
||||
@ -678,10 +687,11 @@ const action = computed<IosAction>(() => {
|
||||
}
|
||||
|
||||
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";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user