diff --git a/apps/web/src/app/main/courses/student/page.tsx b/apps/web/src/app/main/courses/student/page.tsx index 3704128..390d9dc 100644 --- a/apps/web/src/app/main/courses/student/page.tsx +++ b/apps/web/src/app/main/courses/student/page.tsx @@ -7,7 +7,6 @@ import { useAuth } from "@web/src/providers/auth-provider"; export default function StudentCoursesPage() { const [currentPage, setCurrentPage] = useState(1); const { user } = useAuth() - const { data: paginationRes, refetch } = api.course.findManyWithPagination.useQuery({ page: currentPage, pageSize: 8, @@ -19,12 +18,10 @@ export default function StudentCoursesPage() { } } }); - const handlePageChange = (page: number) => { setCurrentPage(page); refetch() }; - return (
diff --git a/apps/web/src/app/main/home/page.tsx b/apps/web/src/app/main/home/page.tsx index 2d645a0..0225772 100644 --- a/apps/web/src/app/main/home/page.tsx +++ b/apps/web/src/app/main/home/page.tsx @@ -2,7 +2,6 @@ import HeroSection from './components/HeroSection'; import CategorySection from './components/CategorySection'; import CoursesSection from './components/CoursesSection'; import FeaturedTeachersSection from './components/FeaturedTeachersSection'; - const HomePage = () => { const mockCourses = [ { diff --git a/apps/web/src/app/main/layout/MainLayout.tsx b/apps/web/src/app/main/layout/MainLayout.tsx index 8ec4204..09f5670 100644 --- a/apps/web/src/app/main/layout/MainLayout.tsx +++ b/apps/web/src/app/main/layout/MainLayout.tsx @@ -8,6 +8,7 @@ const { Content } = Layout; export function MainLayout() { return ( + diff --git a/apps/web/src/app/main/paths/page.tsx b/apps/web/src/app/main/paths/page.tsx index 0b4edfd..7b711c6 100644 --- a/apps/web/src/app/main/paths/page.tsx +++ b/apps/web/src/app/main/paths/page.tsx @@ -1,3 +1,6 @@ +import MindEditor from "@web/src/components/common/editor/MindEditor"; +import MindElixir, { MindElixirInstance } from "mind-elixir"; +import { useEffect, useRef } from "react"; export default function PathsPage() { - return <>paths + return } \ No newline at end of file diff --git a/apps/web/src/components/common/editor/MindEditor.tsx b/apps/web/src/components/common/editor/MindEditor.tsx new file mode 100644 index 0000000..3f94c77 --- /dev/null +++ b/apps/web/src/components/common/editor/MindEditor.tsx @@ -0,0 +1,28 @@ +import { MindElixirInstance } from "packages/mind-elixir-core/dist/types"; +import { useRef, useEffect } from "react"; +import MindElixir from 'mind-elixir'; + +export default function MindEditor() { + const me = useRef(); + useEffect(() => { + const instance = new MindElixir({ + el: "#map", + direction: MindElixir.SIDE, + draggable: true, // default true + contextMenu: true, // default true + toolBar: true, // default true + nodeMenu: true, // default true + keypress: true // default true + + }); + // instance.install(NodeMenu); + instance.init(MindElixir.new("新主题")); + me.current = instance; + }, []); + return
+
+ 1 +
+
+
+} \ No newline at end of file diff --git a/apps/web/src/index.css b/apps/web/src/index.css index 95e81a7..ab429a2 100755 --- a/apps/web/src/index.css +++ b/apps/web/src/index.css @@ -123,4 +123,9 @@ .custom-table .ant-table-tbody>tr:last-child>td { border-bottom: none; /* 去除最后一行的底部边框 */ +} + +#map { + height: 600px; + width: 100%; } \ No newline at end of file diff --git a/apps/web/src/routes/index.tsx b/apps/web/src/routes/index.tsx index f55410b..8b9519b 100755 --- a/apps/web/src/routes/index.tsx +++ b/apps/web/src/routes/index.tsx @@ -24,6 +24,7 @@ import CourseSettingForm from "../components/models/course/editor/form/CourseSet import CourseEditorLayout from "../components/models/course/editor/layout/CourseEditorLayout"; import { MainLayout } from "../app/main/layout/MainLayout"; import CoursesPage from "../app/main/courses/page"; +import PathsPage from "../app/main/paths/page"; interface CustomIndexRouteObject extends IndexRouteObject { name?: string; @@ -61,6 +62,11 @@ export const routes: CustomRouteObject[] = [ { index: true, element: , + + }, + { + path: "paths", + element: }, { path: "courses", diff --git a/config/nginx/nginx.conf b/config/nginx/nginx.conf index 271c72e..fd60aa7 100755 --- a/config/nginx/nginx.conf +++ b/config/nginx/nginx.conf @@ -12,7 +12,6 @@ events { http { include /etc/nginx/mime.types; default_type application/octet-stream; - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" '