fix: hide SOLARGOD portal link off-localhost — it targets a dev server

The deep-link keeps working in local dev; on partly.party it would be a
dead localhost button until SOLARGOD has a public home.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
type-two 2026-07-29 14:35:32 +10:00
parent f55d3202e0
commit a435997a3d

View File

@ -121,6 +121,11 @@ export function setLiveChip(isLive) {
export function wireSolargodLink(getMs) {
const a = document.getElementById('solargod-link');
if (!a) return;
// SOLARGOD is a localhost dev server for now — showing that link on the live
// site would be a dead button. Hide it unless GODSIGH itself is on localhost;
// when SOLARGOD gets a public home, point this at it and drop the guard.
const local = /^(127\.0\.0\.1|localhost)$/.test(location.hostname);
if (!local) { a.style.display = 'none'; return; }
const sync = () => { a.href = `http://127.0.0.1:8147/#t=@${getMs()}`; };
a.addEventListener('pointerdown', sync);
a.addEventListener('click', sync);