Skip to content

Commit 1c17de7

Browse files
GhostTypesclaude
andcommitted
feat(ifs): add Material Station dashboard card with manual slot editor
Bring the WebUI to parity with the desktop FlashForgeUI: a real IFS Material Station grid card (4 slots, swatch + material) that refreshes from the printer's cached station status. Clicking a slot opens a manual editor — a material dropdown (14 recognized materials) and a grid of the 24 recognized color swatches, pre-seeded from the slot's current state. When Spoolman is configured, the editor offers a "Set from Spoolman" shortcut that pre-fills the selections (snapped to the fixed palette) for review before applying via the slot-config route. - New `ifs-station` grid component (definition + template + default layout + mobile order + Panel Visibility picker checkbox), feature-gated on the material station so it's user-added/positioned like any other card. - Replaces the earlier approach (an "Edit IFS Slots" button buried in the Spoolman Tracker panel + a slot-list modal), which is removed. - Removes the runtime auto-reveal of the Spoolman and IFS cards; cards now simply become available in the picker when their feature is present, matching desktop behaviour. - Spool picker renders above the slot editor (z-index) and resets on close. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f38db7e commit 1c17de7

9 files changed

Lines changed: 481 additions & 227 deletions

File tree

src/webui/static/app.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ import {
4949
import {
5050
applyDefaultTheme,
5151
applySettings,
52-
ensureSpoolmanVisibilityIfEnabled,
5352
initializeLayout,
5453
loadWebUITheme,
5554
persistSettings,
@@ -62,7 +61,7 @@ import {
6261
confirmMaterialMatching,
6362
setupMaterialMatchingHandlers,
6463
} from './features/material-matching.js';
65-
import { setupIfsStationHandlers } from './features/ifs-station.js';
64+
import { refreshIfsStationCard, setupIfsStationCard } from './features/ifs-station.js';
6665
import { initializeDiscovery } from './features/printer-discovery.js';
6766
import { loadSpoolmanConfig, setupSpoolmanHandlers } from './features/spoolman.js';
6867
import { $, hideElement, showElement } from './shared/dom.js';
@@ -320,6 +319,7 @@ onConnectionChange((connected) => {
320319

321320
onStatusUpdate((status) => {
322321
updatePrinterStatus(status);
322+
void refreshIfsStationCard();
323323
});
324324

325325
onSpoolmanUpdate((contextId, spool) => {
@@ -374,14 +374,13 @@ async function initialize(): Promise<void> {
374374
setupJobControlEventHandlers();
375375
setupMaterialMatchingHandlers();
376376
setupSpoolmanHandlers();
377-
setupIfsStationHandlers();
377+
setupIfsStationCard();
378378
initializeDiscovery();
379379

380380
const contextHandlers = {
381381
onContextSwitched: async () => {
382382
await loadPrinterFeatures();
383383
await loadSpoolmanConfig();
384-
ensureSpoolmanVisibilityIfEnabled();
385384
initializeCamera();
386385
},
387386
};
@@ -433,7 +432,6 @@ async function handlePostLoginTasks(): Promise<void> {
433432
await loadPrinterFeatures();
434433
await fetchPrinterContexts();
435434
await loadSpoolmanConfig();
436-
ensureSpoolmanVisibilityIfEnabled();
437435

438436
initializeCamera();
439437
} catch (error) {

0 commit comments

Comments
 (0)