Re-add encryption warning to widget permission prompt
parent
2f084113f6
commit
62a2c7a51a
|
@ -30,6 +30,7 @@ export default class AppPermission extends React.Component {
|
||||||
creatorUserId: PropTypes.string.isRequired,
|
creatorUserId: PropTypes.string.isRequired,
|
||||||
roomId: PropTypes.string.isRequired,
|
roomId: PropTypes.string.isRequired,
|
||||||
onPermissionGranted: PropTypes.func.isRequired,
|
onPermissionGranted: PropTypes.func.isRequired,
|
||||||
|
isRoomEncrypted: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
|
@ -114,6 +115,8 @@ export default class AppPermission extends React.Component {
|
||||||
: _t("Using this widget may share data <helpIcon /> with %(widgetDomain)s.",
|
: _t("Using this widget may share data <helpIcon /> with %(widgetDomain)s.",
|
||||||
{widgetDomain: this.state.widgetDomain}, {helpIcon: () => warningTooltip});
|
{widgetDomain: this.state.widgetDomain}, {helpIcon: () => warningTooltip});
|
||||||
|
|
||||||
|
const encryptionWarning = this.props.isRoomEncrypted ? _t("Widgets are not encrypted.") : null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='mx_AppPermissionWarning'>
|
<div className='mx_AppPermissionWarning'>
|
||||||
<div className='mx_AppPermissionWarning_row mx_AppPermissionWarning_bolder mx_AppPermissionWarning_smallText'>
|
<div className='mx_AppPermissionWarning_row mx_AppPermissionWarning_bolder mx_AppPermissionWarning_smallText'>
|
||||||
|
@ -128,7 +131,7 @@ export default class AppPermission extends React.Component {
|
||||||
{warning}
|
{warning}
|
||||||
</div>
|
</div>
|
||||||
<div className='mx_AppPermissionWarning_row mx_AppPermissionWarning_smallText'>
|
<div className='mx_AppPermissionWarning_row mx_AppPermissionWarning_smallText'>
|
||||||
{_t("This widget may use cookies.")}
|
{_t("This widget may use cookies.")} {encryptionWarning}
|
||||||
</div>
|
</div>
|
||||||
<div className='mx_AppPermissionWarning_row'>
|
<div className='mx_AppPermissionWarning_row'>
|
||||||
<AccessibleButton kind='primary_sm' onClick={this.props.onPermissionGranted}>
|
<AccessibleButton kind='primary_sm' onClick={this.props.onPermissionGranted}>
|
||||||
|
|
|
@ -585,12 +585,14 @@ export default class AppTile extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
if (!this.state.hasPermissionToLoad) {
|
if (!this.state.hasPermissionToLoad) {
|
||||||
|
const isEncrypted = MatrixClientPeg.get().isRoomEncrypted(this.props.room.roomId);
|
||||||
appTileBody = (
|
appTileBody = (
|
||||||
<div className={appTileBodyClass}>
|
<div className={appTileBodyClass}>
|
||||||
<AppPermission
|
<AppPermission
|
||||||
roomId={this.props.room.roomId}
|
roomId={this.props.room.roomId}
|
||||||
creatorUserId={this.props.creatorUserId}
|
creatorUserId={this.props.creatorUserId}
|
||||||
url={this.state.widgetUrl}
|
url={this.state.widgetUrl}
|
||||||
|
isRoomEncrypted={isEncrypted}
|
||||||
onPermissionGranted={this._grantWidgetPermission}
|
onPermissionGranted={this._grantWidgetPermission}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1195,6 +1195,7 @@
|
||||||
"Widget ID": "Widget ID",
|
"Widget ID": "Widget ID",
|
||||||
"Using this widget may share data <helpIcon /> with %(widgetDomain)s & your Integration Manager.": "Using this widget may share data <helpIcon /> with %(widgetDomain)s & your Integration Manager.",
|
"Using this widget may share data <helpIcon /> with %(widgetDomain)s & your Integration Manager.": "Using this widget may share data <helpIcon /> with %(widgetDomain)s & your Integration Manager.",
|
||||||
"Using this widget may share data <helpIcon /> with %(widgetDomain)s.": "Using this widget may share data <helpIcon /> with %(widgetDomain)s.",
|
"Using this widget may share data <helpIcon /> with %(widgetDomain)s.": "Using this widget may share data <helpIcon /> with %(widgetDomain)s.",
|
||||||
|
"Widgets are not encrypted.": "Widgets are not encrypted.",
|
||||||
"Widget added by": "Widget added by",
|
"Widget added by": "Widget added by",
|
||||||
"This widget may use cookies.": "This widget may use cookies.",
|
"This widget may use cookies.": "This widget may use cookies.",
|
||||||
"Delete Widget": "Delete Widget",
|
"Delete Widget": "Delete Widget",
|
||||||
|
|
Loading…
Reference in New Issue