PluginProbe
Extendify / 3.1.5
Extendify v3.1.5
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 0.7.0 All 126 releases
extendify / src / HelpCenter / tours / users-screen.js

users-screen.js in Extendify 3.1.5, at src/HelpCenter/tours/users-screen.js

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