PluginProbe
Extendify / 3.0.5
Extendify v3.0.5
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 / users-screen.js

users-screen.js in Extendify 3.0.5, at src/Agent/tours/users-screen.js

148 lines 3.3 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: 'users-screen-tour',
5 title: __('Users screen', 'extendify-local'),
6 message: __('Tour the Users screen', 'extendify-local'),
7 settings: {
8 allowOverflow: true,
9 startFrom: [`${window.extSharedData.adminUrl}users.php`],
10 },
11 onStart: () => {
12 if (document.body.classList.contains('folded')) {
13 document.querySelector('#menu-users').classList.add('opensub');
14 }
15 },
16 steps: [
17 {
18 title: __('All Users menu', 'extendify-local'),
19 text: __(
20 'Click here to view and manage the users on your site.',
21 'extendify-local',
22 ),
23 attachTo: {
24 element: '#menu-users ul > li:nth-child(2)',
25 offset: {
26 marginTop: 0,
27 marginLeft: isRTL() ? -15 : 15,
28 },
29 position: {
30 x: isRTL() ? 'left' : 'right',
31 y: 'top',
32 },
33 hook: isRTL() ? 'top right' : 'top left',
34 },
35 events: {
36 onDetach: () => {
37 if (document.body.classList.contains('folded')) {
38 document.querySelector('#menu-users').classList.remove('opensub');
39 }
40 },
41 },
42 },
43 {
44 title: __('Users', 'extendify-local'),
45 text: __(
46 'See all of your users, including admin users in this table.',
47 'extendify-local',
48 ),
49 attachTo: {
50 element: 'tbody#the-list > tr:nth-child(1)',
51 offset: {
52 marginTop: 15,
53 marginLeft: 0,
54 },
55 position: {
56 x: isRTL() ? 'left' : 'right',
57 y: 'bottom',
58 },
59 hook: isRTL() ? 'top left' : 'top right',
60 },
61 events: {},
62 },
63 {
64 title: __('Edit user information', 'extendify-local'),
65 text: __(
66 "Click the edit button to change the user's role, manage their account, or change their profile information.",
67 'extendify-local',
68 ),
69 attachTo: {
70 element: 'tbody#the-list > tr:nth-child(1) > td.username',
71 offset: {
72 marginTop: 0,
73 marginLeft: isRTL() ? -15 : 15,
74 },
75 position: {
76 x: isRTL() ? 'left' : 'right',
77 y: 'top',
78 },
79 hook: isRTL() ? 'top right' : 'top left',
80 },
81 events: {
82 onAttach: () => {
83 document.querySelector(
84 'tbody#the-list > tr:nth-child(1) > td.username .row-actions',
85 ).style.left = '0';
86 },
87 onDetach: () => {
88 document.querySelector(
89 'tbody#the-list > tr:nth-child(1) > td.username .row-actions',
90 ).style.left = '-9999em';
91 },
92 },
93 },
94 {
95 title: __('Search for users', 'extendify-local'),
96 text: __(
97 'Use the search bar to find a particular user.',
98 'extendify-local',
99 ),
100 attachTo: {
101 element: 'p.search-box',
102 offset: {
103 marginTop: -5,
104 marginLeft: isRTL() ? 15 : -15,
105 },
106 boxPadding: {
107 top: 5,
108 bottom: 5,
109 left: 5,
110 right: 5,
111 },
112 position: {
113 x: isRTL() ? 'right' : 'left',
114 y: 'top',
115 },
116 hook: isRTL() ? 'top left' : 'top right',
117 },
118 events: {},
119 },
120 {
121 title: __('Add a new user', 'extendify-local'),
122 text: __(
123 'Click the Add New button to add a new user to your site.',
124 'extendify-local',
125 ),
126 attachTo: {
127 element: '.page-title-action',
128 offset: {
129 marginTop: -5,
130 marginLeft: isRTL() ? -15 : 15,
131 },
132 boxPadding: {
133 top: 5,
134 bottom: 5,
135 left: 5,
136 right: 5,
137 },
138 position: {
139 x: isRTL() ? 'left' : 'right',
140 y: 'top',
141 },
142 hook: isRTL() ? 'top right' : 'top left',
143 },
144 events: {},
145 },
146 ],
147 };
148