Skip to content

Commit

Permalink
fix: add cursor-pointer CSS style onto interactive elements per Unloc…
Browse files Browse the repository at this point in the history
  • Loading branch information
carddev81 committed Jan 7, 2025
1 parent 14859ef commit 9b33dba
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 24 deletions.
45 changes: 27 additions & 18 deletions frontend/src/Components/ProviderCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@ export default function ProviderCard({
openEditProvider: (prov: ProviderPlatform) => void;
oidcClient: (prov: ProviderPlatform) => void;
showAuthorizationInfo: (prov: ProviderPlatform) => void;
refreshToken: (prov: ProviderPlatform) => void;
refreshToken: (prov: ProviderPlatform) => void;
archiveProvider: (prov: ProviderPlatform) => void;
}) {
const navigate = useNavigate();
return (
<tr className="bg-base-teal card p-4 w-full grid-cols-4 justify-items-center">
<td className="justify-self-start">{provider.name}</td>
<td>
{provider.oidc_id !== 0 || provider.type === ProviderPlatformType.BRIGHTSPACE ? (
{provider.oidc_id !== 0 ||
provider.type === ProviderPlatformType.BRIGHTSPACE ? (
<CheckCircleIcon className="w-4" />
) : (
<div className="w-4"></div>
Expand All @@ -59,27 +60,31 @@ export default function ProviderCard({
<td className="flex flex-row gap-3 justify-self-end">
{provider.state !== ProviderPlatformState.ARCHIVED ? (
<>
{provider.oidc_id !== 0 || provider.type === ProviderPlatformType.BRIGHTSPACE ? (
{provider.oidc_id !== 0 ||
provider.type === ProviderPlatformType.BRIGHTSPACE ? (
<>
{provider.type === ProviderPlatformType.BRIGHTSPACE ? (
{provider.type ===
ProviderPlatformType.BRIGHTSPACE ? (
<ULIComponent
dataTip={'Refresh Token'}
icon={ArrowPathIcon}
onClick={() =>
refreshToken(provider)
}
/>
) : ( <ULIComponent
dataTip={'Auth Info'}
icon={InformationCircleIcon}
onClick={() =>
showAuthorizationInfo(provider)
}
/>)
}
tooltipClassName="cursor-pointer"
dataTip={'Refresh Token'}
icon={ArrowPathIcon}
onClick={() => refreshToken(provider)}
/>
) : (
<ULIComponent
tooltipClassName="cursor-pointer"
dataTip={'Auth Info'}
icon={InformationCircleIcon}
onClick={() =>
showAuthorizationInfo(provider)
}
/>
)}
{provider.type !==
ProviderPlatformType.KOLIBRI && (
<ULIComponent
tooltipClassName="cursor-pointer"
dataTip={'Manage Users'}
icon={UserGroupIcon}
onClick={() =>
Expand All @@ -92,24 +97,28 @@ export default function ProviderCard({
</>
) : (
<ULIComponent
tooltipClassName="cursor-pointer"
dataTip={'Register Provider'}
icon={LinkIcon}
onClick={() => oidcClient(provider)}
/>
)}
<ULIComponent
tooltipClassName="cursor-pointer"
dataTip={'Edit Provider'}
icon={PencilSquareIcon}
onClick={() => openEditProvider(provider)}
/>
<ULIComponent
tooltipClassName="w-4 h-4 self-start cursor-pointer"
dataTip={'Disable'}
icon={XMarkIcon}
onClick={() => archiveProvider(provider)}
/>
</>
) : (
<ULIComponent
tooltipClassName="cursor-pointer"
dataTip={'Enable Provider'}
icon={CheckCircleIcon}
onClick={() => archiveProvider(provider)}
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/Pages/AdminManagement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export default function AdminManagement() {
<div className="flex space-x-4">
<ULIComponent
dataTip={'Edit Admin'}
tooltipClassName="tooltip-left"
tooltipClassName="tooltip-left cursor-pointer"
onClick={() => {
setTargetUser(user);
editUserModal.current?.showModal();
Expand All @@ -246,7 +246,7 @@ export default function AdminManagement() {
dataTip={
'Reset Password'
}
tooltipClassName="tooltip-left"
tooltipClassName="tooltip-left cursor-pointer"
onClick={() => {
setTargetUser(user);
resetUserPasswordModal.current?.showModal();
Expand All @@ -259,7 +259,7 @@ export default function AdminManagement() {
dataTip={getUserIconData[
'data-tip'
](user)}
tooltipClassName="tooltip-left"
tooltipClassName="tooltip-left cursor-pointer"
onClick={getUserIconData.onClick(
user
)}
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/Pages/StudentManagement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export default function StudentManagement() {
<div className="flex space-x-4">
<ULIComponent
dataTip={'Edit Student'}
tooltipClassName="tooltip-left"
tooltipClassName="tooltip-left cursor-pointer"
icon={PencilSquareIcon}
onClick={() => {
setTargetUser(user);
Expand All @@ -228,7 +228,7 @@ export default function StudentManagement() {
dataTip={
'Reset Password'
}
tooltipClassName="tooltip-left"
tooltipClassName="tooltip-left cursor-pointer"
icon={
ArrowPathRoundedSquareIcon
}
Expand All @@ -242,7 +242,7 @@ export default function StudentManagement() {
dataTip={
'Delete Student'
}
tooltipClassName="tooltip-left"
tooltipClassName="tooltip-left cursor-pointer"
icon={TrashIcon}
onClick={() => {
setTargetUser(user);
Expand Down

0 comments on commit 9b33dba

Please sign in to comment.