Skip to content

Commit 83d6575

Browse files
committed
feat: add note for unactivated accounts
1 parent 5b2a8b7 commit 83d6575

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/components/AccountManager.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
} from '@blueprintjs/core'
1515
import { Popover2 } from '@blueprintjs/popover2'
1616

17-
import { useAtom, useSetAtom } from 'jotai'
17+
import { useAtom } from 'jotai'
1818
import { ComponentType, FC, useState } from 'react'
1919

2020
import { LoginPanel } from 'components/account/LoginPanel'
@@ -30,7 +30,7 @@ import { EditDialog } from './account/EditDialog'
3030
import { RegisterPanel } from './account/RegisterPanel'
3131

3232
const AccountMenu: FC = () => {
33-
const setAuthState = useSetAtom(authAtom)
33+
const [authState, setAuthState] = useAtom(authAtom)
3434
const [logoutDialogOpen, setLogoutDialogOpen] = useState(false)
3535
const [editDialogOpen, setEditDialogOpen] = useState(false)
3636

@@ -64,6 +64,14 @@ const AccountMenu: FC = () => {
6464
/>
6565

6666
<Menu>
67+
{!authState.activated && (
68+
<MenuItem
69+
disabled
70+
icon="warning-sign"
71+
text="账号未激活,请在退出登录后,以重置密码的方式激活"
72+
/>
73+
)}
74+
6775
<MenuItem
6876
shouldDismissPopover={false}
6977
icon="edit"

0 commit comments

Comments
 (0)