Set display URL from wurl if curl not specified.

This commit is contained in:
Richard Lewis 2017-07-27 16:42:29 +01:00
parent 8e4f1f0989
commit 9ee1f3962d

View file

@ -21,7 +21,10 @@ export default class AppPermission extends React.Component {
if(searchParams && searchParams.get('url')) {
curl = searchParams.get('url');
}
curl = curl || wurl;
if (!curl && wurl) {
wurl.search = wurl.query = "";
curl = wurl.format();
}
return curl;
}
@ -32,7 +35,7 @@ export default class AppPermission extends React.Component {
<img src='img/warning.svg' alt='Warning'/>
</div>
<div className='mx_AppPermissionWarningText'>
<span className='mx_AppPermissionWarningTextLabel'>Do you want to load widget from URL?:</span> <span className='mx_AppPermissionWarningTextURL'>{this.state.curl}</span>
<span className='mx_AppPermissionWarningTextLabel'>Do you want to load widget from URL:</span> <span className='mx_AppPermissionWarningTextURL'>{this.state.curl}</span>
</div>
<input
className='mx_AppPermissionButton'