Admin phone list: say On/Off once, setup state in the badge

This commit is contained in:
arc53-machine committed 2026-09-28 22:00:23 +01:00
1 parent 6cbd6091d4
commit 897b244d8d
2 files changed
+4 -8

No files matched your search

+1 -3
View File
@@ -216,9 +216,7 @@ describe('Admin Connectors', () => {
),
);
expect(rows).toHaveLength(3);
expect(rows[0].textContent).toContain(
'Needs setup · 3 connections · No tools',
);
expect(rows[0].textContent).toContain('Off · 3 connections · No tools');
await act(async () => rows[1].click());
expect(
document.body.querySelector('[data-slot="sheet-content"]'),
+3 -5
View File
@@ -248,11 +248,9 @@ export default function Connectors() {
const summary = (connector: AdminConnector) =>
[
!connector.configured
? 'Needs setup'
: enabledOf(connector)
? 'On'
: 'Off',
// The badge beside it says whether setup is missing; this is what
// members get.
connector.configured && enabledOf(connector) ? 'On' : 'Off',
`${fmtNumber(connector.connection_count)} ${
connector.connection_count === 1 ? 'connection' : 'connections'
}`,