diff --git a/dashboard/package-lock.json b/dashboard/package-lock.json
index 6451fd8..dff9b46 100644
--- a/dashboard/package-lock.json
+++ b/dashboard/package-lock.json
@@ -9,7 +9,8 @@
"version": "0.0.0",
"dependencies": {
"react": "^19.2.8",
- "react-dom": "^19.2.8"
+ "react-dom": "^19.2.8",
+ "react-router-dom": "^7.18.2"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
@@ -1241,6 +1242,19 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/cookie": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz",
+ "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
"node_modules/cross-spawn": {
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
@@ -2317,6 +2331,44 @@
"react": "^19.2.8"
}
},
+ "node_modules/react-router": {
+ "version": "7.18.2",
+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.2.tgz",
+ "integrity": "sha512-aUVMjFm3GAPTTZL7oYr5E7ETiqfQCHRLH+B+5afnICvf0r7kkK4eR6SMuwbSTJw/7t+12khT/Kahij49fqOCIg==",
+ "license": "MIT",
+ "dependencies": {
+ "cookie": "^1.0.1",
+ "set-cookie-parser": "^2.6.0"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ },
+ "peerDependencies": {
+ "react": ">=18",
+ "react-dom": ">=18"
+ },
+ "peerDependenciesMeta": {
+ "react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/react-router-dom": {
+ "version": "7.18.2",
+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.18.2.tgz",
+ "integrity": "sha512-AIKJ/jgGlFb3EbfCXk5Gzshiwt+l3mqbCrNjmEWMMjqQxNJ3svBa6bgzFyCC2Sw3RA0VWF1kg3uQf2OFhxb8hw==",
+ "license": "MIT",
+ "dependencies": {
+ "react-router": "7.18.2"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ },
+ "peerDependencies": {
+ "react": ">=18",
+ "react-dom": ">=18"
+ }
+ },
"node_modules/rolldown": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.3.tgz",
@@ -2366,6 +2418,12 @@
"semver": "bin/semver.js"
}
},
+ "node_modules/set-cookie-parser": {
+ "version": "2.7.2",
+ "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz",
+ "integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==",
+ "license": "MIT"
+ },
"node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
diff --git a/dashboard/package.json b/dashboard/package.json
index d07e944..132acce 100644
--- a/dashboard/package.json
+++ b/dashboard/package.json
@@ -11,7 +11,8 @@
},
"dependencies": {
"react": "^19.2.8",
- "react-dom": "^19.2.8"
+ "react-dom": "^19.2.8",
+ "react-router-dom": "^7.18.2"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
diff --git a/dashboard/public/banner.jpg b/dashboard/public/banner.jpg
new file mode 100644
index 0000000..9b20202
Binary files /dev/null and b/dashboard/public/banner.jpg differ
diff --git a/dashboard/public/version.json b/dashboard/public/version.json
new file mode 100644
index 0000000..e1e3211
--- /dev/null
+++ b/dashboard/public/version.json
@@ -0,0 +1,6 @@
+{
+ "buildNumber": "Unknown",
+ "commit": "Unknown",
+ "branch": "Unknown",
+ "time": "Unknown"
+}
\ No newline at end of file
diff --git a/dashboard/src/App.tsx b/dashboard/src/App.tsx
index a66b5ef..f789c63 100644
--- a/dashboard/src/App.tsx
+++ b/dashboard/src/App.tsx
@@ -1,121 +1,32 @@
-import { useState } from 'react'
-import reactLogo from './assets/react.svg'
-import viteLogo from './assets/vite.svg'
-import heroImg from './assets/hero.png'
-import './App.css'
+import { Route, Routes } from 'react-router-dom'
+import Navbar from './components/Navbar'
+import Banner from './components/Banner'
+import Footer from './components/Footer'
+import DashboardLayout from './layouts/DashboardLayout'
+import Placeholder from './pages/Placeholder'
function App() {
- const [count, setCount] = useState(0)
-
return (
- <>
-
-
-
-
Get started
-
- Edit src/App.tsx and save to test HMR
-
-
-
-
-
-
-
-
-
-
-
Documentation
-
Your questions, answered
-
-
-
-
-
Connect with us
-
Join the Vite community
-
-
-
-
-
-
- >
+
+
+
+
+
+
+
+ >
+ }
+ />
+ }>
+ } />
+ } />
+ } />
+ } />
+
+
)
}
diff --git a/dashboard/src/components/Banner.css b/dashboard/src/components/Banner.css
new file mode 100644
index 0000000..ae2c1cc
--- /dev/null
+++ b/dashboard/src/components/Banner.css
@@ -0,0 +1,76 @@
+.banner {
+ position: relative;
+ min-height: 100svh;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background-image: url('/banner.jpg');
+ background-size: cover;
+ background-position: center;
+ background-repeat: no-repeat;
+}
+
+.banner::before {
+ content: '';
+ position: absolute;
+ inset: 0;
+ background: rgba(0, 0, 0, 0.45);
+}
+
+.banner-overlay {
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 32px;
+ padding: 120px 24px 64px;
+ text-align: center;
+}
+
+.banner-title {
+ margin: 0;
+ font-size: 64px;
+ font-weight: 700;
+ letter-spacing: -1px;
+ color: #fff;
+ text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
+}
+
+.banner-button {
+ display: inline-block;
+ padding: 14px 40px;
+ font-size: 18px;
+ font-weight: 600;
+ color: #fff;
+ background: rgba(17, 18, 23, 0.65);
+ border: 1px solid rgba(255, 255, 255, 0.5);
+ border-radius: 999px;
+ text-decoration: none;
+ backdrop-filter: blur(6px);
+ transition:
+ background 0.25s,
+ transform 0.25s;
+
+ &:hover {
+ background: #c084fc;
+ border-color: #c084fc;
+ transform: translateY(-2px);
+ }
+}
+
+@media (max-width: 1024px) {
+ .banner-title {
+ font-size: 40px;
+ }
+}
+
+@media (max-width: 640px) {
+ .banner-title {
+ font-size: 32px;
+ }
+
+ .banner-button {
+ padding: 12px 32px;
+ font-size: 16px;
+ }
+}
diff --git a/dashboard/src/components/Banner.tsx b/dashboard/src/components/Banner.tsx
new file mode 100644
index 0000000..ccc1c0c
--- /dev/null
+++ b/dashboard/src/components/Banner.tsx
@@ -0,0 +1,16 @@
+import './Banner.css'
+
+function Banner() {
+ return (
+
+ )
+}
+
+export default Banner
diff --git a/dashboard/src/components/Footer.css b/dashboard/src/components/Footer.css
new file mode 100644
index 0000000..235dc2c
--- /dev/null
+++ b/dashboard/src/components/Footer.css
@@ -0,0 +1,26 @@
+.footer {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ gap: 8px;
+ padding: 24px;
+ background: rgba(22, 23, 29, 0.85);
+ border-top: 1px solid rgba(255, 255, 255, 0.1);
+}
+
+.footer-text {
+ margin: 0;
+ font-size: 14px;
+ color: rgba(255, 255, 255, 0.6);
+}
+
+.footer-version {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 2px;
+ font-family: ui-monospace, Consolas, monospace;
+ font-size: 12px;
+ color: rgba(255, 255, 255, 0.4);
+}
diff --git a/dashboard/src/components/Footer.tsx b/dashboard/src/components/Footer.tsx
new file mode 100644
index 0000000..20c59b3
--- /dev/null
+++ b/dashboard/src/components/Footer.tsx
@@ -0,0 +1,39 @@
+import { useEffect, useState } from 'react'
+import './Footer.css'
+
+interface VersionInfo {
+ buildNumber: string
+ commit: string
+ branch: string
+ time: string
+}
+
+function Footer() {
+ const [version, setVersion] = useState(null)
+
+ useEffect(() => {
+ fetch('/version.json')
+ .then((res) => res.json())
+ .then(setVersion)
+ .catch(() => setVersion(null))
+ }, [])
+
+ return (
+
+ )
+}
+
+export default Footer
diff --git a/dashboard/src/components/Navbar.css b/dashboard/src/components/Navbar.css
new file mode 100644
index 0000000..3968238
--- /dev/null
+++ b/dashboard/src/components/Navbar.css
@@ -0,0 +1,51 @@
+.navbar {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ z-index: 100;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 16px 32px;
+ background: rgba(22, 23, 29, 0.85);
+ backdrop-filter: blur(8px);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
+}
+
+.navbar-brand {
+ font-size: 20px;
+ font-weight: 700;
+ color: #fff;
+ text-decoration: none;
+ letter-spacing: 0.2px;
+}
+
+.navbar-links {
+ list-style: none;
+ display: flex;
+ gap: 24px;
+ margin: 0;
+ padding: 0;
+
+ a {
+ color: rgba(255, 255, 255, 0.8);
+ text-decoration: none;
+ font-size: 15px;
+ transition: color 0.2s;
+
+ &:hover {
+ color: #c084fc;
+ }
+ }
+}
+
+@media (max-width: 640px) {
+ .navbar {
+ padding: 12px 16px;
+ }
+
+ .navbar-links {
+ gap: 16px;
+ }
+}
diff --git a/dashboard/src/components/Navbar.tsx b/dashboard/src/components/Navbar.tsx
new file mode 100644
index 0000000..8f3bd22
--- /dev/null
+++ b/dashboard/src/components/Navbar.tsx
@@ -0,0 +1,25 @@
+import './Navbar.css'
+
+const links = [
+ { label: '首页', href: '/' },
+ { label: '控制面板', href: '/dashboard' },
+]
+
+function Navbar() {
+ return (
+
+ )
+}
+
+export default Navbar
diff --git a/dashboard/src/index.css b/dashboard/src/index.css
index 5fb3313..837fe0b 100644
--- a/dashboard/src/index.css
+++ b/dashboard/src/index.css
@@ -51,11 +51,6 @@
}
#root {
- width: 1126px;
- max-width: 100%;
- margin: 0 auto;
- text-align: center;
- border-inline: 1px solid var(--border);
min-height: 100svh;
display: flex;
flex-direction: column;
@@ -64,6 +59,7 @@
body {
margin: 0;
+ background: #16171d;
}
h1,
diff --git a/dashboard/src/layouts/DashboardLayout.css b/dashboard/src/layouts/DashboardLayout.css
new file mode 100644
index 0000000..84493a6
--- /dev/null
+++ b/dashboard/src/layouts/DashboardLayout.css
@@ -0,0 +1,101 @@
+.dashboard {
+ min-height: 100svh;
+ display: flex;
+ flex-direction: column;
+ background: #0f1014;
+}
+
+.dashboard-topbar {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 14px 24px;
+ background: #1a1c22;
+ border-bottom: 1px solid #2a2d35;
+}
+
+.dashboard-brand {
+ font-size: 18px;
+ font-weight: 700;
+ color: #fff;
+ text-decoration: none;
+}
+
+.dashboard-user {
+ font-size: 14px;
+ color: #9ca3af;
+}
+
+.dashboard-body {
+ display: flex;
+ flex: 1;
+}
+
+.dashboard-sidebar {
+ width: 200px;
+ flex-shrink: 0;
+ padding: 16px 0;
+ background: #16171d;
+ border-right: 1px solid #2a2d35;
+
+ nav {
+ display: flex;
+ flex-direction: column;
+ }
+}
+
+.dashboard-nav-link {
+ display: block;
+ padding: 12px 24px;
+ font-size: 14px;
+ color: #9ca3af;
+ text-decoration: none;
+ border-left: 3px solid transparent;
+ transition:
+ color 0.2s,
+ background 0.2s;
+
+ &:hover {
+ color: #fff;
+ background: rgba(255, 255, 255, 0.05);
+ }
+
+ &.active {
+ color: #c084fc;
+ background: rgba(192, 132, 252, 0.1);
+ border-left-color: #c084fc;
+ }
+}
+
+.dashboard-content {
+ flex: 1;
+ padding: 32px;
+ overflow: auto;
+}
+
+@media (max-width: 768px) {
+ .dashboard-body {
+ flex-direction: column;
+ }
+
+ .dashboard-sidebar {
+ width: 100%;
+ border-right: none;
+ border-bottom: 1px solid #2a2d35;
+
+ nav {
+ flex-direction: row;
+ overflow-x: auto;
+ }
+ }
+
+ .dashboard-nav-link {
+ border-left: none;
+ border-bottom: 3px solid transparent;
+ white-space: nowrap;
+ }
+
+ .dashboard-content {
+ padding: 20px;
+ }
+}
diff --git a/dashboard/src/layouts/DashboardLayout.tsx b/dashboard/src/layouts/DashboardLayout.tsx
new file mode 100644
index 0000000..85558fb
--- /dev/null
+++ b/dashboard/src/layouts/DashboardLayout.tsx
@@ -0,0 +1,45 @@
+import { NavLink, Outlet } from 'react-router-dom'
+import './DashboardLayout.css'
+
+const items = [
+ { label: '概览', href: '/dashboard' },
+ { label: '任务', href: '/dashboard/tasks' },
+ { label: '监控', href: '/dashboard/monitor' },
+ { label: '设置', href: '/dashboard/settings' },
+]
+
+function DashboardLayout() {
+ return (
+
+
+
+ JuiceWorkStation
+
+ 管理员
+
+
+
+
+
+
+
+
+ )
+}
+
+export default DashboardLayout
diff --git a/dashboard/src/main.tsx b/dashboard/src/main.tsx
index bef5202..ade9d64 100644
--- a/dashboard/src/main.tsx
+++ b/dashboard/src/main.tsx
@@ -1,10 +1,13 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
+import { BrowserRouter } from 'react-router-dom'
import './index.css'
import App from './App.tsx'
createRoot(document.getElementById('root')!).render(
-
+
+
+
,
)
diff --git a/dashboard/src/pages/Placeholder.css b/dashboard/src/pages/Placeholder.css
new file mode 100644
index 0000000..31e4176
--- /dev/null
+++ b/dashboard/src/pages/Placeholder.css
@@ -0,0 +1,21 @@
+.placeholder-title {
+ margin: 0 0 24px;
+ font-size: 28px;
+ font-weight: 600;
+ color: #f3f4f6;
+}
+
+.placeholder-box {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ min-height: 320px;
+ border: 1px dashed #2a2d35;
+ border-radius: 12px;
+ background: #1a1c22;
+ color: #9ca3af;
+
+ p {
+ font-size: 15px;
+ }
+}
diff --git a/dashboard/src/pages/Placeholder.tsx b/dashboard/src/pages/Placeholder.tsx
new file mode 100644
index 0000000..84e039c
--- /dev/null
+++ b/dashboard/src/pages/Placeholder.tsx
@@ -0,0 +1,18 @@
+import './Placeholder.css'
+
+interface PlaceholderProps {
+ title: string
+}
+
+function Placeholder({ title }: PlaceholderProps) {
+ return (
+
+ )
+}
+
+export default Placeholder
Connect with us
-Join the Vite community
---
-
-
- GitHub
-
-
- -
-
-
- Discord
-
-
- -
-
-
- X.com
-
-
- -
-
-
- Bluesky
-
-
-
-