({ instanceId, initialTab, token } = {})
| 1009 | } |
| 1010 | |
| 1011 | export function renderHtml({ instanceId, initialTab, token } = {}) { |
| 1012 | // Escape `<` so a stray "</script>" in any field can't break out of the inline |
| 1013 | // <script> tag below. (instanceId is runtime-validated, but stay robust anyway.) |
| 1014 | const boot = JSON.stringify({ instanceId: instanceId || "", initialTab: initialTab || "overview", token: token || "" }).replace(/</g, "\\u003c"); |
| 1015 | return ( |
| 1016 | "<!doctype html><html><head><meta charset=\"utf-8\" />" + |
| 1017 | "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />" + |
| 1018 | "<title>Java Modernization Studio</title><style>" + CSS + "</style></head><body>" + |
| 1019 | '<header class="top"><div class="title-row">' + |
| 1020 | "<h1>Java Modernization Studio</h1><span id=\"status\"></span><span class=\"spacer\"></span>" + |
| 1021 | '<span id="repo" class="repo muted"></span>' + |
| 1022 | '<button class="btn" data-kind="refresh" data-payload="{}">↻ Refresh</button>' + |
| 1023 | "</div>" + |
| 1024 | '<div id="chips" class="chips"></div>' + |
| 1025 | '<nav class="tabs">' + |
| 1026 | '<button data-tab="overview">Overview</button>' + |
| 1027 | '<button data-tab="readiness">Readiness <span class="count"></span></button>' + |
| 1028 | '<button data-tab="assessment">Assessment <span class="count"></span></button>' + |
| 1029 | '<button data-tab="plan">Plan & Progress <span class="count"></span></button>' + |
| 1030 | '<button data-tab="validation">Validation</button>' + |
| 1031 | '<button data-tab="tasks">Tasks & Skills <span class="count"></span></button>' + |
| 1032 | '<button data-tab="summary">Summary</button>' + |
| 1033 | "</nav></header>" + |
| 1034 | '<main id="app"></main><div id="toast" class="toast"></div>' + |
| 1035 | "<script>window.__APPMOD__=" + boot + ";(" + clientMain.toString() + ")();</script>" + |
| 1036 | "</body></html>" |
| 1037 | ); |
| 1038 | } |
no outgoing calls