fix
This commit is contained in:
@@ -8,7 +8,7 @@ import { FormEvent, Suspense, useCallback, useEffect, useState } from 'react';
|
||||
|
||||
import { useRouter, useSearchParams } from 'next/navigation';
|
||||
|
||||
import { ChevronLeft, Download, KeyRound, Loader2, Mail, Network, Phone, QrCode, ShieldCheck, ShieldQuestion, UserRound } from 'lucide-react';
|
||||
import { ChevronLeft, DoorOpen, Download, KeyRound, Loader2, Mail, Network, Phone, QrCode, ShieldCheck, ShieldQuestion, UserRound } from 'lucide-react';
|
||||
|
||||
import { QRCodeSVG } from 'qrcode.react';
|
||||
|
||||
@@ -116,7 +116,7 @@ function LoginPageContent() {
|
||||
router.replace('/');
|
||||
}, [router]);
|
||||
|
||||
const { identifyLogin, sendLoginOtp, verifyLoginOtp, loginWithPassword, loginWithLdap, beginTotpLogin, verifyTotpLogin, completePin, applyLoginAuth } = useAuth();
|
||||
const { identifyLogin, sendLoginOtp, verifyLoginOtp, loginWithPassword, loginWithLdap, beginTotpLogin, verifyTotpLogin, completePin, applyLoginAuth, logout } = useAuth();
|
||||
|
||||
const { showToast } = useToast();
|
||||
|
||||
@@ -1473,7 +1473,23 @@ function LoginPageContent() {
|
||||
|
||||
{step === 'pin' && pendingSessionId ? (
|
||||
|
||||
<form onSubmit={handlePinSubmit} className="space-y-3">
|
||||
<form onSubmit={handlePinSubmit} className="relative space-y-3">
|
||||
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
logout();
|
||||
setPendingSessionId(null);
|
||||
setPin('');
|
||||
setStep('identify');
|
||||
}}
|
||||
disabled={isSubmitting}
|
||||
title="Выйти из аккаунта"
|
||||
aria-label="Выйти из аккаунта"
|
||||
className="absolute -top-1 right-0 flex h-9 w-9 items-center justify-center rounded-full text-[#b9bdc9] transition hover:bg-white/10 hover:text-white disabled:opacity-50"
|
||||
>
|
||||
<DoorOpen className="h-4 w-4" />
|
||||
</button>
|
||||
|
||||
<PinInput
|
||||
|
||||
|
||||
Reference in New Issue
Block a user