fix(magic): show backend MDM status even when iPhone is not connected via USB
This commit is contained in:
parent
c1f5f5804d
commit
cb6dd0555a
@ -62,9 +62,8 @@
|
||||
<span>Verbinde dein iPhone mit USB, um den Schutz zu vervollständigen.</span>
|
||||
</div>
|
||||
|
||||
<!-- Split backend / local cards when USB-connected -->
|
||||
<!-- Backend-MDM always visible; local USB only when connected -->
|
||||
<div
|
||||
v-else
|
||||
class="mt-4 grid grid-cols-1 md:grid-cols-2 gap-4 relative"
|
||||
>
|
||||
<!-- Animated sync overlay -->
|
||||
@ -129,7 +128,10 @@
|
||||
</div>
|
||||
|
||||
<!-- Local USB device card -->
|
||||
<div class="rounded-xl bg-gray-50 dark:bg-gray-800/50 p-4">
|
||||
<div
|
||||
v-if="isConnected"
|
||||
class="rounded-xl bg-gray-50 dark:bg-gray-800/50 p-4"
|
||||
>
|
||||
<div class="flex items-center justify-between mb-3">
|
||||
<span class="text-xs font-bold uppercase tracking-wide text-gray-500 dark:text-gray-400">
|
||||
Lokales USB-Gerät
|
||||
@ -382,17 +384,20 @@ const mismatches = computed(() => {
|
||||
});
|
||||
|
||||
const isProtectionIncomplete = computed(() => {
|
||||
if (!props.isConnected || !props.iphone) return true;
|
||||
if (mdmState.value.loading || !mdmState.value.data) return false;
|
||||
|
||||
const backend = mdmState.value.data;
|
||||
if (!backend.enrolled) return true;
|
||||
if (!backend.supervised) return true;
|
||||
if (!backend.lockProfileInstalled) return true;
|
||||
|
||||
// Local checks only matter when an iPhone is actually connected via USB.
|
||||
if (props.isConnected && props.iphone) {
|
||||
if (!props.iphone.isSupervised) return true;
|
||||
if (!localEnrollment.value) return true;
|
||||
if (!localLock.value) return true;
|
||||
if (!localApp.value) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
@ -400,12 +405,16 @@ const isProtectionIncomplete = computed(() => {
|
||||
const showIncompleteHint = computed(() => isProtectionIncomplete.value);
|
||||
|
||||
const incompleteMessage = computed(() => {
|
||||
if (!props.isConnected || !props.iphone) {
|
||||
return "Verbinde dein iPhone per USB, damit wir den lokalen Schutz prüfen können.";
|
||||
}
|
||||
if (!mdmState.value.data?.enrolled) {
|
||||
return "Das Gerät ist im Backend noch nicht MDM-enrolled.";
|
||||
}
|
||||
if (!mdmState.value.data?.supervised) {
|
||||
return "Das Gerät ist im Backend nicht supervised.";
|
||||
}
|
||||
if (!mdmState.value.data?.lockProfileInstalled) {
|
||||
return "Das Lock-Profil ist im Backend noch nicht als aktiv markiert.";
|
||||
}
|
||||
if (props.isConnected && props.iphone) {
|
||||
if (!props.iphone.isSupervised) {
|
||||
return "Das iPhone ist nicht supervised.";
|
||||
}
|
||||
@ -418,8 +427,6 @@ const incompleteMessage = computed(() => {
|
||||
if (!localApp.value) {
|
||||
return "Die ReBreak App fehlt auf dem iPhone.";
|
||||
}
|
||||
if (!mdmState.value.data?.lockProfileInstalled) {
|
||||
return "Das Lock-Profil ist im Backend noch nicht als aktiv markiert.";
|
||||
}
|
||||
return "Schutz ist noch unvollständig.";
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user