mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 10:29:52 +00:00
feat: added last login time
This commit is contained in:
@@ -1,22 +1,33 @@
|
||||
import { faShield } from "@fortawesome/free-solid-svg-icons";
|
||||
import { faShield, faClock } from "@fortawesome/free-solid-svg-icons";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { format } from "date-fns";
|
||||
|
||||
type Props = {
|
||||
lastLoggedInAuthMethod: string;
|
||||
lastLoginAuthMethod: string;
|
||||
lastLoginTime: string;
|
||||
};
|
||||
|
||||
export const LastLoginSection = ({ lastLoggedInAuthMethod }: Props) => (
|
||||
export const LastLoginSection = ({ lastLoginTime, lastLoginAuthMethod }: Props) => (
|
||||
<div>
|
||||
<div className="mb-2 flex items-center gap-2 border-b border-mineshaft-600 pb-1">
|
||||
<div className="font-medium">Last Login Details</div>
|
||||
<div className="font-medium">Last Login</div>
|
||||
</div>
|
||||
<div className="flex items-center gap-2 text-sm">
|
||||
<div className="mb-2 flex items-center gap-2 text-sm">
|
||||
<div className="rounded bg-mineshaft-700 p-1 px-2">
|
||||
<FontAwesomeIcon icon={faShield} />
|
||||
</div>
|
||||
<div className="flex flex-col">
|
||||
<div className="text-sm font-medium">Authentication Method</div>
|
||||
<div className="text-sm">{lastLoggedInAuthMethod}</div>
|
||||
<div className="text-sm">{lastLoginAuthMethod}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center gap-2 text-sm">
|
||||
<div className="rounded bg-mineshaft-700 p-1 px-2">
|
||||
<FontAwesomeIcon icon={faClock} />
|
||||
</div>
|
||||
<div className="flex flex-col">
|
||||
<div className="text-sm font-medium">Time</div>
|
||||
<div className="text-sm">{format(lastLoginTime, "PPpp")} </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user