Feature: print files directly from project view (closes #930) (#932)

* feat: print files directly from project view (closes #930)

Show printable files from linked library folders directly in the project
detail page, with Print Now and Add to Queue buttons per file. Removes
the detour through the File Manager for common reprint workflows.
This commit is contained in:
lietschaend
2026-04-10 12:54:27 +02:00
committed by GitHub
parent b453385d22
commit f95b2acd7d
21 changed files with 566 additions and 31 deletions
+7 -1
View File
@@ -1441,6 +1441,8 @@ export interface PrintQueueItemCreate {
gcode_injection?: boolean;
// Batch: create multiple copies (creates a batch if > 1)
quantity?: number;
// Project to associate the resulting archive with
project_id?: number;
}
export interface PrintQueueItemUpdate {
@@ -4240,11 +4242,14 @@ export const api = {
getLibraryFoldersByArchive: (archiveId: number) =>
request<LibraryFolder[]>(`/library/folders/by-archive/${archiveId}`),
getLibraryFiles: (folderId?: number | null, includeRoot = true) => {
getLibraryFiles: (folderId?: number | null, includeRoot = true, projectId?: number) => {
const params = new URLSearchParams();
if (folderId !== undefined && folderId !== null) {
params.set('folder_id', String(folderId));
}
if (projectId !== undefined) {
params.set('project_id', String(projectId));
}
params.set('include_root', String(includeRoot));
return request<LibraryFileListItem[]>(`/library/files?${params}`);
},
@@ -4379,6 +4384,7 @@ export const api = {
layer_inspect?: boolean;
timelapse?: boolean;
use_ams?: boolean;
project_id?: number;
}
) =>
request<BackgroundDispatchResponse>(