update debug bundle text

This commit is contained in:
Eduard Gert
2026-06-09 18:23:07 +02:00
parent dac2ca4088
commit d70b3a3fa4
10 changed files with 28 additions and 21 deletions
@@ -13,6 +13,7 @@ import { Input } from "@/components/inputs/Input";
import { Label } from "@/components/typography/Label"; import { Label } from "@/components/typography/Label";
import { SquareIcon } from "@/components/SquareIcon"; import { SquareIcon } from "@/components/SquareIcon";
import { cn } from "@/lib/cn"; import { cn } from "@/lib/cn";
import { formatRemaining } from "@/lib/formatters";
import type { DebugStage } from "@/contexts/DebugBundleContext"; import type { DebugStage } from "@/contexts/DebugBundleContext";
import { useDebugBundleContext } from "@/contexts/DebugBundleContext"; import { useDebugBundleContext } from "@/contexts/DebugBundleContext";
import { SectionGroup, SettingsBottomBar } from "@/modules/settings/SettingsSection.tsx"; import { SectionGroup, SettingsBottomBar } from "@/modules/settings/SettingsSection.tsx";
@@ -133,13 +134,24 @@ function ProgressSection({
<CenteredPanel> <CenteredPanel>
<SquareIcon icon={Loader2} className={"[&_svg]:animate-spin"} /> <SquareIcon icon={Loader2} className={"[&_svg]:animate-spin"} />
<div className={"flex flex-col items-center gap-2 max-w-xs"}> <div className={"flex flex-col items-center gap-2 max-w-sm"}>
<DialogHeading className={"text-balance"}>{stageLabel(stage, t)}</DialogHeading> <DialogHeading className={"text-balance"}>{stageLabel(stage, t)}</DialogHeading>
<DialogDescription> <DialogDescription>
{t("settings.troubleshooting.progress.description")} {t("settings.troubleshooting.progress.description")}
</DialogDescription> </DialogDescription>
</div> </div>
{stage.kind === "capturing" && (
<div
className={
"font-mono font-semibold text-2xl tabular-nums text-nb-gray-50 tracking-wider"
}
aria-live={"polite"}
>
{formatRemaining(stage.remainingSec)}
</div>
)}
<DialogActions className={"max-w-[220px]"}> <DialogActions className={"max-w-[220px]"}>
<Button <Button
autoFocus autoFocus
@@ -178,7 +190,7 @@ function DoneResult({
<CenteredPanel> <CenteredPanel>
<SquareIcon icon={CircleCheckBig} className={"[&_svg]:text-green-500"} /> <SquareIcon icon={CircleCheckBig} className={"[&_svg]:text-green-500"} />
<div className={"flex flex-col items-center gap-2 max-w-xs"}> <div className={"flex flex-col items-center gap-2 max-w-sm"}>
<DialogHeading className={"text-balance"}> <DialogHeading className={"text-balance"}>
{showKey {showKey
? t("settings.troubleshooting.done.uploadedTitle") ? t("settings.troubleshooting.done.uploadedTitle")
@@ -191,7 +203,7 @@ function DoneResult({
</DialogDescription> </DialogDescription>
</div> </div>
<div className={"w-full max-w-xs flex flex-col gap-3"}> <div className={"w-full max-w-sm flex flex-col gap-3"}>
{showKey && <Input value={result.uploadedKey} readOnly copy />} {showKey && <Input value={result.uploadedKey} readOnly copy />}
{result.path && !showKey && ( {result.path && !showKey && (
@@ -268,13 +280,8 @@ const stageLabel = (
return t("settings.troubleshooting.stage.preparingTrace"); return t("settings.troubleshooting.stage.preparingTrace");
case "reconnecting": case "reconnecting":
return t("settings.troubleshooting.stage.reconnecting"); return t("settings.troubleshooting.stage.reconnecting");
case "capturing": { case "capturing":
const fmt = (s: number) => `${Math.floor(s / 60)}:${String(s % 60).padStart(2, "0")}`; return t("settings.troubleshooting.stage.capturing");
return t("settings.troubleshooting.stage.capturing", {
elapsed: fmt(stage.totalSec - stage.remainingSec),
total: fmt(stage.totalSec),
});
}
case "restoring-level": case "restoring-level":
return t("settings.troubleshooting.stage.restoring"); return t("settings.troubleshooting.stage.restoring");
case "bundling": case "bundling":
+1 -1
View File
@@ -777,7 +777,7 @@
"message": "NetBird wird neu verbunden…" "message": "NetBird wird neu verbunden…"
}, },
"settings.troubleshooting.stage.capturing": { "settings.troubleshooting.stage.capturing": {
"message": "Logs werden erfasst — {elapsed} / {total}" "message": "Logs werden erfasst"
}, },
"settings.troubleshooting.stage.restoring": { "settings.troubleshooting.stage.restoring": {
"message": "Vorheriges Log-Level wird wiederhergestellt…" "message": "Vorheriges Log-Level wird wiederhergestellt…"
+3 -3
View File
@@ -984,8 +984,8 @@
"description": "Button to create the debug bundle. Keep short." "description": "Button to create the debug bundle. Keep short."
}, },
"settings.troubleshooting.progress.description": { "settings.troubleshooting.progress.description": {
"message": "Collecting logs, system details, and connection state. This usually takes a moment — keep this window open until it completes.", "message": "Collecting logs, system details, and connection state. This usually takes a moment. You can keep using NetBird or close Settings while it finishes.",
"description": "Status text shown while the bundle is being collected; asks the user to keep the window open." "description": "Status text shown while the debug bundle is being collected; reassures the user they can keep using NetBird or close Settings meanwhile."
}, },
"settings.troubleshooting.cancelling": { "settings.troubleshooting.cancelling": {
"message": "Canceling…", "message": "Canceling…",
@@ -1036,7 +1036,7 @@
"description": "Progress stage: reconnecting NetBird. Ends with an ellipsis." "description": "Progress stage: reconnecting NetBird. Ends with an ellipsis."
}, },
"settings.troubleshooting.stage.capturing": { "settings.troubleshooting.stage.capturing": {
"message": "Capturing logs — {elapsed} / {total}", "message": "Capturing logs",
"description": "Progress stage: capturing logs. {elapsed} and {total} are time values (e.g. 0:30 / 2:00); keep both." "description": "Progress stage: capturing logs. {elapsed} and {total} are time values (e.g. 0:30 / 2:00); keep both."
}, },
"settings.troubleshooting.stage.restoring": { "settings.troubleshooting.stage.restoring": {
+1 -1
View File
@@ -777,7 +777,7 @@
"message": "Reconectando NetBird…" "message": "Reconectando NetBird…"
}, },
"settings.troubleshooting.stage.capturing": { "settings.troubleshooting.stage.capturing": {
"message": "Capturando registros: {elapsed} / {total}" "message": "Capturando registros"
}, },
"settings.troubleshooting.stage.restoring": { "settings.troubleshooting.stage.restoring": {
"message": "Restaurando el nivel de registro anterior…" "message": "Restaurando el nivel de registro anterior…"
+1 -1
View File
@@ -777,7 +777,7 @@
"message": "Reconnexion de NetBird…" "message": "Reconnexion de NetBird…"
}, },
"settings.troubleshooting.stage.capturing": { "settings.troubleshooting.stage.capturing": {
"message": "Capture des journaux — {elapsed} / {total}" "message": "Capture des journaux"
}, },
"settings.troubleshooting.stage.restoring": { "settings.troubleshooting.stage.restoring": {
"message": "Rétablissement du niveau de journalisation précédent…" "message": "Rétablissement du niveau de journalisation précédent…"
+1 -1
View File
@@ -777,7 +777,7 @@
"message": "NetBird újracsatlakoztatása…" "message": "NetBird újracsatlakoztatása…"
}, },
"settings.troubleshooting.stage.capturing": { "settings.troubleshooting.stage.capturing": {
"message": "Naplók rögzítése — {elapsed} / {total}" "message": "Naplók rögzítése"
}, },
"settings.troubleshooting.stage.restoring": { "settings.troubleshooting.stage.restoring": {
"message": "Korábbi napló szint visszaállítása…" "message": "Korábbi napló szint visszaállítása…"
+1 -1
View File
@@ -777,7 +777,7 @@
"message": "Riconnessione di NetBird…" "message": "Riconnessione di NetBird…"
}, },
"settings.troubleshooting.stage.capturing": { "settings.troubleshooting.stage.capturing": {
"message": "Acquisizione log — {elapsed} / {total}" "message": "Acquisizione log"
}, },
"settings.troubleshooting.stage.restoring": { "settings.troubleshooting.stage.restoring": {
"message": "Ripristino del livello di log precedente…" "message": "Ripristino del livello di log precedente…"
+1 -1
View File
@@ -777,7 +777,7 @@
"message": "Reconectando o NetBird…" "message": "Reconectando o NetBird…"
}, },
"settings.troubleshooting.stage.capturing": { "settings.troubleshooting.stage.capturing": {
"message": "Capturando logs — {elapsed} / {total}" "message": "Capturando logs"
}, },
"settings.troubleshooting.stage.restoring": { "settings.troubleshooting.stage.restoring": {
"message": "Restaurando o nível de log anterior…" "message": "Restaurando o nível de log anterior…"
+1 -1
View File
@@ -777,7 +777,7 @@
"message": "Переподключение NetBird…" "message": "Переподключение NetBird…"
}, },
"settings.troubleshooting.stage.capturing": { "settings.troubleshooting.stage.capturing": {
"message": "Сбор журналов — {elapsed} / {total}" "message": "Сбор журналов"
}, },
"settings.troubleshooting.stage.restoring": { "settings.troubleshooting.stage.restoring": {
"message": "Восстановление прежнего уровня журналирования…" "message": "Восстановление прежнего уровня журналирования…"
+1 -1
View File
@@ -777,7 +777,7 @@
"message": "正在重新连接 NetBird…" "message": "正在重新连接 NetBird…"
}, },
"settings.troubleshooting.stage.capturing": { "settings.troubleshooting.stage.capturing": {
"message": "正在捕获日志 — {elapsed} / {total}" "message": "正在捕获日志"
}, },
"settings.troubleshooting.stage.restoring": { "settings.troubleshooting.stage.restoring": {
"message": "正在恢复先前的日志级别…" "message": "正在恢复先前的日志级别…"