From 171fa8f7f3fff03cab5e6d80184bda54c735abc1 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Wed, 20 May 2026 20:44:50 +0800 Subject: [PATCH] auto-sync: 2026-05-20 20:44:50 --- src/frontend/src/components/EdictBoard.tsx | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/src/frontend/src/components/EdictBoard.tsx b/src/frontend/src/components/EdictBoard.tsx index d19c381..8463592 100644 --- a/src/frontend/src/components/EdictBoard.tsx +++ b/src/frontend/src/components/EdictBoard.tsx @@ -596,3 +596,57 @@ export default function EdictBoard() { ); } + +// 项目操作弹出菜单 +function ProjectActionPopup({ projectId, projectName, onAction, onClose }: { + projectId: string; projectName: string; + onAction: (action: 'archive' | 'delete', id: string) => void; + onClose: () => void; +}) { + return ( +
+ + +
+ ); +} + +// 新建项目对话框 +function NewProjectDialog({ onSubmit, onClose }: { + onSubmit: (id: string, name: string) => void; + onClose: () => void; +}) { + const [id, setId] = useState(''); + const [name, setName] = useState(''); + return ( +
+
e.stopPropagation()}> +
➕ 新建项目
+
+ + setId(e.target.value.replace(/[^a-zA-Z0-9_-]/g, ''))} placeholder="my-project" style={{ width: '100%', padding: '6px 10px', borderRadius: 6, border: '1px solid var(--line)', background: 'var(--panel)', color: 'var(--fg)', fontSize: 12, boxSizing: 'border-box' }} /> +
+
+ + setName(e.target.value)} placeholder="我的项目" style={{ width: '100%', padding: '6px 10px', borderRadius: 6, border: '1px solid var(--line)', background: 'var(--panel)', color: 'var(--fg)', fontSize: 12, boxSizing: 'border-box' }} /> +
+
+ + +
+
+
+ ); +}