account cell: username on top (prominent), email + matrix handle beneath in muted style; admins section matches; dedupe org block

This commit is contained in:
Inferencebot committed 2026-10-20 23:34:52 -06:00
1 parent 0a66498ed2
commit 476394b946
1 file changed
+12 -6
+12 -6
View File
@@ -523,15 +523,20 @@ function renderMembers() {
const src = m.manual
? '<span class="pill manual" title="Manual member (no OC subscription; exempt from sweep)">manual</span>'
: '<span class="pill active" title="Open Collective Membership subscription">OC</span>';
// Effective Matrix handle: dashboard-set external MXID, else the local
// @username:inference.coop identity (pending users have no username yet).
// Account cell: username on top (prominent); email + Matrix handle beneath
// in the muted secondary style. Users who never finished setup have no
// username — fall back to the email in the top position.
const top = m.username || m.email;
const mxid = m.matrix_mxid || (m.username ? '@' + m.username + ':inference.coop' : '');
const mxidLine = mxid ? '<div style="color:var(--muted);font-size:11px">' + esc(mxid) + '</div>' : '';
const emailLine = m.username ? '<div style="color:var(--muted);font-size:11px">' + esc(m.email) + '</div>' : '';
const org = m.org
? ' <span class="pill org" title="Organizational membership: dues paid by OC organization">org: ' + esc(m.org) + '</span>'
: '';
// Effective Matrix handle: dashboard-set external MXID, else the local
// @username:inference.coop identity (pending users have no username yet).
const mxid = m.matrix_mxid || (m.username ? '@' + m.username + ':inference.coop' : '');
const mxidLine = mxid ? '<div style="color:var(--muted);font-size:11px">' + esc(mxid) + '</div>' : '';
return '<tr>' +
'<td>' + esc(m.email) + (m.username ? '<div style="color:var(--muted);font-size:11px">' + esc(m.username) + '</div>' : '') + mxidLine +
'<td><strong>' + esc(top) + '</strong>' + emailLine + mxidLine +
(org ? '<div style="margin-top:3px">' + org + '</div>' : '') + '</td>' +
'<td><span class="pill ' + pill + '">' + pill + '</span></td>' +
'<td>' + act + '</td>' +
@@ -556,8 +561,9 @@ function renderMembers() {
adminSection.style.display = '';
$('admin-rows').innerHTML = adminsData.map(m => {
const reset = m.reset_at ? m.reset_at.slice(0,10) : '—';
const adminTop = m.username || m.email;
return '<tr>' +
'<td>' + esc(m.email) + (m.username ? '<div style="color:var(--muted);font-size:11px">' + esc(m.username) + '</div>' : '') + '</td>' +
'<td><strong>' + esc(adminTop) + '</strong>' + (m.username ? '<div style="color:var(--muted);font-size:11px">' + esc(m.email) + '</div>' : '') + '</td>' +
'<td><span class="pill manual" title="Operator account (SSO owner / bot), not a member">admin</span></td>' +
'<td>' + (m.activated ? '<span class="pill active">yes</span>' : '<span class="pill inactive">pending</span>') + '</td>' +
'<td class="num">' + fmt(memberSpend(m)) + '</td>' +