Kotlin-Compile-Fehler im Plugin + Safe-Area der Titelleiste [apk]
All checks were successful
Build APK / build-apk (push) Successful in 4m1s
All checks were successful
Build APK / build-apk (push) Successful in 4m1s
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) <noreply@anthropic.com>
This commit is contained in:
parent
250e0f9eba
commit
280a973476
6 changed files with 15 additions and 11 deletions
|
|
@ -319,9 +319,9 @@ class NetDiagScannerPlugin : Plugin() {
|
||||||
val hop = pingWithTtl(host, ttl)
|
val hop = pingWithTtl(host, ttl)
|
||||||
hops.put(JSObject()
|
hops.put(JSObject()
|
||||||
.put("ttl", ttl)
|
.put("ttl", ttl)
|
||||||
.put("ip", hop.first)
|
.put("ip", hop.ip)
|
||||||
.put("ms", hop.second))
|
.put("ms", hop.ms))
|
||||||
if (hop.first == host || hop.reachedTarget) break
|
if (hop.ip == host || hop.reachedTarget) break
|
||||||
}
|
}
|
||||||
resolve(call, JSObject().put("hops", hops))
|
resolve(call, JSObject().put("hops", hops))
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
|
@ -397,7 +397,7 @@ class NetDiagScannerPlugin : Plugin() {
|
||||||
while (System.currentTimeMillis() < end && run.active) {
|
while (System.currentTimeMillis() < end && run.active) {
|
||||||
val q = measurePing(host, 5)
|
val q = measurePing(host, 5)
|
||||||
run.samples++
|
run.samples++
|
||||||
run.lossSum += q.getInteger("lossPct", 0)
|
run.lossSum += q.getInteger("lossPct", 0) ?: 0
|
||||||
run.avgSum += q.getDouble("avgMs")
|
run.avgSum += q.getDouble("avgMs")
|
||||||
run.maxMs = Math.max(run.maxMs, q.getDouble("maxMs"))
|
run.maxMs = Math.max(run.maxMs, q.getDouble("maxMs"))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
src/app.css
10
src/app.css
|
|
@ -15,12 +15,16 @@ body {
|
||||||
-webkit-tap-highlight-color: transparent;
|
-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 {
|
.safe-top {
|
||||||
padding-top: env(safe-area-inset-top);
|
padding-top: calc(0.75rem + env(safe-area-inset-top));
|
||||||
}
|
}
|
||||||
.safe-bottom {
|
.safe-bottom {
|
||||||
padding-bottom: env(safe-area-inset-bottom);
|
padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ampel-Farben für Messergebnisse */
|
/* Ampel-Farben für Messergebnisse */
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<header class="flex items-center gap-2 border-b border-zinc-800 bg-zinc-900 px-3 py-3 safe-top">
|
<header class="flex items-center gap-2 border-b border-zinc-800 bg-zinc-900 px-3 pb-3 safe-top">
|
||||||
{#if back}
|
{#if back}
|
||||||
<button class="rounded p-1 active:bg-zinc-800" onclick={() => history.back()} aria-label="Zurück">
|
<button class="rounded p-1 active:bg-zinc-800" onclick={() => history.back()} aria-label="Zurück">
|
||||||
<ChevronLeft size={24} />
|
<ChevronLeft size={24} />
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="pointer-events-none fixed inset-x-0 top-0 z-50 flex flex-col items-center gap-2 p-3 safe-top">
|
<div class="pointer-events-none fixed inset-x-0 top-0 z-50 flex flex-col items-center gap-2 px-3 pb-3 safe-top">
|
||||||
{#each toast.items as item (item.id)}
|
{#each toast.items as item (item.id)}
|
||||||
<div class="rounded-lg px-4 py-2 text-sm text-white shadow-lg {colors[item.type]}">
|
<div class="rounded-lg px-4 py-2 text-sm text-white shadow-lg {colors[item.type]}">
|
||||||
{item.text}
|
{item.text}
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@
|
||||||
{:else}
|
{:else}
|
||||||
{#if updateInfo}
|
{#if updateInfo}
|
||||||
<button
|
<button
|
||||||
class="bg-sky-700 px-4 py-2 text-sm text-white safe-top"
|
class="bg-sky-700 px-4 pb-2 text-sm text-white safe-top"
|
||||||
onclick={() => updateInfo && openUpdate(updateInfo)}
|
onclick={() => updateInfo && openUpdate(updateInfo)}
|
||||||
>
|
>
|
||||||
Neue Version {updateInfo.version} verfügbar — tippen zum Aktualisieren
|
Neue Version {updateInfo.version} verfügbar — tippen zum Aktualisieren
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex min-h-screen flex-col items-center justify-center gap-6 p-6 safe-top safe-bottom">
|
<div class="flex min-h-screen flex-col items-center justify-center gap-6 px-6 safe-top safe-bottom">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<h1 class="text-2xl font-bold text-sky-400">NetDiag</h1>
|
<h1 class="text-2xl font-bold text-sky-400">NetDiag</h1>
|
||||||
<p class="text-sm text-zinc-400">Netzwerk-Diagnose</p>
|
<p class="text-sm text-zinc-400">Netzwerk-Diagnose</p>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue