中英文切换 初始化
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
Typography
|
||||
} from 'antd';
|
||||
import { SearchOutlined, ReloadOutlined } from '@ant-design/icons';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const { Search } = Input;
|
||||
const { TabPane } = Tabs;
|
||||
@@ -35,6 +36,7 @@ const mockOnlineUsers = [
|
||||
];
|
||||
|
||||
const OnlineUserPage = () => {
|
||||
const { t } = useTranslation();
|
||||
const [activeTab, setActiveTab] = useState('onlineUser'); // 默认选中在线用户
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [dataSource, setDataSource] = useState(mockOnlineUsers);
|
||||
@@ -77,7 +79,7 @@ const OnlineUserPage = () => {
|
||||
{ title: '浏览器', dataIndex: 'browser' },
|
||||
{ title: '登录时间', dataIndex: 'loginTime' },
|
||||
{
|
||||
title: '操作', width: 100,
|
||||
title: t('roles.actions'), width: 100,
|
||||
render: (_, record) => (
|
||||
<Button type="link" onClick={() => handleForceLogout(record)} style={{ color: '#1890ff' }}>
|
||||
强退
|
||||
@@ -97,7 +99,7 @@ const OnlineUserPage = () => {
|
||||
onChange={setActiveTab}
|
||||
style={{ marginBottom: 0 }}
|
||||
>
|
||||
<TabPane tab="在线用户" key="onlineUser" />
|
||||
<TabPane tab={t('systemSetting.onlineUsers')} key="onlineUser" />
|
||||
<TabPane tab="其他监控" key="other" />
|
||||
</Tabs>
|
||||
|
||||
@@ -116,7 +118,7 @@ const OnlineUserPage = () => {
|
||||
/>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
|
||||
<span>用户名称</span>
|
||||
<span>profile.username</span>
|
||||
<Input
|
||||
placeholder="请输入用户名称"
|
||||
value={searchParams.userName}
|
||||
|
||||
Reference in New Issue
Block a user