Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/components/RightContent/AvatarDropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LogoutOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons';
import { useEmotionCss } from '@ant-design/use-emotion-css';
import { history, useModel } from '@umijs/max';
import { history, useModel, useIntl } from '@umijs/max';
import { Spin } from 'antd';
import { stringify } from 'querystring';
import type { MenuInfo } from 'rc-menu/lib/interface';
Expand All @@ -20,6 +20,8 @@ export const AvatarName = () => {
};

export const AvatarDropdown: React.FC<GlobalHeaderRightProps> = ({ menu, children }) => {
const intl = useIntl();

/**
* 退出登录,并且将当前的 url 保存
*/
Expand Down Expand Up @@ -106,12 +108,12 @@ export const AvatarDropdown: React.FC<GlobalHeaderRightProps> = ({ menu, childre
{
key: 'center',
icon: <UserOutlined />,
label: '个人中心',
label: intl.formatMessage({ id: 'menu.account.center' }),
},
{
key: 'settings',
icon: <SettingOutlined />,
label: '个人设置',
label: intl.formatMessage({ id: 'menu.account.settings' }),
},
{
type: 'divider' as const,
Expand All @@ -121,7 +123,7 @@ export const AvatarDropdown: React.FC<GlobalHeaderRightProps> = ({ menu, childre
{
key: 'logout',
icon: <LogoutOutlined />,
label: '退出登录',
label: intl.formatMessage({ id: 'menu.account.logout' }),
},
];

Expand Down
6 changes: 3 additions & 3 deletions src/pages/Account/Settings/components/binding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ const BindingView: React.FC = () => {
key="Bind"
onClick={() => {
deleteUserUnbinding({ type: 'lark' }).then(() => {
message.success('解绑成功');
message.success(intl.formatMessage({ id: 'pages.settings.unbinding.success' }));
setBindingLark(false);
});
}}
rel="noopener noreferrer"
>
解绑
<FormattedMessage id="pages.settings.unbinding" />
</a>
) : (
<a
Expand All @@ -125,7 +125,7 @@ const BindingView: React.FC = () => {
target="_blank"
rel="noopener noreferrer"
>
绑定
<FormattedMessage id="pages.settings.binding" />
</a>
),
],
Expand Down