feat: dashboard UI improvements - 8 changes
1. Web CAD title larger (24px, font-weight 800) 2. Gear icon opens SettingsModal 3. Folder drag-and-drop with nested folders (backend parent_id support) 4. Icon-only card buttons with CSS tooltips 5. Canvas preview (deterministic SVG per project) 6. Info panel: smaller title, double-height description 7. User/group permission selector 8. oe → ö correction
This commit is contained in:
@@ -62,10 +62,15 @@ export function registerProjectFolderRoutes(fastify: FastifyInstance, db: Databa
|
||||
const folder = db.getProjectFolder(id);
|
||||
if (!folder) return reply.code(404).send({ error: 'Folder not found' });
|
||||
if (folder.owner_id !== user.id) return reply.code(403).send({ error: 'Forbidden' });
|
||||
const body = request.body as { name?: string };
|
||||
const nameErr = validateName(body.name, 'name');
|
||||
if (nameErr) return reply.code(400).send({ error: nameErr });
|
||||
const updated = db.updateProjectFolder(id, { name: body.name });
|
||||
const body = request.body as { name?: string; parent_id?: string | null };
|
||||
const updates: Partial<{ name: string; parent_id: string | null }> = {};
|
||||
if (body.name !== undefined) {
|
||||
const nameErr = validateName(body.name, 'name');
|
||||
if (nameErr) return reply.code(400).send({ error: nameErr });
|
||||
updates.name = body.name;
|
||||
}
|
||||
if (body.parent_id !== undefined) updates.parent_id = body.parent_id;
|
||||
const updated = db.updateProjectFolder(id, updates);
|
||||
if (!updated) return reply.code(404).send({ error: 'Folder not found' });
|
||||
return updated;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user