Merge pull request #1321 from matrix-org/rxl881/warnings
Only render appTile body (including warnings) if drawer shown.
This commit is contained in:
commit
388d8141ae
1 changed files with 32 additions and 30 deletions
|
@ -223,42 +223,44 @@ export default React.createClass({
|
||||||
safeWidgetUrl = url.format(parsedWidgetUrl);
|
safeWidgetUrl = url.format(parsedWidgetUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.loading) {
|
if (this.props.show) {
|
||||||
appTileBody = (
|
if (this.state.loading) {
|
||||||
<div className='mx_AppTileBody mx_AppLoading'>
|
appTileBody = (
|
||||||
<MessageSpinner msg='Loading...'/>
|
<div className='mx_AppTileBody mx_AppLoading'>
|
||||||
</div>
|
<MessageSpinner msg='Loading...'/>
|
||||||
);
|
</div>
|
||||||
} else if (this.state.hasPermissionToLoad == true) {
|
);
|
||||||
if (this.isMixedContent()) {
|
} else if (this.state.hasPermissionToLoad == true) {
|
||||||
|
if (this.isMixedContent()) {
|
||||||
|
appTileBody = (
|
||||||
|
<div className="mx_AppTileBody">
|
||||||
|
<AppWarning
|
||||||
|
errorMsg="Error - Mixed content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
appTileBody = (
|
||||||
|
<div className="mx_AppTileBody">
|
||||||
|
<iframe
|
||||||
|
ref="appFrame"
|
||||||
|
src={safeWidgetUrl}
|
||||||
|
allowFullScreen="true"
|
||||||
|
sandbox={sandboxFlags}
|
||||||
|
></iframe>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
appTileBody = (
|
appTileBody = (
|
||||||
<div className="mx_AppTileBody">
|
<div className="mx_AppTileBody">
|
||||||
<AppWarning
|
<AppPermission
|
||||||
errorMsg="Error - Mixed content"
|
url={this.state.widgetUrl}
|
||||||
|
onPermissionGranted={this._grantWidgetPermission}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else if (this.props.show) {
|
|
||||||
appTileBody = (
|
|
||||||
<div className="mx_AppTileBody">
|
|
||||||
<iframe
|
|
||||||
ref="appFrame"
|
|
||||||
src={safeWidgetUrl}
|
|
||||||
allowFullScreen="true"
|
|
||||||
sandbox={sandboxFlags}
|
|
||||||
></iframe>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
appTileBody = (
|
|
||||||
<div className="mx_AppTileBody">
|
|
||||||
<AppPermission
|
|
||||||
url={this.state.widgetUrl}
|
|
||||||
onPermissionGranted={this._grantWidgetPermission}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// editing is done in scalar
|
// editing is done in scalar
|
||||||
|
|
Loading…
Reference in a new issue