推进 INI 面板 shell handoff snapshot API

This commit is contained in:
2026-06-15 09:42:43 +08:00
parent 01817f6493
commit 5c951ab9bc
11 changed files with 1272 additions and 10 deletions

View File

@@ -46,6 +46,27 @@
display: grid;
gap: 8px;
}
.handoff-status {
border-top: 1px solid var(--border);
padding-top: 12px;
display: grid;
gap: 8px;
}
.handoff-status dl {
margin: 0;
display: grid;
grid-template-columns: minmax(120px, 180px) 1fr;
gap: 6px 12px;
font: 13px/1.4 "Segoe UI", "Noto Sans", sans-serif;
}
.handoff-status dt {
color: var(--muted);
}
.handoff-status dd {
margin: 0;
color: var(--text);
overflow-wrap: anywhere;
}
a {
color: var(--accent);
text-decoration: none;
@@ -70,6 +91,10 @@
<a data-entry-id="edit-run" href="./index.html">Open edit and run panel</a>
<a data-entry-id="control-view" href="./control-page.html">Open read-only control view</a>
</div>
<section class="handoff-status" aria-label="Shell handoff compatibility">
<p data-handoff-status>Checking shell handoff compatibility.</p>
<dl data-handoff-rows></dl>
</section>
</section>
</main>
<script type="module">
@@ -89,6 +114,18 @@
link.textContent = linkModel.label;
link.href = linkModel.href;
}
const handoffDisplay = shellViewModel.shellSessionHandoffDisplayViewModel;
document.querySelector("[data-handoff-status]").textContent = `${handoffDisplay.statusText}: ${handoffDisplay.detailText}`;
const handoffRows = document.querySelector("[data-handoff-rows]");
for (const row of handoffDisplay.rows) {
const term = document.createElement("dt");
term.dataset.handoffRow = row.id;
term.textContent = row.label;
const detail = document.createElement("dd");
detail.dataset.handoffValue = row.id;
detail.textContent = row.value;
handoffRows.append(term, detail);
}
window.linuxCncIniPanelLaunchApi = {
isSupportedLaunchApiManifest: isSupportedIniPanelLaunchApiManifest,
@@ -97,7 +134,12 @@
getShellIntegrationSchema: () => shellViewModel.shellIntegrationSchema,
getShellIntegrationManifest: () => shellViewModel.shellIntegrationManifest,
getShellIntegrationReadiness: () => shellViewModel.shellIntegrationReadiness,
getShellSessionHandoffSummarySchema: () => shellViewModel.shellSessionHandoffSummarySchema,
getShellSessionHandoffSummary: () => shellViewModel.shellSessionHandoffSummary,
isSupportedShellSessionHandoffSummary: shellViewModel.isSupportedShellSessionHandoffSummary,
getShellSessionHandoffCompatibilityReport: () => shellViewModel.shellSessionHandoffCompatibilityReport,
getShellSessionHandoffDisplayViewModel: () => shellViewModel.shellSessionHandoffDisplayViewModel,
getShellSessionHandoffSnapshot: () => shellViewModel.shellSessionHandoffSnapshot,
getLauncherLinks: () => shellViewModel.launcherLinks,
getControlPageApiMethods: () => shellViewModel.controlPage.browserApiMethods,
};