推进 INI 面板 entry manifest
This commit is contained in:
@@ -67,10 +67,23 @@
|
||||
<h1>LinuxCNC INI Panel</h1>
|
||||
<p>Choose the editable panel or the read-only control view.</p>
|
||||
<div class="links">
|
||||
<a href="./index.html">Open edit and run panel</a>
|
||||
<a href="./control-page.html">Open read-only control view</a>
|
||||
<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>
|
||||
</main>
|
||||
<script type="module">
|
||||
import { getIniPanelEntryManifest } from "./entry-manifest.js";
|
||||
|
||||
const manifest = getIniPanelEntryManifest();
|
||||
for (const entry of manifest) {
|
||||
const link = document.querySelector(`a[data-entry-id="${entry.id}"]`);
|
||||
if (!link) {
|
||||
throw new Error(`Missing launcher entry ${entry.id}`);
|
||||
}
|
||||
link.textContent = entry.title;
|
||||
link.href = entry.href;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user