From 76f92c63b9a4f263dc811cf08df6a8dd955b5d82 Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Thu, 12 Oct 2023 15:04:40 +0800 Subject: [PATCH 1/4] fix(PaymentForm): fix copy --- src/components/Forms/PaymentForm/PayTo/Confirm/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Forms/PaymentForm/PayTo/Confirm/index.tsx b/src/components/Forms/PaymentForm/PayTo/Confirm/index.tsx index ca16fa894e..f15f24a187 100644 --- a/src/components/Forms/PaymentForm/PayTo/Confirm/index.tsx +++ b/src/components/Forms/PaymentForm/PayTo/Confirm/index.tsx @@ -240,8 +240,8 @@ const Confirm: React.FC = ({ <>

From 6dfb3c114a676b787e8180dd0c2345af369c6050 Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Thu, 12 Oct 2023 17:12:06 +0800 Subject: [PATCH 2/4] fix(GlobalDialogs): disable SetUserNameDialog in callback page ref: 202309-product--2#ZN-0038 --- src/components/GlobalDialogs/index.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/GlobalDialogs/index.tsx b/src/components/GlobalDialogs/index.tsx index a26750b929..995931d61d 100644 --- a/src/components/GlobalDialogs/index.tsx +++ b/src/components/GlobalDialogs/index.tsx @@ -1,22 +1,31 @@ import { useContext, useEffect } from 'react' import { OPEN_SET_USER_NAME_DIALOG } from '~/common/enums' -import { LikeCoinDialog, SetUserNameDialog, ViewerContext } from '~/components' +import { + LikeCoinDialog, + SetUserNameDialog, + useRoute, + ViewerContext, +} from '~/components' import UniversalAuthDialog from './UniversalAuthDialog' const GlobalDialogs = () => { const viewer = useContext(ViewerContext) + const { router, isInPath } = useRoute() useEffect(() => { if (!viewer.isAuthed) { return } - if (!viewer.userName || viewer.info.userNameEditable) { + if ( + (!viewer.userName || viewer.info.userNameEditable) && + !isInPath('CALLBACK_PROVIDER') + ) { window.dispatchEvent(new CustomEvent(OPEN_SET_USER_NAME_DIALOG)) } - }, []) + }, [router.pathname]) return ( <> From e9f83a87dba2851d54651c49f4588194c7e577d6 Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Thu, 12 Oct 2023 18:03:33 +0800 Subject: [PATCH 3/4] fix(SetPasswordDialog): remove password auto fill ref: 202309-product-02#ZN-0041 --- src/components/Dialogs/SetPasswordDialog/Content.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/components/Dialogs/SetPasswordDialog/Content.tsx b/src/components/Dialogs/SetPasswordDialog/Content.tsx index 11387ecaeb..35114ec9e9 100644 --- a/src/components/Dialogs/SetPasswordDialog/Content.tsx +++ b/src/components/Dialogs/SetPasswordDialog/Content.tsx @@ -1,7 +1,7 @@ import { useFormik } from 'formik' import gql from 'graphql-tag' import _pickBy from 'lodash/pickBy' -import React, { useContext, useEffect, useState } from 'react' +import React, { useContext } from 'react' import { FormattedMessage, useIntl } from 'react-intl' import { KEYVALUE } from '~/common/enums' @@ -48,7 +48,6 @@ const SetPasswordDialogContent: React.FC = ({ closeDialog }) => { const [set] = useMutation(SET_PASSWORD, undefined, { showToast: false, }) - const [inputType, setInputType] = useState<'password' | 'text'>('password') const { lang } = useContext(LanguageContext) @@ -99,15 +98,10 @@ const SetPasswordDialogContent: React.FC = ({ closeDialog }) => { }, }) - useEffect(() => { - // Switch back to plaintext display - setInputType('text') - }, []) - const InnerForm = (
Date: Fri, 13 Oct 2023 09:58:00 +0800 Subject: [PATCH 4/4] fix(Account): fix social account bind state toast ref: ref: 202309-product-02#ZN-0042 --- src/views/Me/Settings/Account/Socials/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/Me/Settings/Account/Socials/index.tsx b/src/views/Me/Settings/Account/Socials/index.tsx index b91f944b02..c510af55b6 100644 --- a/src/views/Me/Settings/Account/Socials/index.tsx +++ b/src/views/Me/Settings/Account/Socials/index.tsx @@ -1,4 +1,4 @@ -import { useContext, useLayoutEffect, useState } from 'react' +import { useContext, useEffect, useState } from 'react' import { FormattedMessage } from 'react-intl' import { @@ -69,7 +69,7 @@ const Socials = () => { router.push(url) } - useLayoutEffect(() => { + useEffect(() => { const bindResult = storage.remove(OAUTH_STORAGE_BIND_STATE) if (!bindResult) { return