feat(xo-web/settings/remotes): warning when creating a local remote (#3142)
Fixes #3105
This commit is contained in:
commit
46100729b0
@ -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 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))
|
- [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) (PR [3142](https://github.com/vatesfr/xen-orchestra/pull/3142))
|
||||||
|
|
||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import SortedTable from 'sorted-table'
|
|||||||
import StateButton from 'state-button'
|
import StateButton from 'state-button'
|
||||||
import Tooltip from 'tooltip'
|
import Tooltip from 'tooltip'
|
||||||
import { addSubscriptions } from 'utils'
|
import { addSubscriptions } from 'utils'
|
||||||
import { alert } from 'modal'
|
import { alert, confirm } from 'modal'
|
||||||
import { error } from 'notification'
|
import { error } from 'notification'
|
||||||
import { format, parse } from 'xo-remote-parser'
|
import { format, parse } from 'xo-remote-parser'
|
||||||
import { Password, Text } from 'editable'
|
import { Password, Text } from 'editable'
|
||||||
@ -305,6 +305,13 @@ export default class Remotes extends Component {
|
|||||||
password && (urlParams.password = password)
|
password && (urlParams.password = password)
|
||||||
domain && (urlParams.domain = domain)
|
domain && (urlParams.domain = domain)
|
||||||
|
|
||||||
|
if (type === 'file') {
|
||||||
|
await confirm({
|
||||||
|
title: _('localRemoteWarningTitle'),
|
||||||
|
body: _('localRemoteWarningMessage'),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const url = format(urlParams)
|
const url = format(urlParams)
|
||||||
return createRemote(name, url).then(
|
return createRemote(name, url).then(
|
||||||
() => {
|
() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user