feat(xo-web/settings/remotes): warning when creating a local remote
Fixes #3105
This commit is contained in:
parent
dfdc2a62ab
commit
124d743052
@ -6,6 +6,7 @@
|
||||
|
||||
- [Backup NG form] Add a link to the remotes' settings [#2711](https://github.com/vatesfr/xen-orchestra/issues/2711) [#3106](https://github.com/vatesfr/xen-orchestra/issues/3106) [#2299](https://github.com/vatesfr/xen-orchestra/issues/2299) (PR [#3128](https://github.com/vatesfr/xen-orchestra/pull/3128))
|
||||
- [Backup NG logs] Make copy to clipboard and report buttons always available [#3130](https://github.com/vatesfr/xen-orchestra/issues/3130) (PR [#3133](https://github.com/vatesfr/xen-orchestra/pull/3133))
|
||||
- Warning message when creating a local remote [#3105](https://github.com/vatesfr/xen-orchestra/issues/3105)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
|
@ -11,7 +11,7 @@ import SortedTable from 'sorted-table'
|
||||
import StateButton from 'state-button'
|
||||
import Tooltip from 'tooltip'
|
||||
import { addSubscriptions } from 'utils'
|
||||
import { alert } from 'modal'
|
||||
import { alert, confirm } from 'modal'
|
||||
import { error } from 'notification'
|
||||
import { format, parse } from 'xo-remote-parser'
|
||||
import { Password, Text } from 'editable'
|
||||
@ -305,6 +305,13 @@ export default class Remotes extends Component {
|
||||
password && (urlParams.password = password)
|
||||
domain && (urlParams.domain = domain)
|
||||
|
||||
if (type === 'file') {
|
||||
await confirm({
|
||||
title: _('localRemoteWarningTitle'),
|
||||
body: _('localRemoteWarningMessage'),
|
||||
})
|
||||
}
|
||||
|
||||
const url = format(urlParams)
|
||||
return createRemote(name, url).then(
|
||||
() => {
|
||||
|
Loading…
Reference in New Issue
Block a user