|
|
@ -1,7 +1,8 @@ |
|
|
|
import { useNavigate, useLocation } from 'react-router-dom'; |
|
|
|
import { LoginForm } from '../../components/auth/LoginForm'; |
|
|
|
import { DEFAULT_CREDENTIALS } from '../../constants/auth'; |
|
|
|
import { LoginForm } from '@/components/auth/LoginForm'; |
|
|
|
import { DEFAULT_CREDENTIALS } from '@/constants/auth'; |
|
|
|
import { useAuth } from '@/hooks/useAuth'; |
|
|
|
import { Permission } from '@/constants/menuConfig'; |
|
|
|
|
|
|
|
export function LoginPage() { |
|
|
|
const navigate = useNavigate(); |
|
|
@ -19,7 +20,13 @@ export function LoginPage() { |
|
|
|
id: '1', |
|
|
|
name: username, |
|
|
|
email: `${username}@example.com`, |
|
|
|
permissions: ['dashboard.view', 'users.view', 'roles.view', 'permissions.view', 'settings.view'] |
|
|
|
permissions: [ |
|
|
|
'dashboard.view', |
|
|
|
'users.view', |
|
|
|
'roles.view', |
|
|
|
'permissions.view', |
|
|
|
'settings.view' |
|
|
|
] as Permission[] |
|
|
|
}; |
|
|
|
|
|
|
|
// 保存用户数据到 localStorage
|
|
|
|