Skip to content

Commit

Permalink
fix: 修复 lock 文件
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoyafng committed Dec 12, 2024
1 parent c38e5a7 commit 59feec3
Show file tree
Hide file tree
Showing 14 changed files with 10,045 additions and 12,261 deletions.
22,208 changes: 10,001 additions & 12,207 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions packages/guard-core-v4/src/IdentityBinding/IdentityBinding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ export const GuardIdentityBindingView: React.FC<{

spinChange(true)

const res = await bindMethodsMap[
type as 'phone-code' | 'email-code' | 'password'
]?.(data)
const res =
await bindMethodsMap[type as 'phone-code' | 'email-code' | 'password']?.(
data
)

const { isFlowEnd } = res

Expand All @@ -161,12 +162,12 @@ export const GuardIdentityBindingView: React.FC<{
const agreements = useMemo(
() =>
agreementEnabled
? config?.agreements?.filter(
? (config?.agreements?.filter(
agree =>
fallbackLng(i18n.resolvedLanguage).find(lng =>
lng.includes(agree.lang)
) && !!agree?.availableAt
) ?? []
) ?? [])
: [],
[agreementEnabled, config?.agreements, i18n.resolvedLanguage]
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const LoginWithVerifyCode = (props: any) => {
const [identify, setIdentify] = useState('')

const [currentMethod, setCurrentMethod] = useState<InputMethod>(
specifyDefaultLoginMethod ? _lockMethod ?? methods[0] : methods[0]
specifyDefaultLoginMethod ? (_lockMethod ?? methods[0]) : methods[0]
)
// 是否仅开启国际化短信
const [isOnlyInternationSms, setInternationSms] = useState(false)
Expand Down Expand Up @@ -506,8 +506,8 @@ const LoginWithVerifyCode = (props: any) => {
specifyDefaultLoginMethod === LoginMethods.PhoneCode
? _firstItemInitialValue
: (specifyCodeMethod === 'phone' || !isInternationSms) && phone
? phone
: ''
? phone
: ''
}
name="identify"
className={
Expand Down
4 changes: 2 additions & 2 deletions packages/guard-core-v4/src/Login/hooks/useLoginMultiple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ function useLoginAccountBackFill(options: {
const prefix = isOnlyInternationSms
? ''
: backfillData?.phoneCountryCode
? backfillData?.phoneCountryCode + ' '
: ''
? backfillData?.phoneCountryCode + ' '
: ''

const content = backfillData?.account || ''

Expand Down
4 changes: 2 additions & 2 deletions packages/guard-core-v4/src/Login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,13 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({
const agreements = useMemo(
() =>
agreementEnabled
? config?.agreements?.filter(
? (config?.agreements?.filter(
agree =>
fallbackLng(i18n.resolvedLanguage).find(lng =>
lng.includes(agree.lang)
) &&
(config?.autoRegister || !!agree?.availableAt)
) ?? []
) ?? [])
: [],
[
agreementEnabled,
Expand Down
5 changes: 2 additions & 3 deletions packages/guard-core-v4/src/MFA/core/email.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,8 @@ export const VerifyMFAEmail: React.FC<VerifyMFAEmailProps> = ({
code: mfaCode.join('')
}

const { isFlowEnd, data, onGuardHandling } = await businessRequest(
requestData
)
const { isFlowEnd, data, onGuardHandling } =
await businessRequest(requestData)

submitButtonRef.current?.onSpin(false)

Expand Down
5 changes: 2 additions & 3 deletions packages/guard-core-v4/src/MFA/core/sms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,8 @@ export const VerifyMFASms: React.FC<VerifyMFASmsProps> = ({
phoneCountryCode: phoneCountryCode ? phoneCountryCode : countryCode
}

const { isFlowEnd, data, onGuardHandling } = await businessRequest(
requestData
)
const { isFlowEnd, data, onGuardHandling } =
await businessRequest(requestData)

submitButtonRef.current?.onSpin(false)

Expand Down
5 changes: 2 additions & 3 deletions packages/guard-core-v4/src/MFA/core/totp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ export const VerifyMFATotp: React.FC<VerifyMFATotpProps> = ({
mfaToken
}

const { isFlowEnd, data, onGuardHandling } = await businessRequest(
requestData
)
const { isFlowEnd, data, onGuardHandling } =
await businessRequest(requestData)

submitButtonRef.current?.onSpin(false)

Expand Down
28 changes: 10 additions & 18 deletions packages/guard-core-v4/src/Qrcode/WorkQrCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,11 @@ const WorkQrCodeComponent: ForwardRefRenderFunction<any, WorkQrCodeProps> = (
}
}

useImperativeHandle(
ref,
() => {
return {
referQrCode
}
},
[referQrCode]
)
useImperativeHandle(ref, () => {
return {
referQrCode
}
}, [referQrCode])

/**
* 渲染时进行格式化描述
Expand Down Expand Up @@ -352,15 +348,11 @@ const WorkGeneQrCodeComponent: ForwardRefRenderFunction<
}
}

useImperativeHandle(
ref,
() => {
return {
referQrCode
}
},
[referQrCode]
)
useImperativeHandle(ref, () => {
return {
referQrCode
}
}, [referQrCode])

/**
* 渲染时进行格式化描述
Expand Down
4 changes: 2 additions & 2 deletions packages/guard-core-v4/src/Register/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ export const GuardRegisterView: React.FC = () => {
onBeforeRegister: events?.onBeforeRegister,
//availableAt 0或者null-注册时,1-登录时,2-注册和登录时
agreements: agreementEnabled
? config?.agreements?.filter(
? (config?.agreements?.filter(
agree =>
fallbackLng(i18n.resolvedLanguage!).find(lng =>
lng.includes(agree.lang)
) && agree?.availableAt !== 1
) ?? []
) ?? [])
: [],
publicConfig: publicConfig,
methods: verifyRegisterMethods
Expand Down
2 changes: 1 addition & 1 deletion packages/guard-core-v4/src/SubmitButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const SubmitButton = (props: SubmitButtonProps, ref: any) => {
type={props?.type ?? 'primary'}
htmlType={props?.htmlType ?? 'submit'}
loading={spin}
disabled={buttonSpin ? true : props?.disabled ?? spin}
disabled={buttonSpin ? true : (props?.disabled ?? spin)}
onClick={props.onClick ? props.onClick : () => {}}
className={`authing-g2-submit-button ${propsCls} ${shakingCls}`}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ export const JoinTenantView: React.FC<JoinTenantProps> = ({ onBack }) => {
onNext: () => {
setCurrStepKey(JoinTenantStepEnum.VerifyEmailCode)
setEnterpriseEmail(
`${form.getFieldValue('email')}@${tenantInfo
?.enterpriseDomains?.[0]}`
`${form.getFieldValue('email')}@${
tenantInfo?.enterpriseDomains?.[0]
}`
)
},
onPrevOrCancel() {
Expand Down
5 changes: 2 additions & 3 deletions packages/guard-core-v4/src/TenantPortalSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ export const GuardTenantPortalSelectView = () => {
http.setTenantId('') //使用前重置,防止其他环境设置污染,便于状态可控
}

const { isFlowEnd, onGuardHandling, data } = await http.authFlow(
moduleName
)
const { isFlowEnd, onGuardHandling, data } =
await http.authFlow(moduleName)
if (isFlowEnd) {
setTimeout(() => events?.onLogin?.(data, authClient)) // 让选择事件先行,登录成功宏任务异步,方便异步并发
} else {
Expand Down
14 changes: 7 additions & 7 deletions packages/guard-core-v4/src/_utils/popupCenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ export const popupCenter = (
const width = guardWindow.innerWidth
? guardWindow.innerWidth
: document.documentElement.clientWidth
? document.documentElement.clientWidth
: guardWindow.screen.width
? document.documentElement.clientWidth
: guardWindow.screen.width

const height = guardWindow.innerHeight
? guardWindow.innerHeight
: document.documentElement.clientHeight
? document.documentElement.clientHeight
: guardWindow.screen.height
? document.documentElement.clientHeight
: guardWindow.screen.height

const systemZoom = width / guardWindow.screen.availWidth
const left = (width - w) / 2 / systemZoom + dualScreenLeft
Expand All @@ -50,9 +50,9 @@ export const popupCenter = (
resizable=no,
location=no,
status=no
width=${w / systemZoom},
height=${h / systemZoom},
top=${top},
width=${w / systemZoom},
height=${h / systemZoom},
top=${top},
left=${left}
`
)
Expand Down

0 comments on commit 59feec3

Please sign in to comment.