AppPermission: Note that apps are not E2E encrypted in E2E rooms
This commit is contained in:
parent
273abd9327
commit
2e00968bcd
2 changed files with 10 additions and 0 deletions
|
@ -47,6 +47,11 @@ export default class AppPermission extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
let e2eWarningText;
|
||||||
|
if (this.props.isRoomEncrypted) {
|
||||||
|
e2eWarningText =
|
||||||
|
<span className='mx_AppPermissionWarningTextLabel'>NOTE: Apps are not end-to-end encrypted</span>;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<div className='mx_AppPermissionWarning'>
|
<div className='mx_AppPermissionWarning'>
|
||||||
<div className='mx_AppPermissionWarningImage'>
|
<div className='mx_AppPermissionWarningImage'>
|
||||||
|
@ -54,6 +59,7 @@ export default class AppPermission extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
<div className='mx_AppPermissionWarningText'>
|
<div className='mx_AppPermissionWarningText'>
|
||||||
<span className='mx_AppPermissionWarningTextLabel'>Do you want to load widget from URL:</span> <span className='mx_AppPermissionWarningTextURL'>{this.state.curlBase}</span>
|
<span className='mx_AppPermissionWarningTextLabel'>Do you want to load widget from URL:</span> <span className='mx_AppPermissionWarningTextURL'>{this.state.curlBase}</span>
|
||||||
|
{e2eWarningText}
|
||||||
</div>
|
</div>
|
||||||
<input
|
<input
|
||||||
className='mx_AppPermissionButton'
|
className='mx_AppPermissionButton'
|
||||||
|
@ -67,9 +73,11 @@ export default class AppPermission extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
AppPermission.propTypes = {
|
AppPermission.propTypes = {
|
||||||
|
isRoomEncrypted: PropTypes.bool,
|
||||||
url: PropTypes.string.isRequired,
|
url: PropTypes.string.isRequired,
|
||||||
onPermissionGranted: PropTypes.func.isRequired,
|
onPermissionGranted: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
AppPermission.defaultProps = {
|
AppPermission.defaultProps = {
|
||||||
|
isRoomEncrypted: false,
|
||||||
onPermissionGranted: function() {},
|
onPermissionGranted: function() {},
|
||||||
};
|
};
|
||||||
|
|
|
@ -251,9 +251,11 @@ export default React.createClass({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
const isRoomEncrypted = MatrixClientPeg.get().isRoomEncrypted(this.props.room.roomId);
|
||||||
appTileBody = (
|
appTileBody = (
|
||||||
<div className="mx_AppTileBody">
|
<div className="mx_AppTileBody">
|
||||||
<AppPermission
|
<AppPermission
|
||||||
|
isRoomEncrypted={isRoomEncrypted}
|
||||||
url={this.state.widgetUrl}
|
url={this.state.widgetUrl}
|
||||||
onPermissionGranted={this._grantWidgetPermission}
|
onPermissionGranted={this._grantWidgetPermission}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue