|
@@ -77,7 +77,7 @@ import { PrinterInfoModal } from '../components/PrinterInfoModal';
|
|
|
import { getGlobalTrayId, getFillBarColor, getSpoolmanFillLevel, getFallbackSpoolTag } from '../utils/amsHelpers';
|
|
import { getGlobalTrayId, getFillBarColor, getSpoolmanFillLevel, getFallbackSpoolTag } from '../utils/amsHelpers';
|
|
|
import { getPrinterImage, getWifiStrength, filterCompatibleQueueItems } from '../utils/printer';
|
|
import { getPrinterImage, getWifiStrength, filterCompatibleQueueItems } from '../utils/printer';
|
|
|
import { FilamentSlotCircle } from '../components/FilamentSlotCircle';
|
|
import { FilamentSlotCircle } from '../components/FilamentSlotCircle';
|
|
|
-import { hexToColorName, parseFilamentColor, isLightColor } from '../utils/colors';
|
|
|
|
|
|
|
+import { getColorName, parseFilamentColor, isLightColor } from '../utils/colors';
|
|
|
|
|
|
|
|
// Complete Bambu Lab filament color mapping by tray_id_name
|
|
// Complete Bambu Lab filament color mapping by tray_id_name
|
|
|
// Source: https://github.com/queengooborg/Bambu-Lab-RFID-Library
|
|
// Source: https://github.com/queengooborg/Bambu-Lab-RFID-Library
|
|
@@ -3302,7 +3302,7 @@ function PrinterCard({
|
|
|
const filamentData = tray?.tray_type ? {
|
|
const filamentData = tray?.tray_type ? {
|
|
|
vendor: (isBambuLabSpool(tray) ? 'Bambu Lab' : 'Generic') as 'Bambu Lab' | 'Generic',
|
|
vendor: (isBambuLabSpool(tray) ? 'Bambu Lab' : 'Generic') as 'Bambu Lab' | 'Generic',
|
|
|
profile: slotPreset?.preset_name || cloudInfo?.name || inventoryAssignment?.spool?.slicer_filament_name || tray.tray_sub_brands || tray.tray_type,
|
|
profile: slotPreset?.preset_name || cloudInfo?.name || inventoryAssignment?.spool?.slicer_filament_name || tray.tray_sub_brands || tray.tray_type,
|
|
|
- colorName: getBambuColorName(tray.tray_id_name) || hexToColorName(tray.tray_color),
|
|
|
|
|
|
|
+ colorName: getBambuColorName(tray.tray_id_name) || getColorName(tray.tray_color || ''),
|
|
|
colorHex: tray.tray_color || null,
|
|
colorHex: tray.tray_color || null,
|
|
|
kFactor: formatKValue(tray.k),
|
|
kFactor: formatKValue(tray.k),
|
|
|
fillLevel: effectiveFill,
|
|
fillLevel: effectiveFill,
|
|
@@ -3544,7 +3544,7 @@ function PrinterCard({
|
|
|
const filamentData = tray?.tray_type ? {
|
|
const filamentData = tray?.tray_type ? {
|
|
|
vendor: (isBambuLabSpool(tray) ? 'Bambu Lab' : 'Generic') as 'Bambu Lab' | 'Generic',
|
|
vendor: (isBambuLabSpool(tray) ? 'Bambu Lab' : 'Generic') as 'Bambu Lab' | 'Generic',
|
|
|
profile: slotPreset?.preset_name || cloudInfo?.name || htInventoryAssignment?.spool?.slicer_filament_name || tray.tray_sub_brands || tray.tray_type,
|
|
profile: slotPreset?.preset_name || cloudInfo?.name || htInventoryAssignment?.spool?.slicer_filament_name || tray.tray_sub_brands || tray.tray_type,
|
|
|
- colorName: getBambuColorName(tray.tray_id_name) || hexToColorName(tray.tray_color),
|
|
|
|
|
|
|
+ colorName: getBambuColorName(tray.tray_id_name) || getColorName(tray.tray_color || ''),
|
|
|
colorHex: tray.tray_color || null,
|
|
colorHex: tray.tray_color || null,
|
|
|
kFactor: formatKValue(tray.k),
|
|
kFactor: formatKValue(tray.k),
|
|
|
fillLevel: htEffectiveFill,
|
|
fillLevel: htEffectiveFill,
|
|
@@ -3888,7 +3888,7 @@ function PrinterCard({
|
|
|
const extFilamentData = {
|
|
const extFilamentData = {
|
|
|
vendor: (isBambuLabSpool(extTray) ? 'Bambu Lab' : 'Generic') as 'Bambu Lab' | 'Generic',
|
|
vendor: (isBambuLabSpool(extTray) ? 'Bambu Lab' : 'Generic') as 'Bambu Lab' | 'Generic',
|
|
|
profile: extSlotPreset?.preset_name || extCloudInfo?.name || extInventoryAssignment?.spool?.slicer_filament_name || extTray.tray_sub_brands || extTray.tray_type || 'Unknown',
|
|
profile: extSlotPreset?.preset_name || extCloudInfo?.name || extInventoryAssignment?.spool?.slicer_filament_name || extTray.tray_sub_brands || extTray.tray_type || 'Unknown',
|
|
|
- colorName: getBambuColorName(extTray.tray_id_name) || hexToColorName(extTray.tray_color),
|
|
|
|
|
|
|
+ colorName: getBambuColorName(extTray.tray_id_name) || getColorName(extTray.tray_color || ''),
|
|
|
colorHex: extTray.tray_color || null,
|
|
colorHex: extTray.tray_color || null,
|
|
|
kFactor: formatKValue(extTray.k),
|
|
kFactor: formatKValue(extTray.k),
|
|
|
fillLevel: extEffectiveFill,
|
|
fillLevel: extEffectiveFill,
|