Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.147.103.33
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/cynthiaadediran.com/wp-content/plugins/extendify/src/Draft/components/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/cynthiaadediran.com/wp-content/plugins/extendify/src/Draft/components/EditMenu.jsx
import { MenuGroup, MenuItem } from '@wordpress/components';
import { useSelect } from '@wordpress/data';
import { useEffect } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import {
	customPostType,
	termDescription,
	paragraph,
	postContent,
	Icon,
} from '@wordpress/icons';
import { useContentHighlight } from '@draft/hooks/useContentHighlight';
import { useSelectedText } from '@draft/hooks/useSelectedText';
import { twoLines } from '@draft/svg';

export const EditMenu = ({ disabled, setPrompt }) => {
	const { toggleHighlight } = useContentHighlight();
	const { selectedText } = useSelectedText();

	const selectedBlockClientIds = useSelect(
		(select) => select('core/block-editor').getSelectedBlockClientIds(),
		[],
	);

	useEffect(() => {
		return () => {
			toggleHighlight(selectedBlockClientIds, { isHighlighted: false });
		};
	}, [selectedBlockClientIds, toggleHighlight]);

	const handleClick = (promptType) => {
		setPrompt({
			text: selectedText,
			promptType,
			systemMessageKey: 'edit',
		});
	};

	const actionsList = [
		{
			label: __('Improve writing', 'extendify-local'),
			promptType: 'improve-writing',
			systemMessageKey: 'edit',
			icon: <Icon icon={customPostType} />,
		},
		{
			label: __('Fix spelling & grammar', 'extendify-local'),
			promptType: 'fix-spelling-grammar',
			icon: <Icon icon={termDescription} />,
		},
		{
			label: __('Simplify language', 'extendify-local'),
			promptType: 'simplify-language',
			icon: <Icon icon={paragraph} />,
		},
		{
			label: __('Make shorter', 'extendify-local'),
			promptType: 'make-shorter',
			icon: <Icon icon={twoLines} />,
		},
		{
			label: __('Make longer', 'extendify-local'),
			promptType: 'make-longer',
			icon: <Icon icon={postContent} />,
		},
	];

	return (
		<MenuGroup>
			{actionsList.map(({ label, promptType, icon }) => (
				<MenuItem
					key={`${promptType}-${promptType}-edit`}
					onClick={() => handleClick(promptType)}
					onMouseEnter={() =>
						toggleHighlight(selectedBlockClientIds, {
							isHighlighted: true,
						})
					}
					onMouseLeave={() =>
						toggleHighlight(selectedBlockClientIds, {
							isHighlighted: false,
						})
					}
					icon={icon}
					iconPosition="left"
					disabled={disabled}
					className="group">
					<span className="whitespace-normal text-left rtl:text-right">
						{label}
					</span>
				</MenuItem>
			))}
		</MenuGroup>
	);
};

Youez - 2016 - github.com/yon3zu
LinuXploit