-
-
- {platform.slice(0, 1)}-{ver}
-
-
-
- {platform !== 'ANDROID' && supportPlatform.includes('ANDROID') && (
-
-
-
- )}
- {platform === 'DESKTOP' && supportPlatform.includes('WEB') && (
-
-
-
- )}
- {platform === 'WEB' && supportPlatform.includes('DESKTOP') && (
-
-
-
- )}
-
+
+
+
+
+ {platform.slice(0, 1)}-{ver}
+
+
+
+ {platform !== 'ANDROID' && supportPlatform.includes('ANDROID') && (
+
- {author.id !== userId && (
-
-
-
- )}
-
-
-
-
-

-
-
-
- {toolName}
-
-
{`ID: ${toolId}`}
- {toolDesc && (
-
- {omitTextByByte(toolDesc, 64)}
-
)}
-
- {showAuthor && (
-
-
-
- }
- style={{ background: theme.colorBgLayout }}
+ {platform === 'DESKTOP' && supportPlatform.includes('WEB') && (
+
+
-
-
{author.userInfo.nickname}
+
+ )}
+ {platform === 'WEB' && supportPlatform.includes('DESKTOP') && (
+
+
+
+ )}
+
+
+
+ {author.id !== userId && (
+
+
+
+ )}
+
+
+
+
+

+
+
+
+ {toolName}
+
+
{`ID: ${toolId}`}
+ {toolDesc && (
+
+ {omitTextByByte(toolDesc, 64)}
)}
-
-
-
- {contextHolder}
- >
+
+ {showAuthor && (
+
+
+
+ }
+ style={{ background: theme.colorBgLayout }}
+ />
+
+
{author.userInfo.nickname}
+
+ )}
+
+
+
)
}
diff --git a/src/pages/Sign/Forget.tsx b/src/pages/Sign/Forget.tsx
index 6db1891..58772d3 100644
--- a/src/pages/Sign/Forget.tsx
+++ b/src/pages/Sign/Forget.tsx
@@ -9,6 +9,7 @@ import {
PERMISSION_USER_NOT_FOUND,
SYSTEM_INVALID_CAPTCHA_CODE
} from '@/constants/common.constants'
+import { message } from '@/util/common'
import { navigateToLogin } from '@/util/navigation'
import { r_auth_forget, r_auth_retrieve } from '@/services/auth'
import { AppContext } from '@/App'
diff --git a/src/pages/Sign/SignIn.tsx b/src/pages/Sign/SignIn.tsx
index 9ac8ee1..ab8dddd 100644
--- a/src/pages/Sign/SignIn.tsx
+++ b/src/pages/Sign/SignIn.tsx
@@ -11,6 +11,7 @@ import {
PERMISSION_USERNAME_NOT_FOUND,
SYSTEM_INVALID_CAPTCHA_CODE
} from '@/constants/common.constants'
+import { message, notification, modal } from '@/util/common'
import { getUserInfo, setToken } from '@/util/auth'
import { utcToLocalTime } from '@/util/datetime'
import {
@@ -26,7 +27,6 @@ import FlexBox from '@/components/common/FlexBox'
const SignIn = () => {
const { styles } = useStyles()
- const [modal, contextHolder] = AntdModal.useModal()
const { refreshRouter, isDarkMode } = useContext(AppContext)
const navigate = useNavigate()
const [searchParams] = useSearchParams()
@@ -82,8 +82,7 @@ const SignIn = () => {
switch (code) {
case PERMISSION_LOGIN_SUCCESS:
setToken(data?.token ?? '')
- void message.success('登录成功')
- setTimeout(() => {
+ message.success('登录成功').then(() => {
void getUserInfo().then((user) => {
refreshRouter()
navigateToRedirect(navigate, searchParams, '/repository')
@@ -109,7 +108,7 @@ const SignIn = () => {
placement: 'topRight'
})
})
- }, 1500)
+ })
break
case PERMISSION_NEED_TWO_FACTOR:
twoFactorForm.resetFields()
@@ -299,7 +298,6 @@ const SignIn = () => {