推进 INI 面板 launch 暴露 control-page API 清单

This commit is contained in:
2026-06-15 06:20:12 +08:00
parent efc4bcf64f
commit 6ba8e43850
9 changed files with 137 additions and 16 deletions

View File

@@ -73,9 +73,13 @@
</section>
</main>
<script type="module">
import { createIniPanelLauncherLinkViewModel } from "./ui-shell.js";
import {
createIniPanelLauncherLinkViewModel,
createIniPanelShellViewModel,
} from "./ui-shell.js";
const links = createIniPanelLauncherLinkViewModel();
const shellViewModel = createIniPanelShellViewModel();
const links = shellViewModel.launcherLinks;
for (const linkModel of links) {
const link = document.querySelector(`a[data-entry-id="${linkModel.entryId}"]`);
if (!link) {
@@ -84,6 +88,11 @@
link.textContent = linkModel.label;
link.href = linkModel.href;
}
window.linuxCncIniPanelLaunchApi = {
getLauncherLinks: () => shellViewModel.launcherLinks,
getControlPageApiMethods: () => shellViewModel.controlPage.browserApiMethods,
};
</script>
</body>
</html>