Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 3 additions & 20 deletions website/dither.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,6 @@
"windows-x86": null,
};
var ARCH_NAMES = { arm: "arm64", x86: "x86_64" };
var portalManifestStatus = "loading";
var portalManifestReason = "checking the signed release manifest";

function portalBuildFromManifest(manifest) {
if (!manifest || manifest.format !== 1 || manifest.product !== "portal-client" ||
Expand All @@ -393,7 +391,6 @@
if (build.available !== false || typeof build.reason !== "string" || !build.reason.trim()) {
throw new Error("invalid unavailable Portal release entry");
}
portalManifestReason = build.reason.trim();
return null;
}
var version = build.version;
Expand All @@ -410,7 +407,6 @@
return {
href: build.download_url,
label: "download Portal " + version + " · macOS arm64",
note: "Portal " + version + " · macOS arm64 · not notarized: macOS will block the first launch until you allow it in System Settings › Privacy & Security. Verify the SHA-256 before opening.",
};
}

Expand All @@ -419,39 +415,29 @@
return el ? el.value : null;
}

// The button label already carries the state. The hero does not repeat it as
// prose, so nothing writes release notes into the panel.
function updatePortalDownload() {
var button = document.getElementById("portal-download");
var note = document.getElementById("portal-release-status");
var os = pickedPortalValue("portal-os");
var arch = pickedPortalValue("portal-arch");
if (!button || !note || !os || !arch) return;
if (!button || !os || !arch) return;
var build = PORTAL_BUILDS[os + "-" + arch];
if (build) {
button.classList.remove("disabled");
button.removeAttribute("aria-disabled");
button.setAttribute("href", build.href);
button.textContent = build.label;
note.textContent = build.note;
} else {
button.classList.add("disabled");
button.setAttribute("aria-disabled", "true");
button.removeAttribute("href"); // href-less anchor: unfocusable, unclickable
button.textContent = "no " + os + " " + ARCH_NAMES[arch] + " build yet";
if (os === "macos" && arch === "arm" && portalManifestStatus !== "loaded") {
note.textContent = portalManifestReason + " · no download offered";
} else if (os === "macos" && arch === "arm" && portalManifestReason) {
note.textContent = portalManifestReason;
} else {
note.textContent = "portal for " + os + "/" + ARCH_NAMES[arch] +
" is not released yet · macos arm64 comes first";
}
}
}

function loadPortalReleaseManifest() {
if (typeof window.fetch !== "function") {
portalManifestStatus = "failed";
portalManifestReason = "signed release manifest could not be loaded";
updatePortalDownload();
return;
}
Expand All @@ -464,11 +450,8 @@
return response.json();
}).then(function (manifest) {
PORTAL_BUILDS["macos-arm"] = portalBuildFromManifest(manifest);
portalManifestStatus = "loaded";
}).catch(function () {
PORTAL_BUILDS["macos-arm"] = null;
portalManifestStatus = "failed";
portalManifestReason = "signed release manifest is unavailable or invalid";
}).then(updatePortalDownload);
}

Expand Down
4 changes: 2 additions & 2 deletions website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@
</div>
</div>
<a class="portal-download disabled" id="portal-download" aria-disabled="true">no macos arm64 build yet</a>
<p class="release-note"><span id="portal-release-status">portal for macos/arm64 is not released yet · macos arm64 comes first</span> · <a class="release-history" href="https://github.com/FelineStateMachine/goq/releases" rel="noopener">release history</a></p>
<p class="release-note"><a class="release-history" href="https://github.com/FelineStateMachine/goq/releases" rel="noopener">release history</a></p>
</div>
<div class="release-action" data-release-target="sigil" hidden>
<div class="install" data-copy="curl -fsSL https://goq.sh/install-sigil | bash">
<code class="install-cmd"><span class="install-prompt">$</span> <span class="install-text">curl -fsSL https://goq.sh/install-sigil | bash</span></code>
<button class="install-copy" type="button" aria-label="Copy Sigil install command">copy</button>
</div>
<p class="release-note">dedicated bazzite machine · signed release channel open</p>
<p class="release-note">dedicated bazzite machine</p>
</div>
</div>
<p class="hero-note">Games over QUIC: low-latency SteamOS streaming over iroh <br> Work in progress. Not a finished product.</p>
Expand Down
Loading