forked from yvv/decision
v3 : relecture de decbc0b — lien annulé retiré de la page, liens annulés avant les sessions, pluriel espagnol
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -77,11 +77,14 @@
|
||||
});
|
||||
}
|
||||
|
||||
// A lost device, a person who left: their sessions close (never the one in use here).
|
||||
// A lost device, a person who left: their sessions close (never the one in use here),
|
||||
// and so does a sign-in link still waiting for them, even one shown just now.
|
||||
async function closeSessions(id: string) {
|
||||
await act(async () => {
|
||||
const r = await api.del<{ closed: number }>(`/access/identities/${encodeURIComponent(id)}/sessions`);
|
||||
toasts.show(i18n.plural('access.sessions.closed', r.closed));
|
||||
const r = await api.del<{ closed: number; links: number }>(`/access/identities/${encodeURIComponent(id)}/sessions`);
|
||||
if (relinked?.id === id) relinked = null;
|
||||
const links = r.links > 0 ? ` ${i18n.plural('access.sessions.links', r.links)}` : '';
|
||||
toasts.show(i18n.plural('access.sessions.closed', r.closed) + links);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user