diff --git a/client/components/main/Main/ConnectionSelector/Config.jsx b/client/components/main/Main/ConnectionSelector/Config.jsx index 9839e421..3238617f 100644 --- a/client/components/main/Main/ConnectionSelector/Config.jsx +++ b/client/components/main/Main/ConnectionSelector/Config.jsx @@ -55,6 +55,18 @@ class Config extends React.Component { this.setProp(property, value); } + duplicate() { + if (this.props.favorite) { + const data = Object.assign(this.props.favorite.toJS(), this.state.data.toJS()); + delete data.key; + this.props.onDuplicate(data); + } else { + const data = this.state.data.toJS(); + data.name = 'Quick Connect' + this.props.onDuplicate(data); + } + } + save() { if (this.props.favorite && this.state.changed) { this.props.onSave(this.state.data.toJS()); @@ -141,6 +153,11 @@ class Config extends React.Component {