This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +30
-28
lines changed
src/components/views/elements Expand file tree Collapse file tree 1 file changed +30
-28
lines changed Original file line number Diff line number Diff line change @@ -223,42 +223,44 @@ export default React.createClass({
223
223
safeWidgetUrl = url . format ( parsedWidgetUrl ) ;
224
224
}
225
225
226
- if ( this . state . loading ) {
227
- appTileBody = (
228
- < div className = 'mx_AppTileBody mx_AppLoading' >
229
- < MessageSpinner msg = 'Loading...' />
230
- </ div >
231
- ) ;
232
- } else if ( this . state . hasPermissionToLoad == true ) {
233
- if ( this . isMixedContent ( ) ) {
226
+ if ( this . props . show ) {
227
+ if ( this . state . loading ) {
234
228
appTileBody = (
235
- < div className = "mx_AppTileBody" >
236
- < AppWarning
237
- errorMsg = "Error - Mixed content"
238
- />
229
+ < div className = 'mx_AppTileBody mx_AppLoading' >
230
+ < MessageSpinner msg = 'Loading...' />
239
231
</ div >
240
232
) ;
241
- } else if ( this . props . show ) {
233
+ } else if ( this . state . hasPermissionToLoad == true ) {
234
+ if ( this . isMixedContent ( ) ) {
235
+ appTileBody = (
236
+ < div className = "mx_AppTileBody" >
237
+ < AppWarning
238
+ errorMsg = "Error - Mixed content"
239
+ />
240
+ </ div >
241
+ ) ;
242
+ } else {
243
+ appTileBody = (
244
+ < div className = "mx_AppTileBody" >
245
+ < iframe
246
+ ref = "appFrame"
247
+ src = { safeWidgetUrl }
248
+ allowFullScreen = "true"
249
+ sandbox = { sandboxFlags }
250
+ > </ iframe >
251
+ </ div >
252
+ ) ;
253
+ }
254
+ } else {
242
255
appTileBody = (
243
256
< div className = "mx_AppTileBody" >
244
- < iframe
245
- ref = "appFrame"
246
- src = { safeWidgetUrl }
247
- allowFullScreen = "true"
248
- sandbox = { sandboxFlags }
249
- > </ iframe >
257
+ < AppPermission
258
+ url = { this . state . widgetUrl }
259
+ onPermissionGranted = { this . _grantWidgetPermission }
260
+ />
250
261
</ div >
251
262
) ;
252
263
}
253
- } else {
254
- appTileBody = (
255
- < div className = "mx_AppTileBody" >
256
- < AppPermission
257
- url = { this . state . widgetUrl }
258
- onPermissionGranted = { this . _grantWidgetPermission }
259
- />
260
- </ div >
261
- ) ;
262
264
}
263
265
264
266
// editing is done in scalar
You can’t perform that action at this time.
0 commit comments