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:
@@ -577,6 +577,33 @@ export async function deleteProjectShare(token: string, shareId: string): Promis
|
||||
if (!res.ok) throw new Error('Failed to delete share');
|
||||
}
|
||||
|
||||
// ─── Move Project Folder (update parent_id) ──────────────
|
||||
export async function moveProjectFolder(token: string, folderId: string, parentId: string | null, currentName: string): Promise<ProjectFolder> {
|
||||
const res = await fetch(`${API_BASE}/api/project-folders/${folderId}`, {
|
||||
method: 'PUT',
|
||||
headers: authHeaders(token),
|
||||
body: JSON.stringify({ name: currentName, parent_id: parentId }),
|
||||
});
|
||||
if (!res.ok) throw new Error('Failed to move project folder');
|
||||
return res.json();
|
||||
}
|
||||
|
||||
// ─── Users (for permission selection in info panel) ─────
|
||||
export interface SimpleUser {
|
||||
id: string;
|
||||
email: string;
|
||||
name: string;
|
||||
role: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export async function getUsers(token: string): Promise<SimpleUser[]> {
|
||||
const res = await fetch(`${API_BASE}/api/users`, { headers: authHeaders(token) });
|
||||
if (!res.ok) throw new Error('Failed to load users');
|
||||
return res.json();
|
||||
}
|
||||
|
||||
// ─── Global Block Folders ───────────────────────────────────
|
||||
export interface GlobalBlockFolder {
|
||||
id: string;
|
||||
|
||||
Reference in New Issue
Block a user