- unified design system: focus-visible rings, reduced-motion, color-scheme, theme persistence, tightened emerald radius tokens (checkbox circle bug) - redesigned all pages: Home/Login/Signup/404, dashboard shell, Overview hero (time-based gradient), list pages with empty states, form modals, detail pages - role-scoped navigation: console menu vs admin console with cross-switch entries, Chinese route titles and breadcrumbs - theme switcher (light/dark/auto) via composables/theme, home + dashboard - state-driven dropdowns (touch-safe logout), menu divider pointer-events fix - btn-primary unified to black-on-white / white-on-black per theme - update REFACTOR_PLAN.md (increments 2-6)
opencatd-open frontend
Vue 3 + TypeScript + Vite + Tailwind CSS 4 / daisyUI 5。
本地开发
前端通过 Vite dev server 开发(支持热更新),/api 请求代理到本地 Go 后端,无需每次重新构建嵌入:
# 方式一:一条命令并行启动前后端(后端 8080,前端 5173)
make dev
# 方式二:分开跑
make dev-backend # go run ./cmd/openteam,PORT=8080
make dev-frontend # cd frontend && pnpm dev
浏览器访问 http://localhost:5173 (localhost 属浏览器安全上下文,clipboard / Passkey 可直接用)。
环境变量:
| 变量 | 说明 | 默认 |
|---|---|---|
VITE_DEV_API_TARGET |
dev 代理的后端地址 | http://localhost:8080 |
VITE_DEV_HTTPS |
设为 true 时启用自签名 HTTPS dev server |
关闭 |
构建与嵌入
make web 构建前端并把产物移入 cmd/openteam/dist(Go 通过 //go:embed all:dist 嵌入);make build 编译二进制。dist 目录仅含 .gitkeep 占位时后端也能正常编译,因此克隆后可直接 make dev-backend 起后端联调。
其他常用命令
pnpm dev # 仅前端 dev server
pnpm typecheck # vue-tsc 类型检查
pnpm build # 类型检查 + 生产构建