mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-07 07:59:42 +02:00
feat: add case reorder and delete in Manage tab
Add a "Manage" tab to the create-case modal with up/down reorder buttons and delete for each case. Linked cases are unlinked (folder preserved); CASES_DIR cases are permanently deleted. Backend: - DELETE /api/cases/:name — unlink or delete - PUT /api/cases/order — persist ordering to settings.json - GET /api/cases now respects saved caseOrder Frontend: - Third "Manage" tab in createCaseModal with case list - Delete button in mobile case picker bottom sheet - SSE events: case:deleted, case:order-changed
This commit is contained in:
@@ -431,6 +431,11 @@ export const LinkCaseSchema = z.object({
|
||||
path: safePathSchema,
|
||||
});
|
||||
|
||||
/** PUT /api/cases/order */
|
||||
export const CaseOrderSchema = z.object({
|
||||
order: z.array(z.string().regex(/^[a-zA-Z0-9_-]+$/, 'Invalid case name format')),
|
||||
});
|
||||
|
||||
/** POST /api/auth/revoke */
|
||||
export const RevokeSessionSchema = z.object({
|
||||
sessionToken: z.string().min(1).max(200).optional(),
|
||||
|
||||
Reference in New Issue
Block a user