File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,14 @@ const useOTPModal = () => {
2424 document . head . appendChild ( style )
2525 }
2626
27- const open = ( { onOk, onCancel } : OTPModalProps ) => {
27+ const open = async ( { onOk, onCancel } : OTPModalProps ) => {
28+ const { status } = await otp . status ( )
29+ if ( ! status ) {
30+ onOk ?.( '' )
31+
32+ return
33+ }
34+
2835 const cookies = useCookies ( [ 'nginx-ui-2fa' ] )
2936 const ssid = cookies . get ( 'secure_session_id' )
3037 if ( ssid ) {
Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ function removeBannedIP(ip: string) {
5555<template >
5656 <div class =" flex justify-center" >
5757 <div >
58+ <TOTP class =" mb-4" />
59+
5860 <AAlert
5961 class =" mb-4"
6062 :message =" $gettext('Tips')"
@@ -106,8 +108,6 @@ function removeBannedIP(ip: string) {
106108 </template >
107109 </ATable >
108110 </div >
109-
110- <TOTP />
111111 </div >
112112 </div >
113113</template >
You can’t perform that action at this time.
0 commit comments