@lingk/sync 1.0.10 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -659,7 +659,8 @@ module.exports =
659
659
  };
660
660
 
661
661
  _this.state = {
662
- actualCreds: {}
662
+ actualCreds: {},
663
+ showPass: false
663
664
  };
664
665
  return _this;
665
666
  }
@@ -724,15 +725,16 @@ module.exports =
724
725
 
725
726
  var isAdapter = config && (config.metadataEndpoint === 'testconnection' || config.metadataEndpoint === 'adaptermetadata');
726
727
 
728
+ var isSFTP = config.type === 'SFTP';
729
+ var noRootUrl = isSFTP;
730
+
727
731
  return _react2.default.createElement(
728
732
  'div',
729
733
  { className: 'env-section-body' },
730
734
  config.message && !isGoogle ? _react2.default.createElement(
731
735
  'p',
732
- null,
733
- config.message,
734
- _react2.default.createElement('br', null),
735
- _react2.default.createElement('br', null)
736
+ { style: { marginBottom: 16 } },
737
+ config.message
736
738
  ) : _react2.default.createElement('div', { style: { height: 13 } }),
737
739
  isOauth ? _react2.default.createElement(_oauth2.default, { wizard: wizard, onCheck: check,
738
740
  creds: this.props.creds, providerType: providerType,
@@ -749,7 +751,7 @@ module.exports =
749
751
  onCheck: check }) : _react2.default.createElement(
750
752
  'div',
751
753
  null,
752
- _react2.default.createElement(
754
+ !noRootUrl && _react2.default.createElement(
753
755
  'div',
754
756
  { style: { marginLeft: 16 } },
755
757
  _react2.default.createElement(
@@ -792,15 +794,19 @@ module.exports =
792
794
  ),
793
795
  config.credentials && _react2.default.createElement(
794
796
  'div',
795
- { style: { marginLeft: 16 } },
796
- _react2.default.createElement('br', null),
797
- _react2.default.createElement(
798
- 'label',
799
- { htmlFor: 'creds' },
800
- providerType,
801
- ' Credentials'
797
+ { style: { marginLeft: !noRootUrl ? 16 : 0 } },
798
+ !noRootUrl && _react2.default.createElement(
799
+ 'div',
800
+ null,
801
+ _react2.default.createElement('br', null),
802
+ _react2.default.createElement(
803
+ 'label',
804
+ { htmlFor: 'creds' },
805
+ providerType,
806
+ ' Credentials'
807
+ ),
808
+ _react2.default.createElement('br', null)
802
809
  ),
803
- _react2.default.createElement('br', null),
804
810
  _react2.default.createElement(
805
811
  'div',
806
812
  { style: { display: 'inline-block', marginLeft: 16 } },
@@ -814,10 +820,25 @@ module.exports =
814
820
  unCamelize(credType)
815
821
  ),
816
822
  _react2.default.createElement('br', null),
817
- _react2.default.createElement(Input, { name: credType,
818
- onKeyPress: _this2.credKeyPress,
823
+ _react2.default.createElement(Input, { name: credType, onKeyPress: _this2.credKeyPress,
824
+ datatype: credType === 'password' && !_this2.state.showPass ? 'password' : null,
819
825
  value: _this2.state.actualCreds[credType] || '',
820
- onChange: _this2.onChange })
826
+ onChange: _this2.onChange }),
827
+ index === 0 && noRootUrl && _react2.default.createElement(
828
+ Button,
829
+ {
830
+ onClick: function onClick() {
831
+ return check(_this2.state.actualCreds);
832
+ },
833
+ style: { marginLeft: 8, marginBottom: 4, height: 30, lineHeight: '10px' },
834
+ disabled: credsDisabledCheck },
835
+ 'Test Connection'
836
+ ),
837
+ credType === 'password' && _react2.default.createElement(Key, { showPass: _this2.state.showPass,
838
+ onClick: function onClick() {
839
+ return _this2.setState({ showPass: !_this2.state.showPass });
840
+ }
841
+ })
821
842
  );
822
843
  })
823
844
  )
@@ -841,6 +862,20 @@ module.exports =
841
862
  }(_react.Component);
842
863
 
843
864
  exports.default = EnvSection;
865
+
866
+
867
+ var Key = function Key(_ref) {
868
+ var onClick = _ref.onClick,
869
+ showPass = _ref.showPass;
870
+
871
+ return _react2.default.createElement(
872
+ 'svg',
873
+ { onClick: onClick, style: showPass ? { fill: '#3a91dcb3' } : {},
874
+ height: '24', width: '24', className: 'pass-key-svg', viewBox: '0 0 24 24' },
875
+ _react2.default.createElement('path', { d: 'M0 0h24v24H0z', fill: 'none' }),
876
+ _react2.default.createElement('path', { d: 'M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4H12.65zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z' })
877
+ );
878
+ };
844
879
 
845
880
  /***/ },
846
881