mirror of
https://github.com/cfngc4594/monaco-editor-lsp-next.git
synced 2025-07-04 01:10:53 +00:00
refactor: 删除未使用的用户管理相关代码
- 移除 user-management 组件 - 删除 Problem 和 User 相关类型定义 - 清理不再需要的配置文件引用
This commit is contained in:
parent
360399bdfb
commit
759aaae94f
@ -1,49 +0,0 @@
|
||||
"use client"
|
||||
|
||||
import { UserTable } from "./components/user-table"
|
||||
import { adminConfig } from "./config/admin"
|
||||
import { teacherConfig } from "./config/teacher"
|
||||
import { guestConfig } from "./config/guest"
|
||||
import { problemConfig } from "./config/problem"
|
||||
|
||||
interface UserManagementProps {
|
||||
userType: "admin" | "teacher" | "guest" | "problem"
|
||||
}
|
||||
|
||||
export function UserManagement({ userType }: UserManagementProps) {
|
||||
// 根据用户类型返回对应的配置
|
||||
if (userType === "admin") {
|
||||
return (
|
||||
<UserTable
|
||||
config={adminConfig}
|
||||
data={[]}
|
||||
/>
|
||||
)
|
||||
}
|
||||
if (userType === "teacher") {
|
||||
return (
|
||||
<UserTable
|
||||
config={teacherConfig}
|
||||
data={[]}
|
||||
/>
|
||||
)
|
||||
}
|
||||
if (userType === "guest") {
|
||||
return (
|
||||
<UserTable
|
||||
config={guestConfig}
|
||||
data={[]}
|
||||
/>
|
||||
)
|
||||
}
|
||||
if (userType === "problem") {
|
||||
return (
|
||||
<UserTable
|
||||
config={problemConfig}
|
||||
data={[]}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
return <div>暂不支持 {userType} 类型</div>
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
export interface Problem {
|
||||
id: string;
|
||||
displayId: number;
|
||||
difficulty: string;
|
||||
isPublished: boolean;
|
||||
isTrim: boolean;
|
||||
timeLimit: number;
|
||||
memoryLimit: number;
|
||||
userId?: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
export interface UserBase {
|
||||
id: string;
|
||||
name?: string;
|
||||
email: string;
|
||||
password?: string;
|
||||
role?: string;
|
||||
createdAt: string;
|
||||
updatedAt?: string;
|
||||
}
|
||||
|
||||
export interface Admin extends UserBase {
|
||||
// 管理员特有字段(如有)
|
||||
}
|
||||
export interface Teacher extends UserBase {
|
||||
// 教师特有字段(如有)
|
||||
}
|
||||
export interface Guest extends UserBase {
|
||||
// 学生特有字段(如有)
|
||||
}
|
Loading…
Reference in New Issue
Block a user