Repository navigation
Commit fd78737
committed
feat(flashforge): F5 — manual filament edit bottom-sheet
Clone the Snapmaker filament-edit UX with the ffe* / ffgFilEdit*
prefix so both flows coexist. The Snapmaker code path is left
untouched.
HTML (inventory.html):
• #ffgFilEditBackdrop / #ffgFilEditSheet — summary screen with
Filaments + Color rows and the Apply button
• #ffgFilamentSheet — vendor + material picker (stacks on top)
• #ffgColorSheet — 24-preset palette + custom slot (stacks on top)
All three reuse the existing .sfe-* CSS classes — no new styles.
JS:
• openFlashforgeFilamentEdit / closeFlashforgeFilamentEdit
• Stacked filament + colour sub-sheets (ffeOpen/Close*Sheet)
• ffgFilRenderVendorList / ffgFilRenderMaterialList — curated
catalogue with Generic / FlashForge / Bambu Lab / eSun /
Polymaker / Sunlu vendors. Sort priority: PLA / PETG / ABS / TPU.
• ffeRenderColorGrid — same 24-preset palette as Snapmaker
(FFG_FIL_COLOR_PRESETS aliased to SNAP_FIL_COLOR_PRESETS) +
custom-color slot with the inline OS picker overlay trick.
• Click delegation on the panel body picks up data-ffg-fil-edit
independently of Snapmaker's data-snap-fil-edit, so a click on
a FlashForge slot opens the right sheet.
Apply (POST /control):
• matlStation: { cmd: "msConfig_cmd", args: { slot, mt, rgb } }
• independent: { cmd: "ipdMsConfig_cmd", args: { mt, rgb } }
Auth body is the standard { serialNumber, checkCode } pair.
After success we patch conn.data optimistically so the colour
square updates immediately — the next /detail poll (≤ 2 s) will
echo the printer's authoritative state.
closePrinterDetail closes the FlashForge sheet too so it doesn't
stay floating after the side-card slides out (mirror of the
existing Snapmaker handling).
i18n: ffgFilEditTitle, ffgFilEditApply, ffgErrNetwork added in 9
locales. Sub-screen titles reuse snapFilSelectFilament /
snapFilSelectColor (already exist).1 parent 6fbde1b commit fd78737
11 files changed
Lines changed: 490 additions & 9 deletions
File tree
- renderer
- locales
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
457 | 539 | | |
458 | 540 | | |
459 | 541 | | |
| |||
0 commit comments