Skip to content

The open-source AI receptionist for businesses. Answers every call, books the appointment and hands over to a person when needed. You own the code and the data.

Server admin Overview: People back as its card (PR 1908)

Janikfd7133fbbb49
diff --git a/apps/web/src/admin/Overview.tsx b/apps/web/src/admin/Overview.tsx
index 98e0eab3..f2d60ed2 100644
--- a/apps/web/src/admin/Overview.tsx
+++ b/apps/web/src/admin/Overview.tsx
@@ -1,6 +1,6 @@
// Server admin › Overview: the first thing an operator sees, under the "Ready for calls" card (StatusCard.tsx, which
-// says whether the parts of the install work). Usage (calls, minutes) as tiles, then People, Costs and Funnel as one
-// line each with its number on the badge, like the lines on Features; Show opens the details in place.
+// says whether the parts of the install work). Usage (calls, minutes) as tiles, People as a short card, then Costs and
+// Funnel as one line each with its number on the badge, like the lines on Features; Show opens the details in place.
import { providerCategoryLabel } from '@linedesk/actions'
import { T, useT } from '@linedesk/i18n/react'
import type { ReactNode } from 'react'
@@ -125,7 +125,7 @@ const bold = (chunks: ReactNode[]) => <b>{chunks}</b>
export function Overview({ onOpen }: Props) {
const t = useT()
- const line = useOpenLines<'people' | 'costs' | 'funnel'>()
+ const line = useOpenLines<'costs' | 'funnel'>()
const overview = useLoad('admin.overview', loadOverview)
// The numbers wait behind the loading gate (no flash, no blink); the labels and card titles show at once.
const view = useLoading(!overview.value)
@@ -181,22 +181,14 @@ export function Overview({ onOpen }: Props) {
)}
</div>
<ShopifySetups />
- <FeatureLine
- title={t('admin.overview.people.title')}
- summary={t('admin.overview.people.summary')}
- state={
- o
- ? {
- text: t('admin.overview.people.state', { workspaces: o.workspaces.total, users: o.users.total }),
- on: false,
- }
- : null
- }
- view
- {...line('people')}
- >
- {o && <People o={o} onOpen={onOpen} />}
- </FeatureLine>
+ {o && (
+ <section className="adm-card" aria-label={t('admin.overview.people.title')}>
+ <div className="adm-card-head">
+ <h2>{t('admin.overview.people.title')}</h2>
+ </div>
+ <People o={o} onOpen={onOpen} />
+ </section>
+ )}
<FeatureLine
title={t('admin.overview.costs.title')}
summary={t('admin.overview.costs.note')}
diff --git a/packages/i18n/locales/en/admin.json b/packages/i18n/locales/en/admin.json
index 1e913c70..ac971ef1 100644
--- a/packages/i18n/locales/en/admin.json
+++ b/packages/i18n/locales/en/admin.json
@@ -1125,8 +1125,6 @@
"overview.lessThan": "< {amount}",
"overview.people.disabled": "· {count, number} disabled",
"overview.people.newThisWeek": "· {count, number} new this week",
- "overview.people.state": "{workspaces, plural, one {# workspace} other {# workspaces}} · {users, plural, one {# user} other {# users}}",
- "overview.people.summary": "Workspaces and users on this server.",
"overview.people.title": "People",
"overview.people.users": "{count, plural, one {<b>#</b> user} other {<b>#</b> users}}",
"overview.people.workspaces": "{count, plural, one {<b>#</b> workspace} other {<b>#</b> workspaces}}",