You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-17 17:42:41 +03:00
Rename variable to curlBase, for clarity
This commit is contained in:
@@ -6,21 +6,20 @@ export default class AppPermission extends React.Component {
|
|||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
const curl = this.getCurl();
|
const curlBase = this.getCurlBase();
|
||||||
this.state = {
|
this.state = {
|
||||||
curl: curl,
|
curlBase: curlBase,
|
||||||
};
|
};
|
||||||
console.log('curl', curl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getCurl() {
|
// Return string representation of content URL without query parameters
|
||||||
|
getCurlBase() {
|
||||||
const wurl = url.parse(this.props.url);
|
const wurl = url.parse(this.props.url);
|
||||||
let curl;
|
let curl;
|
||||||
let curlString;
|
let curlString;
|
||||||
|
|
||||||
const searchParams = new URLSearchParams(wurl.search);
|
const searchParams = new URLSearchParams(wurl.search);
|
||||||
|
|
||||||
// Return string representation of content URL without query parameters
|
|
||||||
if(searchParams && searchParams.get('url')) {
|
if(searchParams && searchParams.get('url')) {
|
||||||
curl = url.parse(searchParams.get('url'));
|
curl = url.parse(searchParams.get('url'));
|
||||||
if(curl) {
|
if(curl) {
|
||||||
@@ -42,7 +41,7 @@ export default class AppPermission extends React.Component {
|
|||||||
<img src='img/warning.svg' alt='Warning'/>
|
<img src='img/warning.svg' alt='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.curl}</span>
|
<span className='mx_AppPermissionWarningTextLabel'>Do you want to load widget from URL:</span> <span className='mx_AppPermissionWarningTextURL'>{this.state.curlBase}</span>
|
||||||
</div>
|
</div>
|
||||||
<input
|
<input
|
||||||
className='mx_AppPermissionButton'
|
className='mx_AppPermissionButton'
|
||||||
|
|||||||
Reference in New Issue
Block a user