403Webshell
Server IP : 15.235.198.142  /  Your IP : 216.73.216.17
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/rhodeworks/wp-content/plugins/really-simple-ssl/settings/src/Settings/License/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/rhodeworks/wp-content/plugins/really-simple-ssl/settings/src/Settings/License/License.js
import TaskElement from "../../Dashboard/TaskElement";
import * as rsssl_api from "../../utils/api";
import { __ } from '@wordpress/i18n';
import useFields from "./../FieldsData";
import useLicense from "./LicenseData";
import {useEffect} from "@wordpress/element";
const License = ({field, isOnboarding}) => {
    const {fields, setChangedField, updateField} = useFields();
    const {toggleActivation, licenseStatus, setLicenseStatus, notices, setNotices, setLoadingState} = useLicense();

    useEffect(() => {
        setLoadingState();
    }, []);
    const getLicenseNotices = () => {
        return rsssl_api.runTest('licenseNotices', 'refresh').then( ( response ) => {
            return response;
        });
    }

    useEffect( () => {
        getLicenseNotices().then(( response ) => {
            setLicenseStatus(response.licenseStatus);
            setNotices(response.notices);
        });
    }, [fields] );

    const onChangeHandler = (fieldValue) => {
        setChangedField( field.id, fieldValue )
        updateField(field.id, fieldValue);
    }

    return (
        <div className="components-base-control">
            <div className="components-base-control__field">
                { !isOnboarding && <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={field.value}
                        onChange={(e) => onChangeHandler(e.target.value)}
                    />
                    { !isOnboarding &&
                        <button className="button button-default" onClick={() => toggleActivation(field.value)}>
                            {licenseStatus === 'valid' && <>{__('Deactivate', 'really-simple-ssl')}</>}
                            {licenseStatus !== 'valid' && <>{__('Activate', 'really-simple-ssl')}</>}
                        </button>
                    }
                </div>
            </div>
            { notices.map((notice, i) => (
                <TaskElement key={'task-' + i} index={i} notice={notice} highLightField="" />
            ))}
        </div>
    );
}

export default License;

Youez - 2016 - github.com/yon3zu
LinuXploit