Align remote setup copy with vault bindings

This commit is contained in:
Joe Julian
2026-04-06 17:19:04 -07:00
parent 73eea0a066
commit 71a0d75886
2 changed files with 45 additions and 3 deletions
+15 -3
View File
@@ -2109,6 +2109,10 @@ func (u *ui) remotePreferencesRetentionSummary() string {
return "KeePassGO keeps up to six recent connections. Store remote credentials in the vault if this connection should persist across devices or reinstalls."
}
func (u *ui) remotePreferencesPersistenceSummary() string {
return "After a successful remote open, KeePassGO can keep a local cache vault and store the shared remote target plus this user's credential entry in the vault itself."
}
func (u *ui) availableRemoteProfiles() []vault.RemoteProfile {
profiles, err := u.state.RemoteProfiles()
if err != nil {
@@ -2280,6 +2284,14 @@ func (u *ui) saveCurrentRemoteBindingAction() error {
return nil
}
func (u *ui) saveCurrentRemoteBindingHeading() string {
return "Bind this local vault to the current remote target"
}
func (u *ui) saveCurrentRemoteBindingButtonLabel() string {
return "Save Remote In Vault"
}
func (u *ui) materializeCurrentRemoteCache() error {
cachePath := strings.TrimSpace(u.vaultPath.Text())
if cachePath == "" {
@@ -4377,7 +4389,7 @@ func (u *ui) remotePrefsDialogContent(gtx layout.Context) layout.Dimensions {
},
layout.Spacer{Height: unit.Dp(8)}.Layout,
func(gtx layout.Context) layout.Dimensions {
return approvalFact(u.theme, "When Sign-in Saves", "Username and password or app token are only stored after a successful remote open when Remember sign-in is enabled.", "")(gtx)
return approvalFact(u.theme, "How Persistence Works", u.remotePreferencesPersistenceSummary(), "")(gtx)
},
layout.Spacer{Height: unit.Dp(14)}.Layout,
func(gtx layout.Context) layout.Dimensions {
@@ -4972,13 +4984,13 @@ func (u *ui) syncMenu(gtx layout.Context) layout.Dimensions {
rows = append(rows,
layout.Rigid(layout.Spacer{Height: unit.Dp(10)}.Layout),
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
lbl := material.Label(u.theme, unit.Sp(11), "Store the current remote sign-in in this vault")
lbl := material.Label(u.theme, unit.Sp(11), u.saveCurrentRemoteBindingHeading())
lbl.Color = mutedColor
return lbl.Layout(gtx)
}),
layout.Rigid(layout.Spacer{Height: unit.Dp(6)}.Layout),
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
return tonedButton(gtx, u.theme, &u.saveCurrentRemoteBinding, "Save Current Remote In Vault")
return tonedButton(gtx, u.theme, &u.saveCurrentRemoteBinding, u.saveCurrentRemoteBindingButtonLabel())
}),
)
}