推进 INI 面板 shell handoff mount DOM renderer
This commit is contained in:
@@ -106,6 +106,7 @@
|
||||
createIniPanelLauncherLinkViewModel,
|
||||
createIniPanelShellViewModel,
|
||||
isSupportedIniPanelLaunchApiManifest,
|
||||
renderIniPanelShellSessionHandoffMountState,
|
||||
} from "./ui-shell.js";
|
||||
|
||||
const shellViewModel = createIniPanelShellViewModel();
|
||||
@@ -135,23 +136,7 @@
|
||||
handoffRows.append(term, detail);
|
||||
}
|
||||
const handoffMountRenderState = shellViewModel.shellSessionHandoffPackageMountRenderState;
|
||||
const handoffMount = document.querySelector("[data-handoff-mount]");
|
||||
handoffMount.dataset.handoffPhase = handoffMountRenderState.dataset.handoffPhase;
|
||||
handoffMount.dataset.handoffReady = handoffMountRenderState.dataset.handoffReady;
|
||||
handoffMount.dataset.handoffScope = handoffMountRenderState.dataset.handoffScope;
|
||||
document.querySelector("[data-handoff-mount-status]").textContent = handoffMountRenderState.statusLine;
|
||||
const handoffMountRows = document.querySelector("[data-handoff-mount-rows]");
|
||||
for (const row of handoffMountRenderState.rows) {
|
||||
const term = document.createElement("dt");
|
||||
term.dataset.handoffMountRow = row.id;
|
||||
term.dataset.handoffMountStatus = row.status;
|
||||
term.textContent = row.label;
|
||||
const detail = document.createElement("dd");
|
||||
detail.dataset.handoffMountValue = row.id;
|
||||
detail.dataset.handoffMountStatus = row.status;
|
||||
detail.textContent = row.value;
|
||||
handoffMountRows.append(term, detail);
|
||||
}
|
||||
renderIniPanelShellSessionHandoffMountState(handoffMountRenderState, { documentRef: document });
|
||||
|
||||
window.linuxCncIniPanelLaunchApi = {
|
||||
isSupportedLaunchApiManifest: isSupportedIniPanelLaunchApiManifest,
|
||||
@@ -195,6 +180,9 @@
|
||||
),
|
||||
)
|
||||
),
|
||||
renderShellSessionHandoffMountState: (renderState, options) => (
|
||||
renderIniPanelShellSessionHandoffMountState(renderState, options ?? { documentRef: document })
|
||||
),
|
||||
isSupportedShellSessionHandoffPackage: shellViewModel.isSupportedShellSessionHandoffPackage,
|
||||
getLauncherLinks: () => shellViewModel.launcherLinks,
|
||||
getControlPageApiMethods: () => shellViewModel.controlPage.browserApiMethods,
|
||||
|
||||
Reference in New Issue
Block a user