fix(monitor): clarify BORG key guidance

This commit is contained in:
martino
2026-09-22 19:00:29 +02:00
parent 976998806c
commit 56d51dd461
6 changed files with 390 additions and 7 deletions
+6 -7
View File
@@ -6435,7 +6435,7 @@ function AddDestinationDialog({
<Label htmlFor="borgSshUser">{t("backup.fields.sshUser")}</Label>
<Input id="borgSshUser" value={borgSshUser} onChange={(e) => setBorgSshUser(e.target.value)} className="font-mono mt-1" placeholder="borg" />
<p className="text-xs text-muted-foreground mt-1">
{t("backup.destinations.sshUserHelpBefore")} <code className="font-mono">borg serve</code>. {t("backup.destinations.sshUserHelpAfter")} <code className="font-mono">borg</code>, {t("backup.destinations.not")} <code className="font-mono">root</code>.
{t("backup.destinations.sshUserHelpMessage")}
</p>
</div>
<div className="grid grid-cols-[1fr_100px] gap-3">
@@ -6464,14 +6464,13 @@ function AddDestinationDialog({
<Label htmlFor="borgKeyPath">{t("backup.fields.sshKeyPath")}</Label>
<Input id="borgKeyPath" value={borgSshKeyPath} onChange={(e) => setBorgSshKeyPath(e.target.value)} className="font-mono mt-1" />
<p className="text-xs text-muted-foreground mt-1">
{t("backup.destinations.sshKeyHelpBefore")}
{" "}{t("backup.destinations.sshKeyHelpMiddle")} <span className="font-medium text-foreground">{t("backup.actions.generateKey")}</span> {t("backup.destinations.sshKeyHelpAfter")}
{t("backup.destinations.sshKeyHelpMessage", { action: t("backup.actions.prepareSshKey") })}
</p>
</div>
<div className="rounded-md border border-border bg-card p-3 space-y-2">
<div className="flex items-center justify-between gap-2">
<span className="text-xs font-medium">{t("backup.destinations.generateNewSshKey")}</span>
<span className="text-xs font-medium">{t("backup.destinations.sshKeySetupTitle")}</span>
<Button
type="button"
size="sm"
@@ -6481,13 +6480,13 @@ function AddDestinationDialog({
onClick={generateBorgKey}
>
{generatingKey ? <Loader2 className="h-3.5 w-3.5 animate-spin mr-1" /> : <Plus className="h-3.5 w-3.5 mr-1" />}
{generatedKey ? t("backup.actions.regenerate") : t("backup.actions.generateKey")}
{t("backup.actions.prepareSshKey")}
</Button>
</div>
{generatedKey ? (
<>
<p className="text-[11px] text-muted-foreground">
{t("backup.destinations.appendAuthorizedKeyBefore")} <code className="font-mono">~{borgSshUser}/.ssh/authorized_keys</code>:
{t("backup.destinations.sshAuthorizedKeyHelp", { user: borgSshUser })}
</p>
<textarea
readOnly
@@ -6498,7 +6497,7 @@ function AddDestinationDialog({
</>
) : (
<p className="text-[11px] text-muted-foreground">
{t("backup.destinations.createsSshKeyBefore")} <code className="font-mono">borg serve</code> {t("backup.destinations.createsSshKeyAfter")}
{t("backup.destinations.sshKeySetupHelp")}
</p>
)}
</div>
+6
View File
@@ -3820,6 +3820,7 @@
"enable": "Enable",
"format": "Format",
"generateKey": "Generate key",
"prepareSshKey": "Prepare key",
"import": "Import",
"importKeyfile": "Import keyfile",
"mount": "Mount",
@@ -3981,11 +3982,16 @@
"saveAnotherPbsTitle": "Save another PBS destination",
"shortIdentifierHelp": "Short name shown in Monitor.",
"single": "Destination",
"sshAuthorizedKeyHelp": "Review the line below before adding it to ~/.ssh/authorized_keys for {user} on the remote host.",
"sshKeyHelpAfter": "and allow it on the remote host.",
"sshKeyHelpBefore": "Monitor stores the private key at",
"sshKeyHelpMiddle": "Copy the public key to",
"sshKeyHelpMessage": "Private key path on this host. Use {action}, then review and add the displayed public-key line to the remote user's ~/.ssh/authorized_keys.",
"sshKeySetupHelp": "Creates a key at the specified local path if none exists; otherwise reads its public key. No key is installed on the remote host.",
"sshKeySetupTitle": "SSH key setup",
"sshUserHelpAfter": "for example root.",
"sshUserHelpBefore": "User on the remote host,",
"sshUserHelpMessage": "Remote account used to access the Borg repository, for example borg.",
"title": "Destinations",
"unmountTitle": "Unmount this destination",
"whereIsBorgRepo": "Where is the Borg repository?"