Add Discord header link and public invite redirect

This commit is contained in:
ragnarok-clanker 2026-10-27 11:15:32 +01:00
commit 077e858722
3 changed files with 7 additions and 0 deletions

View file

@ -3,6 +3,8 @@
Coordinator, sandboxed verifier and agent client for a collaborative, LLM-assisted Coordinator, sandboxed verifier and agent client for a collaborative, LLM-assisted
**matching decompilation** of an MSVC 2010 C++ executable. Node.js ≥ 22.13, no npm dependencies. **matching decompilation** of an MSVC 2010 C++ executable. Node.js ≥ 22.13, no npm dependencies.
Join the community at [clank.rodecomp.online/discord](https://clank.rodecomp.online/discord), which redirects to the Discord invite.
``` ```
contributors + their agents coordinator (clank.rodecomp.online) contributors + their agents coordinator (clank.rodecomp.online)
┌──────────────────────────┐ HTTPS ┌──────────────────────────────────────────┐ ┌──────────────────────────┐ HTTPS ┌──────────────────────────────────────────┐

View file

@ -1209,6 +1209,10 @@ export function createApp(ctx) {
const handler = async (req, res) => { const handler = async (req, res) => {
const url = new URL(req.url, 'http://localhost'); const url = new URL(req.url, 'http://localhost');
try { try {
if ((req.method === 'GET' || req.method === 'HEAD') && url.pathname === '/discord') {
res.writeHead(302, { location: 'https://discord.gg/5fDwn7tVNj', 'cache-control': 'no-store' });
return res.end();
}
if (url.pathname.startsWith('/repo.git/')) { if (url.pathname.startsWith('/repo.git/')) {
return serveGit(req, res, { projectRoot: config.dataDir, subPath: '/repo' + url.pathname.slice('/repo.git'.length), query: url.searchParams }); return serveGit(req, res, { projectRoot: config.dataDir, subPath: '/repo' + url.pathname.slice('/repo.git'.length), query: url.searchParams });
} }

View file

@ -35,6 +35,7 @@
<a href="#/admin" data-route="admin" data-role="admin" hidden>Admin</a> <a href="#/admin" data-route="admin" data-role="admin" hidden>Admin</a>
<a href="#/account" data-route="account" data-role="contributor" id="account-link" hidden>Account<span class="nav-dot" id="account-dot" hidden></span></a> <a href="#/account" data-route="account" data-role="contributor" id="account-link" hidden>Account<span class="nav-dot" id="account-dot" hidden></span></a>
<a id="source-link" href="/git/">Source</a> <a id="source-link" href="/git/">Source</a>
<a href="https://discord.gg/5fDwn7tVNj" target="_blank" rel="noopener noreferrer">Discord</a>
</nav> </nav>
<div class="userbox"> <div class="userbox">
<a href="#/arcade" id="credits-badge" class="credits-badge" hidden title="Your game credits"><span class="coin" aria-hidden="true"></span><span id="credits-n">0</span></a> <a href="#/arcade" id="credits-badge" class="credits-badge" hidden title="Your game credits"><span class="coin" aria-hidden="true"></span><span id="credits-n">0</span></a>