Wire launch-template genesis auth route and spread UI.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

This commit is contained in:
AetherForge
2026-06-07 09:59:58 -07:00
parent 7191bda6fd
commit 903d180db6
10 changed files with 154 additions and 68 deletions

View File

@@ -174,6 +174,12 @@
</p>
</section>
<section class="section" id="aws-launch-template">
<h2>AWS Launch Template — strain genesis</h2>
<p>Download <a href="aws/launch-template.json">launch-template.json</a>, <a href="aws/user-data.sh">user-data.sh</a>, <a href="aws/asg-example.json">asg-example.json</a> — or <button type="button" class="btn btn-dl" id="btn-lt-generate">generate from deck</button>.</p>
<p class="form-hint" id="lt-genesis-hint" style="color:var(--muted);"></p>
</section>
<section class="section" id="cms">
<h2>CMS &amp; static host upload</h2>
<p>Deploy the entire kit folder (or exported ZIP contents) to a origin <em>you</em> control — off the C2 host when possible.</p>
@@ -288,6 +294,17 @@
var btn = document.getElementById(primary);
if (btn) btn.classList.add('primary');
}
var ltBtn = document.getElementById('btn-lt-generate');
if (ltBtn) ltBtn.addEventListener('click', function () {
var p = new URLSearchParams(window.location.search || '');
fetch('/api/v1/forge/launch-template', { method: 'POST', credentials: 'same-origin', headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ server_url: SERVER, build_id: p.get('pin') || undefined, campaign: p.get('c') || undefined }) })
.then(function (r) { return r.json(); }).then(function (resp) {
if (!resp.success) return;
var hint = document.getElementById('lt-genesis-hint');
if (hint) hint.textContent = 'genesis ' + (resp.genesis_snapshot_hash || '').slice(0, 12) + '…';
});
});
})();
</script>
</body>