推进 INI 面板 launch 暴露 control-page API 清单
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user