diff --git a/native-plugin/NetDiagScannerPlugin.kt b/native-plugin/NetDiagScannerPlugin.kt index 04dfeff..272a6ab 100644 --- a/native-plugin/NetDiagScannerPlugin.kt +++ b/native-plugin/NetDiagScannerPlugin.kt @@ -319,9 +319,9 @@ class NetDiagScannerPlugin : Plugin() { val hop = pingWithTtl(host, ttl) hops.put(JSObject() .put("ttl", ttl) - .put("ip", hop.first) - .put("ms", hop.second)) - if (hop.first == host || hop.reachedTarget) break + .put("ip", hop.ip) + .put("ms", hop.ms)) + if (hop.ip == host || hop.reachedTarget) break } resolve(call, JSObject().put("hops", hops)) } catch (e: Exception) { @@ -397,7 +397,7 @@ class NetDiagScannerPlugin : Plugin() { while (System.currentTimeMillis() < end && run.active) { val q = measurePing(host, 5) run.samples++ - run.lossSum += q.getInteger("lossPct", 0) + run.lossSum += q.getInteger("lossPct", 0) ?: 0 run.avgSum += q.getDouble("avgMs") run.maxMs = Math.max(run.maxMs, q.getDouble("maxMs")) } diff --git a/src/app.css b/src/app.css index 582062d..9f4065e 100644 --- a/src/app.css +++ b/src/app.css @@ -15,12 +15,16 @@ body { -webkit-tap-highlight-color: transparent; } -/* Sichere Bereiche (Notch / Statusleiste) */ +/* Sichere Bereiche (Notch / Statusleiste). + Enthalten bewusst den Basis-Innenabstand (0.75rem) — sonst überschreibt + diese Klasse das padding-top/-bottom von Tailwind py-* (unlayered CSS + schlägt @layer utilities) und der Inhalt klebt an Statusleiste/Notch. + Elemente daher mit pb-*/px-* statt py-* kombinieren. Siehe KB #551. */ .safe-top { - padding-top: env(safe-area-inset-top); + padding-top: calc(0.75rem + env(safe-area-inset-top)); } .safe-bottom { - padding-bottom: env(safe-area-inset-bottom); + padding-bottom: calc(0.75rem + env(safe-area-inset-bottom)); } /* Ampel-Farben für Messergebnisse */ diff --git a/src/lib/components/AppHeader.svelte b/src/lib/components/AppHeader.svelte index f74081e..447da2d 100644 --- a/src/lib/components/AppHeader.svelte +++ b/src/lib/components/AppHeader.svelte @@ -19,7 +19,7 @@ ); -
+
{#if back}