From 280a9734764fcc1e80d9d2ff522b6fee404bb513 Mon Sep 17 00:00:00 2001 From: Eduard Wisch Date: Tue, 19 May 2026 16:17:22 +0200 Subject: [PATCH] Kotlin-Compile-Fehler im Plugin + Safe-Area der Titelleiste [apk] NetDiagScannerPlugin.kt (latente Bugs, erst durch aktivierten Kotlin-Compiler sichtbar): - traceroute: hop.first/.second -> hop.ip/.ms (Hop ist data class, kein Pair) - startStressTest: getInteger() liefert Int?, mit '?: 0' abgesichert Titelleiste klebte an der Statusleiste / war oben abgeschnitten: - safe-top/safe-bottom enthalten jetzt den Basis-Innenabstand via calc() -- sonst ueberschreibt die unlayered CSS-Klasse das padding von Tailwind py-* - Header/Toast/Update-Banner/Login auf pb-*/px-* statt py-*/p-* umgestellt Siehe KB #551. Co-Authored-By: Claude Opus 4.7 (1M context) --- native-plugin/NetDiagScannerPlugin.kt | 8 ++++---- src/app.css | 10 +++++++--- src/lib/components/AppHeader.svelte | 2 +- src/lib/components/Toast.svelte | 2 +- src/routes/+layout.svelte | 2 +- src/routes/login/+page.svelte | 2 +- 6 files changed, 15 insertions(+), 11 deletions(-) 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}