推进 INI 面板 control view helper

This commit is contained in:
2026-06-14 22:40:47 +08:00
parent e6f55d775f
commit 4133d202f0
6 changed files with 237 additions and 2 deletions

View File

@@ -46,6 +46,7 @@ import {
saveMachineSessionSnapshotWorkflow,
} from "./session-workflow.js";
import {
createMachineSessionControlView,
createMachineSessionStateSnapshot,
createMachineSessionStateBundle,
createMachineSessionStateReport,
@@ -171,6 +172,10 @@ function getMachineSessionStateBundle() {
return createMachineSessionStateBundle(window.linuxCncIniPanelMachineSessionState);
}
function getMachineSessionControlView() {
return createMachineSessionControlView(getMachineSessionStateBundle());
}
function updatePanelMachineSessionState(patch = {}) {
panelMachineSessionState = createMachineSessionStateSnapshot({
...panelMachineSessionState,
@@ -185,11 +190,13 @@ function updatePanelMachineSessionState(patch = {}) {
}
window.linuxCncIniPanelApi = {
getMachineSessionControlView,
getMachineSessionStateBundle,
getMachineSessionStateReport,
getMachineSessionStateReportExport,
getMachineSessionWorkflowStatus,
};
window.getMachineSessionControlView = getMachineSessionControlView;
window.getMachineSessionStateBundle = getMachineSessionStateBundle;
window.getMachineSessionStateReport = getMachineSessionStateReport;
window.getMachineSessionStateReportExport = getMachineSessionStateReportExport;