mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-18 21:47:39 +02:00
- Enhanced skip objects feature with visual improvements and better UX
- Skip Objects Modal:
- Object ID markers overlaid on preview image (grid layout)
- Large prominent ID badges to match printer display
- Info banner explaining to match IDs with printer screen
- Layer warning when skip unavailable (layer <= 1)
- Red badge on button showing skipped count
- Preview image now shown when paused (not just running)
- Close with ESC key or click outside modal
- Full light/dark theme support
- Backend:
- Extract object positions from 3MF (include_positions=True)
- API returns x/y coordinates for objects (when available)
- Parse s_obj from printer MQTT for skipped state persistence
- Cover URL available in PAUSE/PAUSED states
- Tests:
- Added test for objects with position data
This commit is contained in:
@@ -163,6 +163,8 @@ export interface PrinterStatus {
|
||||
mc_print_sub_stage: number;
|
||||
// Timestamp of last AMS data update (for RFID refresh detection)
|
||||
last_ams_update: number;
|
||||
// Number of printable objects in current print (for skip objects feature)
|
||||
printable_objects_count: number;
|
||||
}
|
||||
|
||||
export interface PrinterCreate {
|
||||
@@ -1289,6 +1291,24 @@ export const api = {
|
||||
method: 'POST',
|
||||
}),
|
||||
|
||||
// Skip Objects
|
||||
getPrintableObjects: (printerId: number) =>
|
||||
request<{
|
||||
objects: Array<{ id: number; name: string; x: number | null; y: number | null; skipped: boolean }>;
|
||||
total: number;
|
||||
skipped_count: number;
|
||||
is_printing: boolean;
|
||||
}>(`/printers/${printerId}/print/objects`),
|
||||
|
||||
skipObjects: (printerId: number, objectIds: number[]) =>
|
||||
request<{ success: boolean; message: string; skipped_objects: number[] }>(
|
||||
`/printers/${printerId}/print/skip-objects`,
|
||||
{
|
||||
method: 'POST',
|
||||
body: JSON.stringify(objectIds),
|
||||
}
|
||||
),
|
||||
|
||||
// AMS Control
|
||||
refreshAmsSlot: (printerId: number, amsId: number, slotId: number) =>
|
||||
request<{ success: boolean; message: string }>(
|
||||
|
||||
Reference in New Issue
Block a user