PluginProbe
Extendify / 3.1.6
Extendify v3.1.6
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-site-vibes.js

change-site-vibes.js in Extendify 3.1.6, at src/Agent/workflows/theme/change-site-vibes.js

44 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { Redirect } from '@agent/workflows/theme/components/Redirect';
2 import { SelectSiteVibes } from '@agent/workflows/theme/components/SelectSiteVibes';
3 import { __ } from '@wordpress/i18n';
4 import { brush } from '@wordpress/icons';
5
6 const { context, abilities } = window.extAgentData;
7
8 export default {
9 available: () =>
10 abilities?.canEditThemes &&
11 context?.hasThemeVariations &&
12 context?.isUsingVibes,
13 needsRedirect: () => !Number(context?.postId || 0),
14 redirectComponent: () =>
15 Redirect(
16 // translators: "site style" refers to the structural aesthetic style for the site.
17 __(
18 'It looks like you are trying to change your site style, but you are not on a page where we can do that.',
19 'extendify-local',
20 ),
21 ),
22 id: 'change-site-vibes',
23 whenFinished: { component: SelectSiteVibes },
24 example: {
25 // translators: "site style" refers to the structural aesthetic style for the site.
26 text: __('Change website style', 'extendify-local'),
27 agentResponse: {
28 // translators: This message show above a UI where the user can select a different site style variation for their theme.
29 reply: __(
30 'Below you can select a different site style variation for your theme.',
31 'extendify-local',
32 ),
33 whenFinishedTool: {
34 id: 'update-site-vibes',
35 labels: {
36 confirm: __('Updated the website style', 'extendify-local'),
37 cancel: __('Canceled the website style update', 'extendify-local'),
38 },
39 },
40 },
41 },
42 icon: brush,
43 };
44