mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-09 15:35:39 +02:00
* 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:
@@ -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>(
|
||||
|
||||
Reference in New Issue
Block a user