tmp(magic): debug logging for current device matching

This commit is contained in:
chahinebrini 2026-06-17 03:19:10 +02:00
parent 10ca1c4bc5
commit 48af756a86

View File

@ -1,4 +1,4 @@
import { computed, type Ref } from "vue";
import { computed, watchEffect, type Ref } from "vue";
import type { MagicDeviceInfo, IphoneDeviceState } from "./useTauri";
export type DeviceStatus = "active" | "cooldown" | "revoked" | "pending" | "unprotected";
@ -93,6 +93,12 @@ export function useDeviceStatus(
};
});
// DEBUG: log current device matching details
watchEffect(() => {
const ids = devices.value.map((d) => ({ deviceId: d.deviceId, hostname: d.hostname, platform: d.model ?? d.hostname }));
console.log("[useDeviceStatus] local deviceId:", currentDeviceId?.value ?? "(none)", "hostname:", localHostname.value ?? "(none)", "backend ids:", ids, "matched:", currentBackendDevice.value?.deviceId ?? "(none)");
});
return {
currentBackendDevice,
otherDevices,