soiz1 commited on
Commit
20ff939
·
verified ·
1 Parent(s): 35df81d

Update src/components/tw-security-manager-modal/fetch.jsx

Browse files
src/components/tw-security-manager-modal/fetch.jsx CHANGED
@@ -1,7 +1,9 @@
1
  import React from 'react';
2
  import PropTypes from 'prop-types';
 
3
  import {FormattedMessage} from 'react-intl';
4
  import URL from './url.jsx';
 
5
 
6
  const FetchModal = props => (
7
  <div>
@@ -26,11 +28,36 @@ const FetchModal = props => (
26
  id="tw.securityManager.trust"
27
  />
28
  </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  </div>
30
  );
31
 
32
  FetchModal.propTypes = {
33
- url: PropTypes.string.isRequired
 
 
34
  };
35
 
36
- export default FetchModal;
 
1
  import React from 'react';
2
  import PropTypes from 'prop-types';
3
+ import usbStyles from './load-extension.css';
4
  import {FormattedMessage} from 'react-intl';
5
  import URL from './url.jsx';
6
+ import FancyCheckbox from '../tw-fancy-checkbox/checkbox.jsx';
7
 
8
  const FetchModal = props => (
9
  <div>
 
28
  id="tw.securityManager.trust"
29
  />
30
  </p>
31
+
32
+ <label className={usbStyles.unsandboxedContainer}>
33
+ <FancyCheckbox
34
+ className={usbStyles.unsandboxedCheckbox}
35
+ checked={props.remember}
36
+ onChange={props.onChangeRemember}
37
+ />
38
+ <FormattedMessage
39
+ defaultMessage="Remember my choice for all websites"
40
+ description="Message that allows the user to allow or deny connecting to any website in the future"
41
+ id="pm.fetch.connectFuture"
42
+ />
43
+ </label>
44
+ {props.remember && (
45
+ <div className={usbStyles.unsandboxedWarning}>
46
+ <FormattedMessage
47
+ // eslint-disable-next-line max-len
48
+ defaultMessage="Enabling connecting to any future website is dangerous. These websites can share anything, including inappropriate or malicious content. This will share your IP address, general location, and possibly other data with any websites you connect to in the future. You will not be asked to confirm any of the websites that you connect to with this setting enabled."
49
+ description="Part of modal asking to allow connecting to any website in the future, warning that it is unsafe"
50
+ id="pm.fetch.connectFutureWarning"
51
+ />
52
+ </div>
53
+ )}
54
  </div>
55
  );
56
 
57
  FetchModal.propTypes = {
58
+ url: PropTypes.string.isRequired,
59
+ remember: PropTypes.bool.isRequired,
60
+ onChangeRemember: PropTypes.func
61
  };
62
 
63
+ export default FetchModal;