Skip to content

Commit

Permalink
fix: remove stale user mgmt tour
Browse files Browse the repository at this point in the history
  • Loading branch information
Aceix committed Aug 26, 2024
1 parent 785717a commit 9c6ed8a
Showing 1 changed file with 72 additions and 72 deletions.
144 changes: 72 additions & 72 deletions src/pages/users/UsersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ export default function UsersPage(props: PageProps) {
icon={<QuestionCircleOutlined />}
style={{ marginRight: '0.5rem' }}
/>
<Button
{/* <Button
size="large"
onClick={() => {
setIsTourOpen(true);
Expand All @@ -612,7 +612,7 @@ export default function UsersPage(props: PageProps) {
style={{ marginRight: '0.5rem' }}
>
<InfoCircleOutlined /> Start Tour
</Button>
</Button> */}
<Button size="large" onClick={() => loadUsers()} style={{ marginRight: '0.5rem' }}>
<ReloadOutlined /> Reload users
</Button>
Expand Down Expand Up @@ -868,75 +868,75 @@ export default function UsersPage(props: PageProps) {
users,
]);

const userTourSteps: TourProps['steps'] = [
{
title: 'Users',
description: 'View users and their roles, you can also edit or delete users and transfer super admin rights',
target: () => usersTableRef.current,
placement: 'bottom',
},
{
title: 'Add a User',
description: 'Click here to add a user',
target: () => addUserButtonRef.current,
placement: 'bottom',
},
{
title: 'Username',
description: 'Enter a username for the user',
target: () => addUserNameInputRef.current,
placement: 'bottom',
},
{
title: 'Password',
description: 'Enter a password for the user',
target: () => addUserPasswordInputRef.current,
placement: 'bottom',
},
{
title: 'Set as Admin',
description: 'Check this box to set the user as admin',
target: () => addUserSetAsAdminCheckboxRef.current,
placement: 'bottom',
},
{
title: 'Review pending users',
description:
'An admin can allow or deny access to accounts that try accessing the server via SSO from this table.',
target: () => pendingUsersTableRef.current,
placement: 'bottom',
},
{
title: 'Deny all pending users',
description: 'A quick way to deny access to all pending users.',
target: () => denyAllUsersButtonRef.current,
placement: 'bottom',
},
];
// const userTourSteps: TourProps['steps'] = [
// {
// title: 'Users',
// description: 'View users and their roles, you can also edit or delete users and transfer super admin rights',
// target: () => usersTableRef.current,
// placement: 'bottom',
// },
// {
// title: 'Add a User',
// description: 'Click here to add a user',
// target: () => addUserButtonRef.current,
// placement: 'bottom',
// },
// {
// title: 'Username',
// description: 'Enter a username for the user',
// target: () => addUserNameInputRef.current,
// placement: 'bottom',
// },
// {
// title: 'Password',
// description: 'Enter a password for the user',
// target: () => addUserPasswordInputRef.current,
// placement: 'bottom',
// },
// {
// title: 'Set as Admin',
// description: 'Check this box to set the user as admin',
// target: () => addUserSetAsAdminCheckboxRef.current,
// placement: 'bottom',
// },
// {
// title: 'Review pending users',
// description:
// 'An admin can allow or deny access to accounts that try accessing the server via SSO from this table.',
// target: () => pendingUsersTableRef.current,
// placement: 'bottom',
// },
// {
// title: 'Deny all pending users',
// description: 'A quick way to deny access to all pending users.',
// target: () => denyAllUsersButtonRef.current,
// placement: 'bottom',
// },
// ];

const handleTourOnChange = (current: number) => {
switch (current) {
case 1:
setIsAddUserModalOpen(false);
break;
case 2:
setIsAddUserModalOpen(true);
break;
case 4:
setIsAddUserModalOpen(true);
setActiveTab(UsersPageTabs.usersTabKey);
break;
case 5:
setIsAddUserModalOpen(false);
setActiveTab(UsersPageTabs.invitesTabKey);
break;
default:
break;
}
setTimeout(() => {
setTourStep(current);
}, 200);
};
// const handleTourOnChange = (current: number) => {
// switch (current) {
// case 1:
// setIsAddUserModalOpen(false);
// break;
// case 2:
// setIsAddUserModalOpen(true);
// break;
// case 4:
// setIsAddUserModalOpen(true);
// setActiveTab(UsersPageTabs.usersTabKey);
// break;
// case 5:
// setIsAddUserModalOpen(false);
// setActiveTab(UsersPageTabs.invitesTabKey);
// break;
// default:
// break;
// }
// setTimeout(() => {
// setTourStep(current);
// }, 200);
// };

useEffect(() => {
loadUsers();
Expand Down Expand Up @@ -1057,13 +1057,13 @@ export default function UsersPage(props: PageProps) {
)}
</Skeleton>

<Tour
{/* <Tour
steps={userTourSteps}
open={isTourOpen}
onClose={() => setIsTourOpen(false)}
onChange={handleTourOnChange}
current={tourStep}
/>
/> */}

{/* misc */}
{notifyCtx}
Expand Down

0 comments on commit 9c6ed8a

Please sign in to comment.