Merge pull request #1319 from matrix-org/rob/apps-not-e2ee
Note that apps are not E2EE
This commit is contained in:
commit
fde6314e0f
3 changed files with 13 additions and 1 deletions
|
@ -47,13 +47,19 @@ export default class AppPermission extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
let e2eWarningText;
|
||||||
|
if (this.props.isRoomEncrypted) {
|
||||||
|
e2eWarningText =
|
||||||
|
<span className='mx_AppPermissionWarningTextLabel'>{_t('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'>
|
||||||
<img src='img/warning.svg' alt={_t('Warning!')}/>
|
<img src='img/warning.svg' alt={_t('Warning!')}/>
|
||||||
</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'>{_t('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() {},
|
||||||
};
|
};
|
||||||
|
|
|
@ -252,9 +252,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}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -264,6 +264,7 @@
|
||||||
"Disinvite": "Disinvite",
|
"Disinvite": "Disinvite",
|
||||||
"Display name": "Display name",
|
"Display name": "Display name",
|
||||||
"Displays action": "Displays action",
|
"Displays action": "Displays action",
|
||||||
|
"Do you want to load widget from URL:": "Do you want to load widget from URL:",
|
||||||
"Don't send typing notifications": "Don't send typing notifications",
|
"Don't send typing notifications": "Don't send typing notifications",
|
||||||
"Download %(text)s": "Download %(text)s",
|
"Download %(text)s": "Download %(text)s",
|
||||||
"Drop File Here": "Drop File Here",
|
"Drop File Here": "Drop File Here",
|
||||||
|
@ -433,6 +434,7 @@
|
||||||
"AM": "AM",
|
"AM": "AM",
|
||||||
"PM": "PM",
|
"PM": "PM",
|
||||||
"NOT verified": "NOT verified",
|
"NOT verified": "NOT verified",
|
||||||
|
"NOTE: Apps are not end-to-end encrypted": "NOTE: Apps are not end-to-end encrypted",
|
||||||
"No devices with registered encryption keys": "No devices with registered encryption keys",
|
"No devices with registered encryption keys": "No devices with registered encryption keys",
|
||||||
"No display name": "No display name",
|
"No display name": "No display name",
|
||||||
"No more results": "No more results",
|
"No more results": "No more results",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue