From 124d74305269c6007c40ea8fe743e90414449593 Mon Sep 17 00:00:00 2001 From: Pierre Donias Date: Mon, 2 Jul 2018 09:55:14 +0200 Subject: [PATCH 1/2] feat(xo-web/settings/remotes): warning when creating a local remote Fixes #3105 --- CHANGELOG.md | 1 + packages/xo-web/src/xo-app/settings/remotes/index.js | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c95021d7f..5d7b050db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/packages/xo-web/src/xo-app/settings/remotes/index.js b/packages/xo-web/src/xo-app/settings/remotes/index.js index e780aeae7..7fb13f244 100644 --- a/packages/xo-web/src/xo-app/settings/remotes/index.js +++ b/packages/xo-web/src/xo-app/settings/remotes/index.js @@ -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( () => { From 4916643fdc71bfb524a8b3f60956c8357775e6fe Mon Sep 17 00:00:00 2001 From: Pierre Donias Date: Wed, 4 Jul 2018 15:46:21 +0200 Subject: [PATCH 2/2] PR --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d7b050db..89dd57970 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +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) +- 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