diff --git a/electron/ipcMainHandlers.ts b/electron/ipcMainHandlers.ts index f854956..860edd4 100644 --- a/electron/ipcMainHandlers.ts +++ b/electron/ipcMainHandlers.ts @@ -6,7 +6,6 @@ import { structureMetadata, } from "./core/dicom"; import { EVENT_PARSE_DICOM } from "./ipcEvent"; -import { cpuStartInfer } from "./core/infer/vino"; /** * 渲染进程和主进程的事件调度 diff --git a/package.json b/package.json index 70a4b17..80c9b7e 100644 --- a/package.json +++ b/package.json @@ -31,9 +31,11 @@ "dicom-parser": "1.8.21", "dockview": "^1.15.2", "flexlayout-react": "^0.7.15", + "framer-motion": "^11.3.24", "lucide-react": "^0.408.0", "object-hash": "^3.0.0", "onnxruntime-node": "^1.18.0", + "openvino-node": "2024.3.0", "react": "^18.2.0", "react-day-picker": "^8.10.1", "react-desktop": "^0.3.9", @@ -42,8 +44,7 @@ "react-resizable-panels": "^2.0.20", "react-router-dom": "^6.26.0", "tailwind-merge": "^2.4.0", - "tailwindcss-animate": "^1.0.7", - "openvino-node": "2024.3.0" + "tailwindcss-animate": "^1.0.7" }, "devDependencies": { "@radix-ui/react-icons": "^1.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5c5ad95..45cc064 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -68,6 +68,9 @@ importers: flexlayout-react: specifier: ^0.7.15 version: 0.7.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + framer-motion: + specifier: ^11.3.24 + version: 11.3.24(react-dom@18.3.1(react@18.3.1))(react@18.3.1) lucide-react: specifier: ^0.408.0 version: 0.408.0(react@18.3.1) @@ -2161,6 +2164,20 @@ packages: fraction.js@4.3.7: resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} + framer-motion@11.3.24: + resolution: {integrity: sha512-kl0YI7HwAtyV0VOAWuU/rXoOS8+z5qSkMN6rZS+a9oe6fIha6SC3vjJN6u/hBpvjrg5MQNdSnqnjYxm0WYTX9g==} + peerDependencies: + '@emotion/is-prop-valid': '*' + react: ^18.0.0 + react-dom: ^18.0.0 + peerDependenciesMeta: + '@emotion/is-prop-valid': + optional: true + react: + optional: true + react-dom: + optional: true + fs-constants@1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} @@ -6104,6 +6121,13 @@ snapshots: fraction.js@4.3.7: {} + framer-motion@11.3.24(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + tslib: 2.6.3 + optionalDependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + fs-constants@1.0.0: {} fs-extra@10.1.0: diff --git a/public/banner.png b/public/banner.png index be84e1b..2843c68 100644 Binary files a/public/banner.png and b/public/banner.png differ diff --git a/src/App.tsx b/src/App.tsx index e81a7e2..b438e99 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -3,6 +3,7 @@ import LayoutMain from "@/pages/Layout"; import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; import Aorta from "@/pages/Aorta"; import Dockview from "@/pages/Dock"; +import { Setting } from "./pages/Setting"; function App() { return ( @@ -12,6 +13,7 @@ function App() { }> } /> } /> + } /> diff --git a/src/main.tsx b/src/main.tsx index bf997ee..b24b892 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -2,11 +2,9 @@ import ReactDOM from "react-dom/client"; import App from "./App.tsx"; import "@/style/global.css"; - -ReactDOM.createRoot(document.getElementById("root")!).render(); - -// Use contextBridge window.ipcRenderer.on("main-process-message", (_event, message) => { const { platform } = message document.querySelector('html')?.setAttribute('platform', platform) + + ReactDOM.createRoot(document.getElementById("root")!).render(); }); diff --git a/src/pages/Aorta/index.tsx b/src/pages/Aorta/index.tsx index 48a904c..4aba7fd 100644 --- a/src/pages/Aorta/index.tsx +++ b/src/pages/Aorta/index.tsx @@ -1,13 +1,18 @@ import { Button } from "@/components/ui/button"; +import { motion } from 'framer-motion'; const Aorta = () => { return ( -
-
-

拓微启动器

- 科技行善,慈念为医 + +
+
-
+ ); }; diff --git a/src/pages/Layout.css b/src/pages/Layout.css index f968b66..9c57f74 100644 --- a/src/pages/Layout.css +++ b/src/pages/Layout.css @@ -15,4 +15,4 @@ .flexlayout__tabset-selected { background: transparent; } -} \ No newline at end of file +} diff --git a/src/pages/Layout.tsx b/src/pages/Layout.tsx index a300376..30bccfc 100644 --- a/src/pages/Layout.tsx +++ b/src/pages/Layout.tsx @@ -1,5 +1,5 @@ -import { Outlet, Link } from "react-router-dom"; -import { IoCubeOutline, IoHammerOutline, IoHandLeftOutline, IoLayersOutline, IoListOutline, IoPlayOutline, IoSettingsOutline } from "react-icons/io5"; +import { LeftDocker } from "./LeftDocker"; +import { Outlet } from "react-router-dom"; import { MenuBar } from "./MenuBar"; const LayoutMain = () => { @@ -21,51 +21,7 @@ const LayoutMain = () => {
-
    -
  • - - - 一键启动 - -
  • -
  • - - - 数据列表 - -
  • -
  • - - - 版本管理 - -
  • -
  • - - - 模型管理 - -
  • -
  • - - - 小工具 - -
  • -
  • - - - 帮助 - -
  • -
  • - - - 设置 - -
  • - -
+
diff --git a/src/pages/LeftDocker.css b/src/pages/LeftDocker.css new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/LeftDocker.tsx b/src/pages/LeftDocker.tsx new file mode 100644 index 0000000..61b3803 --- /dev/null +++ b/src/pages/LeftDocker.tsx @@ -0,0 +1,56 @@ +import { Link, useLocation } from "react-router-dom"; +import { + IoCubeOutline, + IoHammerOutline, + IoHandLeftOutline, + IoLayersOutline, + IoListOutline, + IoPlayOutline, + IoSettingsOutline +} from "react-icons/io5"; +import './LeftDocker.css' + +import { ReactNode } from 'react'; + +type MenuItem = { + to: string; + name: string; + icon: ReactNode; +}; + + +const menuItems: MenuItem[] = [ + { to: "/", name: "一键启动", icon: }, + { to: "/datalist", name: "数据列表", icon: }, + { to: "/version", name: "版本管理", icon: }, + { to: "/models", name: "模型管理", icon: }, + { to: "/tools", name: "小工具", icon: }, + { to: "/help", name: "帮助", icon: }, + { to: "/setting", name: "设置", icon: }, +]; + +export const LeftDocker = () => { + const location = useLocation(); + + const handleClick = (item: MenuItem) => { + console.log(`Clicked on ${item.name}`); + }; + + return ( +
    + {menuItems.map((item) => ( +
  • handleClick(item)} + > + + {item.icon} + {item.name} + +
  • + ))} +
+ ); +}; diff --git a/src/pages/Setting/index.tsx b/src/pages/Setting/index.tsx new file mode 100644 index 0000000..e470494 --- /dev/null +++ b/src/pages/Setting/index.tsx @@ -0,0 +1,12 @@ +import { motion } from 'framer-motion'; + +export const Setting = () => { + return +
设置
+
+} \ No newline at end of file