mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-17 19:36:28 +02:00
- Spoolman: Add link spool feature, UUID display, and sync feedback
- Link to Spoolman: Manually link existing Spoolman spools to AMS trays
- Hover over AMS slot to see "Link to Spoolman" button
- Select from list of unlinked Spoolman spools
- Automatically sets extra.tag field in Spoolman
- Spool UUID display: View and copy Bambu Lab spool UUID in AMS hover card
- Shows first 8 chars with copy button (full UUID to clipboard)
- Fallback copy method for HTTP contexts
- Sync feedback: Shows synced count and skipped spools with reasons
- Expandable list when more than 5 skipped
- Color swatches for identification
- Fixed Spoolman 400 Bad Request: extra field values must be valid JSON
- Updated documentation (wiki, website)
This commit is contained in:
@@ -1119,12 +1119,30 @@ export interface SpoolmanStatus {
|
||||
url: string | null;
|
||||
}
|
||||
|
||||
export interface SkippedSpool {
|
||||
location: string;
|
||||
reason: string;
|
||||
filament_type: string | null;
|
||||
color: string | null;
|
||||
}
|
||||
|
||||
export interface SpoolmanSyncResult {
|
||||
success: boolean;
|
||||
synced_count: number;
|
||||
skipped_count: number;
|
||||
skipped: SkippedSpool[];
|
||||
errors: string[];
|
||||
}
|
||||
|
||||
export interface UnlinkedSpool {
|
||||
id: number;
|
||||
filament_name: string | null;
|
||||
filament_material: string | null;
|
||||
filament_color_hex: string | null;
|
||||
remaining_weight: number | null;
|
||||
location: string | null;
|
||||
}
|
||||
|
||||
// Update types
|
||||
export interface VersionInfo {
|
||||
version: string;
|
||||
@@ -2037,6 +2055,13 @@ export const api = {
|
||||
request<{ spools: unknown[] }>('/spoolman/spools'),
|
||||
getSpoolmanFilaments: () =>
|
||||
request<{ filaments: unknown[] }>('/spoolman/filaments'),
|
||||
getUnlinkedSpools: () =>
|
||||
request<UnlinkedSpool[]>('/spoolman/spools/unlinked'),
|
||||
linkSpool: (spoolId: number, trayUuid: string) =>
|
||||
request<{ success: boolean; message: string }>(`/spoolman/spools/${spoolId}/link`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ tray_uuid: trayUuid }),
|
||||
}),
|
||||
|
||||
// Updates
|
||||
getVersion: () => request<VersionInfo>('/updates/version'),
|
||||
|
||||
Reference in New Issue
Block a user