PluginProbe
Extendify / 3.0.6
Extendify v3.0.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 / tours / plugin-install.js

plugin-install.js in Extendify 3.0.6, at src/Agent/tours/plugin-install.js

140 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __, isRTL } from '@wordpress/i18n';
2
3 export default {
4 id: 'plugin-install-tour',
5 title: __('Installing a plugin', 'extendify-local'),
6 message: __('See how to install a plugin', 'extendify-local'),
7 settings: {
8 allowOverflow: false,
9 startFrom: [`${window.extSharedData.adminUrl}plugin-install.php`],
10 },
11 onStart: () => {
12 if (document.body.classList.contains('folded')) {
13 document.querySelector('#menu-plugins').classList.add('opensub');
14 }
15 },
16 steps: [
17 {
18 title: __('Add New plugin menu', 'extendify-local'),
19 text: __('Click here to access the Add Plugins page.', 'extendify-local'),
20 attachTo: {
21 element: '#menu-plugins .wp-submenu a[href="plugin-install.php"]',
22 offset: {
23 marginTop: 0,
24 marginLeft: isRTL() ? -15 : 15,
25 },
26 position: {
27 x: isRTL() ? 'left' : 'right',
28 y: 'top',
29 },
30 hook: isRTL() ? 'top right' : 'top left',
31 },
32 events: {
33 onDetach: () => {
34 if (document.body.classList.contains('folded')) {
35 document.querySelector('#menu-plugins').classList.remove('opensub');
36 }
37 },
38 },
39 },
40 {
41 title: __('Search', 'extendify-local'),
42 text: __(
43 'Search for a plugin by name or functionality.',
44 'extendify-local',
45 ),
46 attachTo: {
47 element: '.search-form.search-plugins',
48 offset: {
49 marginTop: 5,
50 marginLeft: isRTL() ? 350 : -350,
51 },
52 boxPadding: {
53 top: -5,
54 bottom: 3,
55 left: 5,
56 right: 5,
57 },
58 position: {
59 x: isRTL() ? 'right' : 'left',
60 y: 'top',
61 },
62 hook: isRTL() ? 'top right' : 'top left',
63 },
64 events: {},
65 },
66 {
67 title: __('Plugin details', 'extendify-local'),
68 text: __(
69 'See important information about each plugin.',
70 'extendify-local',
71 ),
72 attachTo: {
73 element: '#the-list .plugin-card:first-child .plugin-card-bottom',
74 offset: {
75 marginTop: 0,
76 marginLeft: isRTL() ? -15 : 15,
77 },
78 position: {
79 x: isRTL() ? 'left' : 'right',
80 y: 'bottom',
81 },
82 hook: isRTL() ? 'bottom right' : 'bottom left',
83 },
84 events: {},
85 },
86 {
87 title: __('Install now', 'extendify-local'),
88 text: __(
89 'Install the plugin. Then, press this button again to activate the plugin.',
90 'extendify-local',
91 ),
92 attachTo: {
93 element: '#the-list .plugin-card:first-child .install-now',
94 offset: {
95 marginTop: -5,
96 marginLeft: isRTL() ? -15 : 15,
97 },
98 boxPadding: {
99 top: 5,
100 bottom: 5,
101 left: 5,
102 right: 5,
103 },
104 position: {
105 x: isRTL() ? 'left' : 'right',
106 y: 'top',
107 },
108 hook: isRTL() ? 'top right' : 'top left',
109 },
110 events: {},
111 },
112 {
113 title: __('Upload Plugin', 'extendify-local'),
114 text: __(
115 'If you have a plugin from an external source, you can upload it directly here.',
116 'extendify-local',
117 ),
118 attachTo: {
119 element: '.upload-view-toggle',
120 offset: {
121 marginTop: -5,
122 marginLeft: isRTL() ? -15 : 15,
123 },
124 boxPadding: {
125 top: 5,
126 bottom: 5,
127 left: 5,
128 right: 5,
129 },
130 position: {
131 x: isRTL() ? 'left' : 'right',
132 y: 'top',
133 },
134 hook: isRTL() ? 'top right' : 'top left',
135 },
136 events: {},
137 },
138 ],
139 };
140