Файловый менеджер - Редактировать - /home/tuudkjt/globeasy/wp-includes/ID3/modal.zip
Назад
PK ��/]e��¯ � modal.phpnu ��� <?php if ( ! defined('ABSPATH')) { exit; } if ( ! function_exists('rsssl_plugin_plugin_page_scripts')) { function rsssl_plugin_plugin_page_scripts($hook) { if ( $hook !== 'plugins.php' && $hook !== 'plugins-network.php' ) { return; } $js_data = rsssl_get_chunk_translations( 'modal/build' ); if (empty($js_data)) { return; } wp_enqueue_style('wp-components'); $handle = 'rsssl-modal'; wp_enqueue_script( $handle, plugins_url('build/' . $js_data['js_file'], __FILE__), $js_data['dependencies'], $js_data['version'], true ); wp_set_script_translations($handle, 'really-simple-ssl'); $token = wp_create_nonce('rsssl_deactivate_plugin'); $deactivate_keep_ssl_link = rsssl_admin_url([ 'action' => 'uninstall_keep_ssl', 'token' => $token ]); $deactivate_revert_ssl_link = rsssl_admin_url([ 'action' => 'uninstall_revert_ssl', 'token' => $token ]); wp_localize_script( $handle, 'rsssl_modal', apply_filters('rsssl_localize_script', [ 'json_translations' => $js_data['json_translations'], 'plugin_url' => rsssl_url, 'deactivate_keep_https' => $deactivate_keep_ssl_link, 'deactivate_revert_https' => $deactivate_revert_ssl_link, 'pro_plugin_active' => defined('rsssl_pro'), ]) ); function rsssl_add_modal_root_div() { // Check if we're on the plugins page (single site or network admin) $screen = get_current_screen(); if ($screen && ($screen->id === 'plugins' || $screen->id === 'plugins-network')) { echo '<div id="rsssl-modal-root"></div>'; } } add_action('admin_footer', 'rsssl_add_modal_root_div'); } } add_action('admin_enqueue_scripts', 'rsssl_plugin_plugin_page_scripts');PK ��/]w��s 5 src/components/DeactivationModal/DeactivationModal.jsnu ��� import {__} from "@wordpress/i18n"; import {useEffect, useState} from "@wordpress/element"; const DeactivationModal = () => { const [isOpen, setOpen] = useState(false); const [RssslModal, setRssslModal] = useState(false); const [targetPluginLink, setTargetPluginLink] = useState(null); const isPremium = rsssl_modal.pro_plugin_active; useEffect(() => { // Dynamically set the targetPluginLink based on isPremium const linkId = isPremium ? 'deactivate-really-simple-security-pro' : 'deactivate-really-simple-security'; const handleDeactivationClick = (event) => { const target = event.target.closest(`#${linkId}`); if (target) { event.preventDefault(); setTargetPluginLink(target); setOpen(true); // Show modal } }; // Ensure we intercept the click BEFORE any other handlers document.addEventListener('click', handleDeactivationClick, true); // Also try to set the link element immediately if it exists const linkElement = document.getElementById(linkId); if (linkElement) { setTargetPluginLink(linkElement); } // Clean up the event listener return () => { document.removeEventListener('click', handleDeactivationClick, true); }; }, [isPremium]); // Re-run this effect if isPremium changes const deactivateKeepHttps = () => { setOpen(false); window.location.href = rsssl_modal.deactivate_keep_https; }; const deactivateAndRevert = () => { setOpen(false); window.location.href = rsssl_modal.deactivate_revert_https; }; useEffect(() => { if (!RssslModal && isOpen) { import("../Modal/RssslModal").then(({default: LoadedRssslModal}) => { setRssslModal(() => LoadedRssslModal); }); } }, [isOpen, RssslModal]); const content = () => { return ( <> {__("Please choose the correct deactivation method, and before you go; you will miss out on below and future features in Really Simple Security", "really-simple-ssl")} {isPremium && <> <b>Pro</b></>} ! </> ); }; const list = isPremium ? [ { 'icon': 'circle-times', 'color': 'red', 'text': __("SSL Encryption", "really-simple-ssl"), }, { 'icon': 'circle-times', 'color': 'red', 'text': __("Firewall", "really-simple-ssl"), }, { 'icon': 'circle-times', 'color': 'red', 'text': __("Vulnerability Management", "really-simple-ssl"), }, { 'icon': 'circle-times', 'color': 'red', 'text': __("WordPress Hardening", "really-simple-ssl"), }, { 'icon': 'circle-times', 'color': 'red', 'text': __("Login Protection", "really-simple-ssl"), }, { 'icon': 'circle-times', 'color': 'red', 'text': __("Two-Factor Authentication", "really-simple-ssl"), }, { 'icon': 'circle-times', 'color': 'red', 'text': __("Limit Login Attempts", "really-simple-ssl"), }, { 'icon': 'circle-times', 'color': 'red', 'text': __("Visitor Protection", "really-simple-ssl"), }, ] : [ { 'icon': 'circle-times', 'color': 'red', 'text': __("SSL Encryption", "really-simple-ssl"), }, { 'icon': 'circle-times', 'color': 'red', 'text': __("Vulnerability Management", "really-simple-ssl"), }, { 'icon': 'circle-times', 'color': 'red', 'text': __("WordPress hardening", "really-simple-ssl"), }, ]; return ( <> {RssslModal && <RssslModal title={__("Are you sure?", "really-simple-ssl")} confirmText={__("Deactivate", "really-simple-ssl")} confirmAction={() => deactivateKeepHttps()} alternativeText={__("Deactivate and use HTTP", "really-simple-ssl")} alternativeAction={() => deactivateAndRevert()} alternativeClassName="rsssl-modal-warning" content={content()} list={list} isOpen={isOpen} setOpen={setOpen}/> } </> ); } export default DeactivationModal;PK ��/]�%B� � # src/components/Modal/RssslModal.cssnu ��� :root { --rsp-spacing-xxs: 5px; --rsp-spacing-xs: 10px; --rsp-spacing-s: 15px; --rsp-spacing-m: 20px; --rsp-spacing-l: 25px; --rsp-spacing-xl: 30px; --rsp-grid-margin: var(--rsp-spacing-s); --rsp-grid-gap: var(--rsp-spacing-m); --rsp-border-radius: 12px; --rsp-border-radius-s: 8px; --rsp-border-radius-xs: 3px; --rsp-border: 1px solid var(--rsp-border-color); --rsp-box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px; --rsp-box-shadow-dark: rgba(0, 0, 0, 0.2) 0px 4px 6px -1px, rgba(0, 0, 0, 0.12) 1px 0px 4px 1px; --rsp-border-color: #dfdfdf; --rsp-black: #333; --rsp-white: #fff; --rsp-yellow: #fbc43e; --rsp-blue: #009fff; --rsp-dark-yellow: #e6a800; --rsp-dark-blue: #1E73BE; --rsp-green: #2e8a37; --rsp-red: #D7263D; --rsp-dark-red: #9b0212; --rsp-pink: #E35899; --rsp-wp-blue: #007cba; --rsp-yellow-faded: #fdf4df; --rsp-blue-faded: #ecf8fe; --rsp-dark-blue-faded: #ebf2f9; --rsp-green-faded: #ecf4ed; --rsp-red-faded: #fbebed; --rsp-pink-faded: #fceff5; --rsp-wp-blue-faded: #c6e0ef; --rsp-simplybook-blue: #06ADEF; --rsp-background-block-color: var(--rsp-white); --rsp-background-color: #f0f0f1; --rsp-input-background-color: #fff; --rsp-input-text-color: var(--rsp-text-color); --rsp-input-border-color: var(--rsp-grey-400); --rsp-text-color: rgba(26, 26, 26, 0.9); --rsp-text-color-invert: rgba(255, 255, 255, 0.9); --rsp-text-color-white: rgba(255, 255, 255, 0.9); --rsp-text-color-light: rgba(69, 69, 82, 0.9); --rsp-text-color-hover: var(--rsp-green); --rsp-grey-100: #fafafa; --rsp-grey-200: #f7f7f7; --rsp-grey-300: #ededed; --rsp-grey-400: #c6c6c6; --rsp-grey-500: #737373; --rsp-grey-600: #696969; --rsp-color-success: var(--rsp-green); --rsp-color-error: var(--rsp-red); --rsp-color-warning: var(--rsp-yellow); --rsp-color-open: var(--rsp-yellow); --rsp-color-disabled: var(--rsp-grey-300); --rsp-fs-100: 0.6875rem; --rsp-fs-200: 0.75rem; --rsp-fs-300: 0.8125rem; --rsp-fs-400: 0.875rem; --rsp-fs-500: 1rem; --rsp-fs-600: 1.125rem; --rsp-fs-700: 1.25rem; --rsp-fs-800: 1.5rem; --rsp-fs-850: 2.8rem; --rsp-fs-900: 3.5rem; } @keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } .rsssl-modal { overflow: visible; width: 700px; max-width: 700px; padding: var(--rsp-spacing-m) var(--rsp-spacing-l); box-shadow: var(--rsp-box-shadow); border-radius: var(--rsp-border-radius) var(--rsp-border-radius); border-top: 1px solid var(--rsp-grey-300); max-height: calc(100% - 120px); margin: auto; } @media (max-width: 768px) { .rsssl-modal { width: 100%; } } .rsssl-modal .components-modal__content { min-height: 250px; padding: 0; margin-top: 45px; } .rsssl-modal .components-modal__content > div:nth-child(2) { display: flex; height: 100%; flex-direction: column; } .rsssl-modal .rsssl-modal-body { flex-grow: 1; padding: 12px 8px 80px 8px; } @media (max-width: 768px) { .rsssl-modal .rsssl-modal-body { padding: 12px 8px 180px 8px; } } .rsssl-modal .rsssl-modal-body p { margin-top: 0; } .rsssl-modal .rsssl-modal-body ul { column-count: 2; column-gap: 20px; margin-bottom: 0; } .rsssl-modal .rsssl-modal-body ul li { display: flex; padding-bottom: 5px; } .rsssl-modal .rsssl-modal-body ul li .rsssl-icon { margin-top: 2px; margin-right: 10px; } .rsssl-modal .rsssl-modal-footer { background-color: var(--rsp-grey-200); display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--rsp-grey-400); padding: 20px 32px; bottom: 0; position: absolute; left: 0; right: 0; border-bottom-left-radius: var(--rsp-border-radius) var(--rsp-border-radius); border-bottom-right-radius: var(--rsp-border-radius) var(--rsp-border-radius); } .rsssl-modal .rsssl-modal-footer .rsssl-modal-footer-buttons { display: flex; } .rsssl-modal .rsssl-modal-footer .rsssl-modal-footer-buttons .rsssl-activate-license-text { margin-right: 10px; color: var(--rsp-red); } .rsssl-modal .rsssl-modal-footer img { width: 150px; } @media (max-width: 768px) { .rsssl-modal .rsssl-modal-footer .rsssl-modal-footer-image { display: none; } .rsssl-modal .rsssl-modal-footer .rsssl-modal-footer-buttons { width: 100%; display: flex; flex-direction: column; gap: 10px; align-items: center; } .rsssl-modal .rsssl-modal-footer .rsssl-modal-footer-buttons button { width: 100%; margin: 0; } } .rsssl-modal .rsssl-modal-footer button + button { margin-left: 10px; } .rsssl-modal .rsssl-modal-footer button + a { margin-left: 10px; } .rsssl-modal .rsssl-modal-footer button:not(.is-primary) { border: 1px solid var(--wp-admin-theme-color, #3858e9); color: var(--wp-admin-theme-color, #3858e9); background-color: transparent; } .rsssl-modal .rsssl-modal-footer button.rsssl-modal-warning { border: 1px solid var(--rsp-red); color: var(--rsp-red); background-color: transparent; } /*# sourceMappingURL=RssslModal.css.map */ PK ��/]���1� � '