fix(xo-web/remotes): don't merge all properties into url

Related to #7343

Introduced by fb1bf6a1e7
This commit is contained in:
Julien Fontanet 2024-02-12 14:51:04 +01:00
parent b5d9d9a9e1
commit 7cea445c21
2 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@
- [Settings/XO Config] Sort backups from newest to oldest
- [Plugins/audit] Don't log `tag.getAllConfigured` calls
- [Remotes] Correctly clear error when the remote is tested with success
### Packages to release

View File

@ -33,7 +33,7 @@ const formatError = error => (typeof error === 'string' ? error : JSON.stringify
const _changeUrlElement = (value, { remote, element }) =>
editRemote(remote, {
url: format({ ...remote, [element]: value === null ? undefined : value }),
url: format({ ...parse(remote.url), [element]: value === null ? undefined : value }),
})
const _showError = remote => alert(_('remoteConnectionFailed'), <pre>{formatError(remote.error)}</pre>)
const _editRemoteName = (name, { remote }) => editRemote(remote, { name })