| 1/1 | A dead invite link says so, without the form | +7 | -1 | ✓ |
No comments yet: forge comment 19 adds one.
1/1 A dead invite link says so, without the form
An invite link that had expired, been used or been taken back still showed "You are invited as you", the key box and a greyed join button above the refusal. Now the page keeps its heading and the refusal only.
| M | site/ | 2 | ++ |
| M | site/ | 6 | +++++- |
@@ -38,10 +38,12 @@
3838 </div>3939 <div id="invite-part" hidden>4040 <h1>Join {{ host }}</h1>41+<div id="invite-form">4142 <p>You are invited as <b id="invite-user">you</b><span id="invite-grant"></span>. Your SSH key is how you get in: paste the public half, the one line of a <code>.pub</code> file such as <code>~/.ssh/id_ed25519.pub</code>. None yet? <code>ssh-keygen -t ed25519</code> makes one.</p>4243 <p>{{ ui.textarea('ssh public key', 'ssh-ed25519 AAAA... you@laptop', 'id="invite-key" rows="3" spellcheck="false" autocomplete="off" autocapitalize="off" maxlength="8192"', true) }}</p>4344 <p>{{ ui.button('join', true, 'id="invite-join"') }}</p>4445 </div>46+</div>4547 <div id="enroll-part" hidden>4648 <h1>Add a passkey</h1>4749 <p id="joined" hidden>You are <b id="joined-user">in</b> on {{ host }}: <code>ssh {{ forge.config.ssh }} help</code> says what you can do over ssh. A passkey signs you in on the web as well, to see the pages of private repos you may read. Your browser, phone or password manager keeps it. Not now? <code>ssh {{ forge.config.ssh }} passkey</code> prints a link for one later.</p>@@ -128,7 +128,11 @@ interface WebAuthn {
128128 if (o.repo) document.getElementById('invite-grant')!.textContent = `, a ${String(o.role)} of ${String(o.repo)}`;129129 join.disabled = false;130130 key.focus();131- }, (e: Error) => say(e.message, true));131+ }, (e: Error) => {132+ // A dead link: nothing to fill in.133+ document.getElementById('invite-form')!.hidden = true;134+ say(e.message, true);135+ });132136 join.addEventListener('click', async () => {133137 join.disabled = true;134138 say('Adding your key…');