fix(inventory): add CF/GF to subtype dropdown on the Add/Edit Spool form (#1345)

Adding a third-party PETG-CF spool via the Material=PETG + Subtype=CF
  flow (same shape as the existing PETG HF) hit a missing option: KNOWN_VARIANTS
  in spool-form/constants.ts didn't list CF or GF. Users had to type it
  freehand into the "create new" tail of the dropdown.

  Added both: CF (matches PETG-CF / PLA-CF / ASA-CF / PA-CF) and GF (the
  natural pair for ABS-GF / PA6-GF). parsePresetName is unaffected — its
  materials list is iterated longest-first, so cloud presets like
  "Bambu PETG-CF Black" still resolve to material=PETG-CF with empty
  afterMaterial.
This commit is contained in:
maziggy
2026-05-15 09:47:21 +02:00
parent 7d7267e9cb
commit f7c94cbc7b
4 changed files with 9 additions and 2 deletions
@@ -18,6 +18,11 @@ export const DEFAULT_BRANDS = [
// Known filament variants/subtypes
export const KNOWN_VARIANTS = [
'Basic', 'Matte', 'Silk', 'Silk+', 'Tough', 'Tough+', 'HF', 'High Flow', 'Engineering',
// CF (Carbon Fiber) / GF (Glass Fiber) — match Bambu's PETG-CF / PA6-GF /
// ABS-GF naming so users adding a third-party CF/GF spool can pick the
// base material + subtype here instead of needing a -CF Material entry
// (#1345).
'CF', 'GF',
'Galaxy', 'Glow', 'Marble', 'Metal', 'Rainbow', 'Sparkle', 'Wood',
'Translucent', 'Transparent', 'Clear', 'Lite', 'Pro', 'Plus', 'Max',
'Super', 'Ultra', 'Flex', 'Soft', 'Hard', 'Strong', 'Impact',