summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/group-settings.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/group-settings.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/group-settings.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/group-settings.js b/packages/meshbay-hub/src/meshbay_hub/static/group-settings.js
index 121c51b..529a33d 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/group-settings.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/group-settings.js
@@ -916,10 +916,14 @@ function GroupSettingsPanel({ groupId, group, token, transportRef, gekRef,
: null;
}, [transportRef]);
+ // A redeemed link is not shown: whoever used it is in the members list above,
+ // and what belongs here is what the owner can still cancel. The hub leaves
+ // them out already; the filter is for the desktop client, whose copy of this
+ // interface can be newer than the hub it is signed into.
const loadLinks = useCallback(() => {
if (!(group && group.is_admin)) return;
hubFetch(`/v1/groups/${groupId}/invite-links`, { token })
- .then(data => setLinks(data.links || []))
+ .then(data => setLinks((data.links || []).filter(l => l.status !== 'redeemed')))
.catch(() => {});
}, [groupId, token, group]);
@@ -1102,12 +1106,10 @@ function GroupSettingsPanel({ groupId, group, token, transportRef, gekRef,
flex-wrap:wrap;word-break:break-word;margin:4px 0">
<span>${l.email}</span>
<span style="color:var(--text-dim)">
- ${l.status === 'redeemed'
- ? t('members.link_status_redeemed', { user: l.redeemed_by || '' })
- : l.status === 'expired'
- ? t('members.link_status_expired')
- : t('members.link_expires',
- { date: new Date(l.expires_at).toLocaleDateString() })}
+ ${l.status === 'expired'
+ ? t('members.link_status_expired')
+ : t('members.link_expires',
+ { date: new Date(l.expires_at).toLocaleDateString() })}
</span>
${l.status === 'pending' && html`
<button class="admin-btn" type="button"