mirror of https://github.com/vector-im/riot-web
Fix various loadingElement related issues.
parent
b2b07d9370
commit
56581ef408
|
@ -312,24 +312,24 @@ export default React.createClass({
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.show) {
|
if (this.props.show) {
|
||||||
|
const loadingElement = (
|
||||||
|
<div className='mx_AppTileBody mx_AppLoading'>
|
||||||
|
<MessageSpinner msg='Loading...' />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
if (this.state.initialising) {
|
if (this.state.initialising) {
|
||||||
appTileBody = (
|
appTileBody = loadingElement;
|
||||||
<div className='mx_AppTileBody mx_AppLoading'>
|
|
||||||
<MessageSpinner msg='Loading...' />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
} else if (this.state.hasPermissionToLoad == true) {
|
} else if (this.state.hasPermissionToLoad == true) {
|
||||||
const loadingElement = (
|
|
||||||
<div className="mx_AppTileBody">
|
|
||||||
<AppWarning errorMsg="Error - Mixed content" />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
if (this.isMixedContent()) {
|
if (this.isMixedContent()) {
|
||||||
appTileBody = loadingElement;
|
appTileBody = (
|
||||||
|
<div className="mx_AppTileBody">
|
||||||
|
<AppWarning errorMsg="Error - Mixed content" />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
appTileBody = (
|
appTileBody = (
|
||||||
<div className={this.loading ? 'mx_AppTileBody mx_AppLoading' : 'mx_AppTileBody'}>
|
<div className={this.state.loading ? 'mx_AppTileBody mx_AppLoading' : 'mx_AppTileBody'}>
|
||||||
{ this.loading && Element }
|
{ this.loading && loadingElement }
|
||||||
<iframe
|
<iframe
|
||||||
ref="appFrame"
|
ref="appFrame"
|
||||||
src={safeWidgetUrl}
|
src={safeWidgetUrl}
|
||||||
|
|
Loading…
Reference in New Issue