From f0ac847d9e9583aa2a217ee54efca5b7427dcf18 Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Wed, 29 Apr 2026 02:51:44 +0200 Subject: [PATCH] =?UTF-8?q?refactor(web):=20RegistrationPanel=20sibling=20?= =?UTF-8?q?parity=20=E2=80=94=20Edit/Reinstate=20redesign=20+=20Redemption?= =?UTF-8?q?s=20header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RegistrationPanel.tsx | 158 +++++++++++------- 1 file changed, 96 insertions(+), 62 deletions(-) diff --git a/packages/web/src/components/modals/instanceSettingsPanels/RegistrationPanel.tsx b/packages/web/src/components/modals/instanceSettingsPanels/RegistrationPanel.tsx index 9b5358e0..83303aed 100644 --- a/packages/web/src/components/modals/instanceSettingsPanels/RegistrationPanel.tsx +++ b/packages/web/src/components/modals/instanceSettingsPanels/RegistrationPanel.tsx @@ -294,7 +294,6 @@ interface ExpirySelectorProps { function ExpirySelector({ value, customDateTime, onChange, showKeep, disabled }: ExpirySelectorProps) { return (
-
{showKeep && ( @@ -907,6 +922,10 @@ function ReinstateInviteModal({ invite, onClose, onReinstated }: ReinstateInvite } }; + const subtitle = isRevoked + ? 'This invite was revoked. Reinstating generates a new link with a different URL — the old URL stays inactive.' + : 'This invite has lapsed. Reinstating reactivates the same URL — anyone who saved it will be able to use it again.'; + return createPortal(
e.stopPropagation()} > + {/* Header */} +
+
+ + + + +
+
+

Reinstate "{invite.name}"

+

{subtitle}

+
+
+ { e.preventDefault(); handleReinstate(); }} - className="p-6 space-y-5" + className="px-5 pt-4 pb-5 space-y-5" > -

Reinstate "{invite.name}"

- - {isRevoked ? ( -

- This will generate a new link.{' '} - The previously revoked URL stays inactive — anyone who had the old link will - not be able to use it. -

- ) : ( -

- The same link will start working again.{' '} - Anyone who saved the URL will be able to use it. -

+ {/* Amber callout — only for revoked variant to reinforce the "new URL" consequence */} + {isRevoked && ( +
+ A new link will be generated. Anyone who had the old URL will not be able to use it. +
)} {/* Max uses */}
- +
+ Max uses (current: {invite.maxUses ?? '∞'}, used: {invite.usedCount}) +