mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Update profile-security.tsx
This commit is contained in:
@@ -44,6 +44,7 @@ import { Account, Session, User } from "@/db/schema/02_user";
|
|||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import type { AuthProviderConfig } from "@/lib/auth/config";
|
import type { AuthProviderConfig } from "@/lib/auth/config";
|
||||||
|
import { is } from "date-fns/locale";
|
||||||
|
|
||||||
interface ProfileSecurityProps {
|
interface ProfileSecurityProps {
|
||||||
user: User;
|
user: User;
|
||||||
@@ -162,7 +163,9 @@ export function ProfileSecurity({
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{isPasskeyEnabled && (
|
{isPasskeyEnabled ||
|
||||||
|
isPasswordEnabled ||
|
||||||
|
(isTwoFactorEnabled && (
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
<h3 className="text-lg font-medium">Authentication</h3>
|
<h3 className="text-lg font-medium">Authentication</h3>
|
||||||
<div className="border rounded-lg p-4 space-y-4">
|
<div className="border rounded-lg p-4 space-y-4">
|
||||||
@@ -198,7 +201,9 @@ export function ProfileSecurity({
|
|||||||
<div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4">
|
<div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4">
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<div className="font-medium">Two-Factor Authentication</div>
|
<div className="font-medium">
|
||||||
|
Two-Factor Authentication
|
||||||
|
</div>
|
||||||
{user.twoFactorEnabled && (
|
{user.twoFactorEnabled && (
|
||||||
<Badge
|
<Badge
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
@@ -236,7 +241,7 @@ export function ProfileSecurity({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
))}
|
||||||
|
|
||||||
{isPasskeyEnabled && (
|
{isPasskeyEnabled && (
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
|
|||||||
Reference in New Issue
Block a user