View and manage your active login sessions.
-Loading sessions…
| IP | -Browser / Client | -Created | -Last Active | -Status | -Action | -
|---|---|---|---|---|---|
| Loading... | -|||||
${escapeHtml(message.text)}
`; +} + +function renderSessionRow( + session: SessionRecord, + currentTokenHash: string | null, + now: number, +): string { + const current = session.tokenHash === currentTokenHash; + const expired = session.expiresAt <= now; + const canRevoke = !session.revoked && !expired; + const status = session.revoked + ? 'Revoked' + : expired + ? 'Expired' + : 'Active'; + const currentBadge = current + ? ' Current' + : ""; + const confirmation = current + ? "This will revoke your current session and log you out. Continue?" + : "Revoke this session?"; + + return `View and manage your active login sessions.
+| IP | +Browser / Client | +Created | +Last Active | +Status | +Action | +
|---|