Compare commits
2 Commits
681f48d1dd
...
fc337f689f
Author | SHA1 | Date | |
---|---|---|---|
|
fc337f689f | ||
|
fa986a0db5 |
|
@ -6,7 +6,6 @@ import {
|
||||||
structureMetadata,
|
structureMetadata,
|
||||||
} from "./core/dicom";
|
} from "./core/dicom";
|
||||||
import { EVENT_PARSE_DICOM } from "./ipcEvent";
|
import { EVENT_PARSE_DICOM } from "./ipcEvent";
|
||||||
import { cpuStartInfer } from "./core/infer/vino";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 渲染进程和主进程的事件调度
|
* 渲染进程和主进程的事件调度
|
||||||
|
|
|
@ -31,9 +31,11 @@
|
||||||
"dicom-parser": "1.8.21",
|
"dicom-parser": "1.8.21",
|
||||||
"dockview": "^1.15.2",
|
"dockview": "^1.15.2",
|
||||||
"flexlayout-react": "^0.7.15",
|
"flexlayout-react": "^0.7.15",
|
||||||
|
"framer-motion": "^11.3.24",
|
||||||
"lucide-react": "^0.408.0",
|
"lucide-react": "^0.408.0",
|
||||||
"object-hash": "^3.0.0",
|
"object-hash": "^3.0.0",
|
||||||
"onnxruntime-node": "^1.18.0",
|
"onnxruntime-node": "^1.18.0",
|
||||||
|
"openvino-node": "2024.3.0",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-day-picker": "^8.10.1",
|
"react-day-picker": "^8.10.1",
|
||||||
"react-desktop": "^0.3.9",
|
"react-desktop": "^0.3.9",
|
||||||
|
@ -42,8 +44,7 @@
|
||||||
"react-resizable-panels": "^2.0.20",
|
"react-resizable-panels": "^2.0.20",
|
||||||
"react-router-dom": "^6.26.0",
|
"react-router-dom": "^6.26.0",
|
||||||
"tailwind-merge": "^2.4.0",
|
"tailwind-merge": "^2.4.0",
|
||||||
"tailwindcss-animate": "^1.0.7",
|
"tailwindcss-animate": "^1.0.7"
|
||||||
"openvino-node": "2024.3.0"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@radix-ui/react-icons": "^1.3.0",
|
"@radix-ui/react-icons": "^1.3.0",
|
||||||
|
|
|
@ -68,6 +68,9 @@ importers:
|
||||||
flexlayout-react:
|
flexlayout-react:
|
||||||
specifier: ^0.7.15
|
specifier: ^0.7.15
|
||||||
version: 0.7.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
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:
|
lucide-react:
|
||||||
specifier: ^0.408.0
|
specifier: ^0.408.0
|
||||||
version: 0.408.0(react@18.3.1)
|
version: 0.408.0(react@18.3.1)
|
||||||
|
@ -2161,6 +2164,20 @@ packages:
|
||||||
fraction.js@4.3.7:
|
fraction.js@4.3.7:
|
||||||
resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==}
|
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:
|
fs-constants@1.0.0:
|
||||||
resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==}
|
resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==}
|
||||||
|
|
||||||
|
@ -6104,6 +6121,13 @@ snapshots:
|
||||||
|
|
||||||
fraction.js@4.3.7: {}
|
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-constants@1.0.0: {}
|
||||||
|
|
||||||
fs-extra@10.1.0:
|
fs-extra@10.1.0:
|
||||||
|
|
BIN
public/banner.png
Normal file
BIN
public/banner.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 MiB |
|
@ -3,6 +3,7 @@ import LayoutMain from "@/pages/Layout";
|
||||||
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
|
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
|
||||||
import Aorta from "@/pages/Aorta";
|
import Aorta from "@/pages/Aorta";
|
||||||
import Dockview from "@/pages/Dock";
|
import Dockview from "@/pages/Dock";
|
||||||
|
import { Setting } from "./pages/Setting";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
return (
|
return (
|
||||||
|
@ -12,6 +13,7 @@ function App() {
|
||||||
<Route path="/" element={<LayoutMain />}>
|
<Route path="/" element={<LayoutMain />}>
|
||||||
<Route index element={<Aorta />} />
|
<Route index element={<Aorta />} />
|
||||||
<Route path="dockerview" element={<Dockview />} />
|
<Route path="dockerview" element={<Dockview />} />
|
||||||
|
<Route path="setting" element={<Setting />} />
|
||||||
</Route>
|
</Route>
|
||||||
</Routes>
|
</Routes>
|
||||||
</Router>
|
</Router>
|
||||||
|
|
|
@ -2,11 +2,9 @@ import ReactDOM from "react-dom/client";
|
||||||
import App from "./App.tsx";
|
import App from "./App.tsx";
|
||||||
import "@/style/global.css";
|
import "@/style/global.css";
|
||||||
|
|
||||||
|
|
||||||
ReactDOM.createRoot(document.getElementById("root")!).render(<App />);
|
|
||||||
|
|
||||||
// Use contextBridge
|
|
||||||
window.ipcRenderer.on("main-process-message", (_event, message) => {
|
window.ipcRenderer.on("main-process-message", (_event, message) => {
|
||||||
const { platform } = message
|
const { platform } = message
|
||||||
document.querySelector('html')?.setAttribute('platform', platform)
|
document.querySelector('html')?.setAttribute('platform', platform)
|
||||||
|
|
||||||
|
ReactDOM.createRoot(document.getElementById("root")!).render(<App />);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
|
import { motion } from 'framer-motion';
|
||||||
|
|
||||||
const Aorta = () => {
|
const Aorta = () => {
|
||||||
return (
|
return (
|
||||||
<div className="p-2">
|
<motion.div
|
||||||
<div className="grid w-full max-w-sm items-center gap-1.5">
|
initial={{ y: 10, opacity: 0 }}
|
||||||
<Button
|
animate={{ y: 0, opacity: 1 }}
|
||||||
onClick={() => {
|
exit={{ y: 0, opacity: 0 }}
|
||||||
}}
|
transition={{ duration: 0.25 }}
|
||||||
>
|
>
|
||||||
启动分析
|
<div className="p-4">
|
||||||
</Button>
|
<div className="w-full h-[250px] rounded-md" style={{ backgroundImage: `url('/banner.png')`, backgroundSize: 'cover' }}></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</motion.div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Outlet, Link } from "react-router-dom";
|
import { LeftDocker } from "./LeftDocker";
|
||||||
import { IoCubeOutline, IoHammerOutline, IoHandLeftOutline, IoLayersOutline, IoListOutline, IoPlayOutline, IoSettingsOutline } from "react-icons/io5";
|
import { Outlet } from "react-router-dom";
|
||||||
import { MenuBar } from "./MenuBar";
|
import { MenuBar } from "./MenuBar";
|
||||||
|
|
||||||
const LayoutMain = () => {
|
const LayoutMain = () => {
|
||||||
|
@ -21,51 +21,7 @@ const LayoutMain = () => {
|
||||||
<div className="relative h-[calc(100%-36px)]">
|
<div className="relative h-[calc(100%-36px)]">
|
||||||
<div className="flex h-full">
|
<div className="flex h-full">
|
||||||
<div className="workspace w-[80px] h-full">
|
<div className="workspace w-[80px] h-full">
|
||||||
<ul className="flex flex-col items-center pt-2 gap-4">
|
<LeftDocker />
|
||||||
<li className="w-[60px] h-[60px] flex flex-col items-center justify-center">
|
|
||||||
<Link to="/" className="items-center flex flex-col gap-2">
|
|
||||||
<IoPlayOutline size={24} color="#fff" />
|
|
||||||
<span className="text-xs">一键启动</span>
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
<li className="w-[60px] h-[60px] flex flex-col items-center justify-center">
|
|
||||||
<Link to="/" className="items-center flex flex-col gap-2">
|
|
||||||
<IoListOutline size={24} color="#fff" />
|
|
||||||
<span className="text-xs">数据列表</span>
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
<li className="w-[60px] h-[60px] flex flex-col items-center justify-center">
|
|
||||||
<Link to="/" className="items-center flex flex-col gap-2">
|
|
||||||
<IoLayersOutline size={24} color="#fff" />
|
|
||||||
<span className="text-xs">版本管理</span>
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
<li className="w-[60px] h-[60px] flex flex-col items-center justify-center">
|
|
||||||
<Link to="/" className="items-center flex flex-col gap-2">
|
|
||||||
<IoCubeOutline size={24} color="#fff" />
|
|
||||||
<span className="text-xs">模型管理</span>
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
<li className="w-[60px] h-[60px] flex flex-col items-center justify-center">
|
|
||||||
<Link to="/" className="items-center flex flex-col gap-2">
|
|
||||||
<IoHammerOutline size={24} color="#fff" />
|
|
||||||
<span className="text-xs">小工具</span>
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
<li className="w-[60px] h-[60px] flex flex-col items-center justify-center">
|
|
||||||
<Link to="/" className="items-center flex flex-col gap-2">
|
|
||||||
<IoHandLeftOutline size={24} color="#fff" />
|
|
||||||
<span className="text-xs">帮助</span>
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
<li className="w-[60px] h-[60px] flex flex-col items-center justify-center">
|
|
||||||
<Link to="/" className="items-center flex flex-col gap-2">
|
|
||||||
<IoSettingsOutline size={24} color="#fff" />
|
|
||||||
<span className="text-xs">设置</span>
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="relative w-[calc(100%-80px)]">
|
<div className="relative w-[calc(100%-80px)]">
|
||||||
<div className="bg-card rounded-l-lg h-full">
|
<div className="bg-card rounded-l-lg h-full">
|
||||||
|
|
0
src/pages/LeftDocker.css
Normal file
0
src/pages/LeftDocker.css
Normal file
56
src/pages/LeftDocker.tsx
Normal file
56
src/pages/LeftDocker.tsx
Normal file
|
@ -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: <IoPlayOutline size={24} /> },
|
||||||
|
{ to: "/datalist", name: "数据列表", icon: <IoListOutline size={24} /> },
|
||||||
|
{ to: "/version", name: "版本管理", icon: <IoLayersOutline size={24} /> },
|
||||||
|
{ to: "/models", name: "模型管理", icon: <IoCubeOutline size={24} /> },
|
||||||
|
{ to: "/tools", name: "小工具", icon: <IoHammerOutline size={24} /> },
|
||||||
|
{ to: "/help", name: "帮助", icon: <IoHandLeftOutline size={24} /> },
|
||||||
|
{ to: "/setting", name: "设置", icon: <IoSettingsOutline size={24} /> },
|
||||||
|
];
|
||||||
|
|
||||||
|
export const LeftDocker = () => {
|
||||||
|
const location = useLocation();
|
||||||
|
|
||||||
|
const handleClick = (item: MenuItem) => {
|
||||||
|
console.log(`Clicked on ${item.name}`);
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ul className="flex flex-col items-center pt-2 gap-4">
|
||||||
|
{menuItems.map((item) => (
|
||||||
|
<li
|
||||||
|
key={item.name}
|
||||||
|
className={`w-full flex flex-col items-center justify-center ${location.pathname === item.to ? "active text-blue-500" : ""
|
||||||
|
}`}
|
||||||
|
onClick={() => handleClick(item)}
|
||||||
|
>
|
||||||
|
<Link to={item.to} className="w-[60px] h-[60px] flex items-center justify-center flex-col gap-2">
|
||||||
|
{item.icon}
|
||||||
|
<span className="text-xs">{item.name}</span>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
);
|
||||||
|
};
|
12
src/pages/Setting/index.tsx
Normal file
12
src/pages/Setting/index.tsx
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
import { motion } from 'framer-motion';
|
||||||
|
|
||||||
|
export const Setting = () => {
|
||||||
|
return <motion.div
|
||||||
|
initial={{ y: 10, opacity: 0 }}
|
||||||
|
animate={{ y: 0, opacity: 1 }}
|
||||||
|
exit={{ y: 0, opacity: 0 }}
|
||||||
|
transition={{ duration: 0.25 }}
|
||||||
|
>
|
||||||
|
<div>设置</div>
|
||||||
|
</motion.div>
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user