Uname:Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64

403WebShell
403Webshell
Server IP : 146.59.209.152  /  Your IP : 216.73.217.111
Web Server : Apache
System : Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User : monpetu ( 144298)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/monpetu/www/benneplus/wp-content/plugins/really-simple-ssl/settings/src/Settings/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/monpetu/www/benneplus/wp-content/plugins/really-simple-ssl/settings/src/Settings//Button.js
import Hyperlink from "../utils/Hyperlink";
import * as rsssl_api from "../utils/api";
import useFields from "./FieldsData";
import Icon from "../utils/Icon";
import {useState} from "@wordpress/element";

/**
 * Render a help notice in the sidebar
 */
const Button = (props) => {
    const {addHelpNotice} = useFields();
    const [processing, setProcessing] = useState(false);
    const {fields} = useFields();

    const onClickHandler = async (action) => {
        let data = {};
        setProcessing(true);
        data.fields = fields;
        await rsssl_api.doAction(action, data).then((response) => {
            let label = response.success ? 'success' : 'warning';
            let title = response.title;
            let text = response.message;
            setProcessing(false);
            addHelpNotice(props.field.id, label, text, title, false);
        });
    }

    let is_disabled = !!props.field.disabled;

    return (
        <>
            { props.field.url &&
                <Hyperlink className={"button button-default"} disabled={is_disabled} text={props.field.button_text} url={props.field.url}/>
            }
            { props.field.action &&
                <button onClick={ () => onClickHandler( props.field.action ) }  className="button button-default" disabled={is_disabled}>
                    {props.field.button_text}
                    {processing && <Icon name = "loading" color = 'grey' />}
                </button>
            }
        </>
    );
}

export default Button

Youez - 2016 - github.com/yon3zu
LinuXploit