262 lines
7.1 KiB
JavaScript
262 lines
7.1 KiB
JavaScript
/**
|
|||
|
|
* Declarative settings schema for the Aurora Admin settings page.
|
||
|
|
* Each category renders as an item in the left nav; its fields render in
|
||
|
|
* the right panel. Field `key`s map directly into the aurora_admin_settings
|
||
|
|
* option, saved via the wp/v2/settings REST route.
|
||
|
|
*/
|
||
|
|
export const settingsCategories = [
|
||
|
|
{
|
||
|
|
id: 'general',
|
||
|
|
title: 'General',
|
||
|
|
subtitle: 'Core plugin settings and license management',
|
||
|
|
icon: 'dashicons-admin-settings',
|
||
|
|
fields: [
|
||
|
|
{
|
||
|
|
key: 'license_key',
|
||
|
|
type: 'text',
|
||
|
|
label: 'License key',
|
||
|
|
description: 'Enter your license key to enable automatic updates.',
|
||
|
|
placeholder: 'AA-XXXX-XXXX-XXXX',
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key: 'logo',
|
||
|
|
type: 'image',
|
||
|
|
label: 'Logo',
|
||
|
|
description: 'Optional logo to be displayed in the menu.',
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key: 'dark_logo',
|
||
|
|
type: 'image',
|
||
|
|
label: 'Dark mode logo',
|
||
|
|
description:
|
||
|
|
"Set an alternative logo to use in dark mode. If one isn't set it will fall back to the standard logo.",
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key: 'remote_sites',
|
||
|
|
type: 'remote-sites',
|
||
|
|
label: 'Remote Sites',
|
||
|
|
description: 'Configure remote WordPress sites for cross-site operations.',
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key: 'remote_site_switcher_capability',
|
||
|
|
type: 'text',
|
||
|
|
label: 'Remote Site Switcher Capability',
|
||
|
|
description:
|
||
|
|
'WordPress capability required to see the remote site switcher in the toolbar. Defaults to "manage_options" (admin users). Users with this capability or below will see the switcher.',
|
||
|
|
placeholder: 'manage_options',
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key: 'disable_theme',
|
||
|
|
type: 'multiselect',
|
||
|
|
label: 'Disable theme',
|
||
|
|
description: 'Choose roles to disable the theme for.',
|
||
|
|
optionsSource: 'roles',
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key: 'search_post_types',
|
||
|
|
type: 'multiselect',
|
||
|
|
label: 'Search post types',
|
||
|
|
description: 'Choose which post types are available in the global search.',
|
||
|
|
optionsSource: 'postTypes',
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key: 'disable_global_search',
|
||
|
|
type: 'segmented',
|
||
|
|
label: 'Disable global search',
|
||
|
|
description: 'Disable global search for all users.',
|
||
|
|
},
|
||
|
|
],
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 'login',
|
||
|
|
title: 'Login',
|
||
|
|
subtitle: 'Customize login page appearance and security',
|
||
|
|
icon: 'dashicons-lock',
|
||
|
|
fields: [
|
||
|
|
{
|
||
|
|
key: 'style_login',
|
||
|
|
type: 'toggle',
|
||
|
|
label: 'Style login page',
|
||
|
|
description: 'Apply the Aurora theme to the WordPress login screen.',
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key: 'login_logo',
|
||
|
|
type: 'image',
|
||
|
|
label: 'Login logo',
|
||
|
|
description: 'Replace the WordPress logo on the login screen.',
|
||
|
|
},
|
||
|
|
],
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 'theme',
|
||
|
|
title: 'Theme',
|
||
|
|
subtitle: 'Colors, styling, and visual customization',
|
||
|
|
icon: 'dashicons-admin-appearance',
|
||
|
|
fields: [
|
||
|
|
{
|
||
|
|
key: 'dark_mode',
|
||
|
|
type: 'toggle',
|
||
|
|
label: 'Dark mode',
|
||
|
|
description: 'Use the dark interface theme across the admin.',
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key: 'accent_color',
|
||
|
|
type: 'color',
|
||
|
|
label: 'Accent color',
|
||
|
|
description: 'Primary accent color used throughout the interface.',
|
||
|
|
default: '#4772fa',
|
||
|
|
},
|
||
|
|
],
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 'whitelabel',
|
||
|
|
title: 'White Label',
|
||
|
|
subtitle: 'Rebrand and customize interface text and icons',
|
||
|
|
icon: 'dashicons-tag',
|
||
|
|
fields: [
|
||
|
|
{
|
||
|
|
key: 'admin_favicon',
|
||
|
|
type: 'image',
|
||
|
|
label: 'Admin favicon',
|
||
|
|
description: 'Optional favicon to replace the WordPress favicon in the admin.',
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key: 'plugin_name',
|
||
|
|
type: 'text',
|
||
|
|
label: 'Rename Aurora Admin',
|
||
|
|
description:
|
||
|
|
"This will rename Aurora Admin in the plugins list as well as renaming its settings link.",
|
||
|
|
placeholder: 'Aurora Admin',
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key: 'text_replacements',
|
||
|
|
type: 'repeater',
|
||
|
|
label: 'Text Replacement',
|
||
|
|
description:
|
||
|
|
'Customize the text displayed in the WordPress admin area. Enter original words or phrases and their replacements to white-label the interface.',
|
||
|
|
columns: ['Find', 'Replace with'],
|
||
|
|
},
|
||
|
|
],
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 'menu',
|
||
|
|
title: 'Menu',
|
||
|
|
subtitle: 'Admin menu behavior and interaction settings',
|
||
|
|
icon: 'dashicons-menu',
|
||
|
|
fields: [
|
||
|
|
{
|
||
|
|
key: 'menu_search',
|
||
|
|
type: 'toggle',
|
||
|
|
label: 'Menu search',
|
||
|
|
description: 'Show a search box at the top of the admin menu.',
|
||
|
|
},
|
||
|
|
],
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 'posts',
|
||
|
|
title: 'Posts',
|
||
|
|
subtitle: 'Post management and display preferences',
|
||
|
|
icon: 'dashicons-admin-post',
|
||
|
|
fields: [
|
||
|
|
{
|
||
|
|
key: 'modern_posts',
|
||
|
|
type: 'toggle',
|
||
|
|
label: 'Modern posts table',
|
||
|
|
description: 'Use the Aurora posts management interface.',
|
||
|
|
},
|
||
|
|
],
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 'plugins',
|
||
|
|
title: 'Plugins',
|
||
|
|
subtitle: 'Plugin management interface options',
|
||
|
|
icon: 'dashicons-admin-plugins',
|
||
|
|
fields: [
|
||
|
|
{
|
||
|
|
key: 'modern_plugins',
|
||
|
|
type: 'toggle',
|
||
|
|
label: 'Modern plugins page',
|
||
|
|
description: 'Use the Aurora plugins management interface.',
|
||
|
|
},
|
||
|
|
],
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 'dashboard',
|
||
|
|
title: 'Dashboard',
|
||
|
|
subtitle: 'Custom dashboard and admin interface settings',
|
||
|
|
icon: 'dashicons-dashboard',
|
||
|
|
fields: [
|
||
|
|
{
|
||
|
|
key: 'use_custom_dashboard',
|
||
|
|
type: 'toggle',
|
||
|
|
label: 'Custom dashboard',
|
||
|
|
description: "Replace the WordPress dashboard with Aurora's dashboard.",
|
||
|
|
default: true,
|
||
|
|
},
|
||
|
|
],
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 'analytics',
|
||
|
|
title: 'Analytics',
|
||
|
|
subtitle: 'Built-in analytics and tracking settings',
|
||
|
|
icon: 'dashicons-chart-bar',
|
||
|
|
fields: [
|
||
|
|
{
|
||
|
|
key: 'enable_analytics',
|
||
|
|
type: 'toggle',
|
||
|
|
label: 'Enable analytics',
|
||
|
|
description: 'Track first-party visitor analytics for the dashboard.',
|
||
|
|
default: true,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
key: 'track_admins',
|
||
|
|
type: 'toggle',
|
||
|
|
label: 'Track logged-in admins',
|
||
|
|
description: 'Include administrator visits in analytics (off by default).',
|
||
|
|
},
|
||
|
|
],
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 'media',
|
||
|
|
title: 'Media',
|
||
|
|
subtitle: 'Media library and upload management settings',
|
||
|
|
icon: 'dashicons-admin-media',
|
||
|
|
fields: [
|
||
|
|
{
|
||
|
|
key: 'enable_svg',
|
||
|
|
type: 'toggle',
|
||
|
|
label: 'Allow SVG uploads',
|
||
|
|
description: 'Permit SVG files to be uploaded to the media library.',
|
||
|
|
},
|
||
|
|
],
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 'users',
|
||
|
|
title: 'Users',
|
||
|
|
subtitle: 'User management and administration settings',
|
||
|
|
icon: 'dashicons-admin-users',
|
||
|
|
fields: [
|
||
|
|
{
|
||
|
|
key: 'modern_users',
|
||
|
|
type: 'toggle',
|
||
|
|
label: 'Modern users page',
|
||
|
|
description: 'Use the Aurora users management interface.',
|
||
|
|
},
|
||
|
|
],
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 'comments',
|
||
|
|
title: 'Comments',
|
||
|
|
subtitle: 'Comment management and administration',
|
||
|
|
icon: 'dashicons-admin-comments',
|
||
|
|
fields: [
|
||
|
|
{
|
||
|
|
key: 'modern_comments',
|
||
|
|
type: 'toggle',
|
||
|
|
label: 'Modern comments page',
|
||
|
|
description: 'Use the Aurora comments management interface.',
|
||
|
|
},
|
||
|
|
],
|
||
|
|
},
|
||
|
|
];
|