PluginProbe
Extendify / 3.2.1
Extendify v3.2.1
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
extendify / src / Agent / workflows / theme / change-theme-variation.js

change-theme-variation.js in Extendify 3.2.1, at src/Agent/workflows/theme/change-theme-variation.js

36 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { RedirectThemeVariations } from '@agent/components/redirects/RedirectThemeVariations';
2 import { SelectThemeVariation } from '@agent/workflows/theme/components/SelectThemeVariation';
3 import { __ } from '@wordpress/i18n';
4 import { color } from '@wordpress/icons';
5
6 const { context, abilities } = window.extAgentData;
7
8 export default {
9 available: () => abilities?.canEditThemes && context?.hasThemeVariations,
10 needsRedirect: () => !Number(context?.postId || 0),
11 redirectComponent: RedirectThemeVariations,
12 id: 'change-theme-variation',
13 whenFinished: {
14 component: SelectThemeVariation,
15 },
16 example: {
17 // translators: "theme colors" refers to the color palette variation for the current theme.
18 text: __('Change website colors', 'extendify-local'),
19 agentResponse: {
20 // translators: This message show above a UI where the user can select a different color variation for their theme.
21 reply: __(
22 'Below you can select a different color variation for your theme.',
23 'extendify-local',
24 ),
25 whenFinishedTool: {
26 id: 'update-theme-variation',
27 labels: {
28 confirm: __('Updated the theme color', 'extendify-local'),
29 cancel: __('Canceled the theme color update', 'extendify-local'),
30 },
31 },
32 },
33 },
34 icon: color,
35 };
36