mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-14 06:17:23 +00:00
Admin phone list: say On/Off once, setup state in the badge
This commit is contained in:
1 parent
6cbd6091d4
commit
897b244d8d
2 files changed
+4
-8
No files matched your search
@@ -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"]'),
|
||||
|
||||
@@ -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'
|
||||
}`,
|
||||
|
||||
Reference in new issue
Block a user