[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.133.160.239: ~ $
/**
 * Internal dependencies
 */
import HelpTab from './help';
import ChangelogTab from './changelog';
import ProSettings from './pro-extension';
import RecommendedTab from './recomended';
import StarterTab from './starter';
import Sidebar from './sidebar';
import CustomizerLinks from './customizer';
import Notices from './notices';

/**
 * WordPress dependencies
 */
 import { __, sprintf } from '@wordpress/i18n';
import { Fragment, Component, createRoot } from '@wordpress/element';
import { TabPanel, Panel, PanelBody, PanelRow, Button } from '@wordpress/components';

class KadenceDashboard extends Component {
	render() {
		const tabs = [
			{
				name: 'dashboard',
				title: __( 'Dashboard', 'kadence' ),
				className: 'kadence-dash-tab',
			},
			{
				name: 'help',
				title: __( 'Getting Started', 'kadence' ),
				className: 'kadence-help-tab',
			},
			{
				name: 'changelog',
				title: __( 'Changelog', 'kadence' ),
				className: 'kadence-changelog-tab',
			},
			// {
			// 	name: 'recommended',
			// 	title: __( 'Recommended Plugins', 'kadence' ),
			// 	className: 'kadence-recommended-tab',
			// },
			{
				name: 'starter',
				title: __( 'Starter Templates', 'kadence' ),
				className: 'kadence-starter-tab',
			},
		];

		const KadenceDashTabPanel = () => (
			<TabPanel className="kadence-dashboard-tab-panel"
				activeClass="active-tab"
				tabs={ tabs }>
				{
					( tab ) => {
						switch ( tab.name ) {
							case 'dashboard':
								return (
									<Panel className="dashboard-section tab-section">
										<PanelBody
											opened={ true }
										>
											<div className="dashboard-modules-wrapper">
												<div className="dashboard-customizer-settings">
													<CustomizerLinks />
												</div>
												<div className="dashboard-pro-settings">
													<ProSettings />
												</div>
											</div>
										</PanelBody>
									</Panel>
								);

							case 'help':
								return (
									<Panel className="help-section tab-section">
										<PanelBody
											opened={ true }
										>
											<HelpTab />
										</PanelBody>
									</Panel>
								);
							case 'changelog':
								return (
									<Panel className="changelog-section tab-section">
										<PanelBody
											opened={ true }
										>
											<ChangelogTab />
										</PanelBody>
									</Panel>
								);

							case 'recommended':
								return (
									<Panel className="recommended-section tab-section">
										<PanelBody
											opened={ true }
										>
											<RecommendedTab />
										</PanelBody>
									</Panel>
								);

							case 'starter':
								return (
									<Panel className="starter-section tab-section">
										<PanelBody
											opened={ true }
										>
											<StarterTab />
										</PanelBody>
									</Panel>
								);
						}
					}
				}
			</TabPanel>
		);

		const MainPanel = () => (
			<div className="tab-panel">
				<KadenceDashTabPanel />
			</div>
		);

		return (
			<Fragment>
				<MainPanel />
				<Notices />
			</Fragment>
		);
	}
}
wp.domReady( () => {
	const container = document.querySelector( '.kadence_theme_dashboard_main' );
	const root = createRoot( container );

	root.render(<KadenceDashboard />);
} );

Filemanager

Name Type Size Permission Actions
changelog-item.js File 958 B 0644
changelog.js File 2.29 KB 0644
customizer.js File 2.21 KB 0644
dash-controls.scss File 5.78 KB 0644
help.js File 1.15 KB 0644
index.js File 3.23 KB 0644
notices.js File 508 B 0644
pro-extension.js File 3.11 KB 0644
recomended.js File 290 B 0644
sidebar.js File 1.22 KB 0644
starter.js File 2.15 KB 0644