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

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

Browse files
src/components/tw-security-manager-modal/embed.jsx CHANGED
@@ -1,8 +1,10 @@
1
  import React from 'react';
2
  import PropTypes from 'prop-types';
 
3
  import {FormattedMessage} from 'react-intl';
4
  import URL from './url.jsx';
5
  import DataURL from './data-url.jsx';
 
6
 
7
  const EmbedModal = props => (
8
  <div>
@@ -46,11 +48,36 @@ const EmbedModal = props => (
46
  />
47
  </p>
48
  )}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  </div>
50
  );
51
 
52
  EmbedModal.propTypes = {
53
- url: PropTypes.string.isRequired
 
 
54
  };
55
 
56
- export default EmbedModal;
 
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 DataURL from './data-url.jsx';
7
+ import FancyCheckbox from '../tw-fancy-checkbox/checkbox.jsx';
8
 
9
  const EmbedModal = props => (
10
  <div>
 
48
  />
49
  </p>
50
  )}
51
+
52
+ <label className={usbStyles.unsandboxedContainer}>
53
+ <FancyCheckbox
54
+ className={usbStyles.unsandboxedCheckbox}
55
+ checked={props.remember}
56
+ onChange={props.onChangeRemember}
57
+ />
58
+ <FormattedMessage
59
+ defaultMessage="Remember my choice for all websites"
60
+ description="Message that allows the user to allow or deny embedding any website in the future"
61
+ id="pm.embed.connectFuture"
62
+ />
63
+ </label>
64
+ {props.remember && (
65
+ <div className={usbStyles.unsandboxedWarning}>
66
+ <FormattedMessage
67
+ // eslint-disable-next-line max-len
68
+ defaultMessage="Enabling embedding 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 embed with this setting enabled."
69
+ description="Part of modal asking to allow connecting to any website in the future, warning that it is unsafe"
70
+ id="pm.embed.connectFutureWarning"
71
+ />
72
+ </div>
73
+ )}
74
  </div>
75
  );
76
 
77
  EmbedModal.propTypes = {
78
+ url: PropTypes.string.isRequired,
79
+ remember: PropTypes.bool.isRequired,
80
+ onChangeRemember: PropTypes.func
81
  };
82
 
83
+ export default EmbedModal;