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.

Settings overview: three entries, the assistant, the workspace and you (PR 1915)

Janik8f9ef024954a
diff --git a/apps/web/src/settings/AssistantSettings.tsx b/apps/web/src/settings/AssistantSettings.tsx
index cf23e78e..9ca42039 100644
--- a/apps/web/src/settings/AssistantSettings.tsx
+++ b/apps/web/src/settings/AssistantSettings.tsx
@@ -172,21 +172,6 @@ function useNeedsCalendar(canEdit: boolean): boolean {
return canEdit && loaded && needsCalendar(connections)
}
-/**
- * One assistant's sections with their marks, for those not on its page (Settings, SettingsHome): the open questions on
- * Business info, the calendar to-do on Booking & calendar. The page itself marks them from its draft (Form).
- */
-export function useAssistantSections(assistant: Assistant, canEdit: boolean): readonly PageSection<SectionId>[] {
- const t = useT()
- const openItems = openGroupCount(useRows('knowledge_questions'), assistant.id)
- const name = assistant.name.trim() || t('settings.assistant.name.fallback')
- const bookingTodo = useNeedsCalendar(canEdit) ? t('settings.assistant.section.booking.needsCalendar', { name }) : null
- return useMemo(
- () => sectionsFor(sectionsIn(t), canEdit, openItems, bookingTodo),
- [t, canEdit, openItems, bookingTodo],
- )
-}
-
/**
* Which pipelines this workspace may use (voice.options: those set up, narrowed to the instance admin's pick); null
* while not known, and from an API of an older version (during an update), which only says whether a realtime model
diff --git a/apps/web/src/settings/SettingsHome.tsx b/apps/web/src/settings/SettingsHome.tsx
index a02249ac..a98bb886 100644
--- a/apps/web/src/settings/SettingsHome.tsx
+++ b/apps/web/src/settings/SettingsHome.tsx
@@ -1,67 +1,55 @@
-// Settings (#settings, G S): the one place every setting starts from. Three areas: the assistant (what callers hear)
-// first, with its sections as tiles and a switcher when the workspace has more
-// than one; Workspace settings (everyone in the workspace) and User settings (only you) below: a general icon, one
-// sentence on what is in there and whom it is for, and the sections as short rows. Leaving or deleting the workspace
-// is a quiet link under its rows, not a row like the others.
-// Every tile and row opens that section directly (#assistant/<id>/<section>, #workspace/<section>, #account/<section>).
+// Settings (#settings, G S): the one place every setting starts from. One list of three entries: the assistant
+// (what callers hear; one entry per assistant when the workspace has several), the workspace (everyone in it) and
+// you (only you). Each entry is one line on what is in there and opens its first page; the sub-pages are in that
+// area's own navigation (Assistant › General, Workspace settings › General, User settings › Profile).
// Server admin stays its own entry in the navigation.
import type { Assistant, PhoneNumber } from '@linedesk/db/types'
import { useT } from '@linedesk/i18n/react'
-import { type ReactNode, useState } from 'react'
+import type { ReactNode } from 'react'
+import { auth } from '../auth.ts'
import { notAnsweringWhy } from '../inbox/goLive.ts'
import { formatNumber } from '../onboarding/flow.ts'
import { usePresence } from '../shell/presence.ts'
import { pages } from '../shell/pages.tsx'
+import { WorkspaceMark, workspaceIconOf } from '../shell/WorkspaceMark.tsx'
+import { useWorkspaces } from '../shell/WorkspaceSwitcher.tsx'
import { useAssistants, useRows } from '../store.tsx'
-import type { IconName } from '../ui/icons.ts'
-import { cx, Icon, Kbd } from '../ui/kit.tsx'
-import { type PageSection, sectionHash } from '../ui/SettingsLayout.tsx'
+import { tabWorkspace } from '../tabWorkspace.ts'
+import { memberAvatar, useMember } from '../team/members.ts'
+import { Card } from '../ui/form.tsx'
+import { Avatar, Icon } from '../ui/kit.tsx'
+import { Loading, Skeleton, useLoadState } from '../ui/LoadStates.tsx'
+import { sectionHash } from '../ui/SettingsLayout.tsx'
import { StatusMark } from '../ui/StatusMark.tsx'
-import { useAccountSections } from './account/index.tsx'
-import { useAssistantSections } from './AssistantSettings.tsx'
-import { useWorkspaceSections } from './WorkspaceSettings.tsx'
import './settings-home.css'
-const ASSISTANT_ICONS: Record<string, IconName> = {
- general: 'mic',
- business: 'book',
- hours: 'clock',
- rules: 'flag',
- transfers: 'phone-out',
- emails: 'mail',
- booking: 'calendar',
- advanced: 'gear',
-}
-const WORKSPACE_ICONS: Record<string, IconName> = {
- general: 'globe',
- team: 'users',
- phone: 'phone',
- billing: 'money',
- danger: 'trash',
-}
-const ACCOUNT_ICONS: Record<string, IconName> = {
- profile: 'user',
- security: 'shield',
- sessions: 'globe',
- apiKeys: 'keyboard',
-}
+/** The global keys that open the (first) assistant; shown in its entry's tooltip, never as chips (rule 4). */
+const ASSISTANT_KEYS = ['G', 'A']
type Props = {
- canEdit: boolean
billing: boolean
workspaceName: string
isInstanceAdmin: boolean
}
-export function SettingsHome({ canEdit, billing, workspaceName, isInstanceAdmin }: Props) {
+export function SettingsHome({ billing, workspaceName, isInstanceAdmin }: Props) {
+ const t = useT()
+ const assistants = useAssistants()
+ const loadState = useLoadState('assistants')
return (
- <div className="page sh-page">
- <div className="sh-wrap">
- <AssistantArea canEdit={canEdit} isInstanceAdmin={isInstanceAdmin} />
- <div className="sh-pair">
- <WorkspaceArea canEdit={canEdit} billing={billing} workspaceName={workspaceName} />
- <AccountArea />
- </div>
+ <div className="page">
+ <div className="page-in sh-page">
+ <Card className="sh-list">
+ <Loading
+ what={t('settings.assistant.load')}
+ loading={!assistants.length && loadState !== 'ready'}
+ skeleton={<EntrySkeleton />}
+ >
+ <AssistantEntries assistants={assistants} isInstanceAdmin={isInstanceAdmin} />
+ </Loading>
+ <WorkspaceEntry name={workspaceName} billing={billing} />
+ <YouEntry />
+ </Card>
</div>
</div>
)
@@ -71,278 +59,152 @@ export function SettingsHome({ canEdit, billing, workspaceName, isInstanceAdmin
const numbersOf = (assistant: Assistant, isDefault: boolean, numbers: PhoneNumber[]) =>
numbers.filter(n => n.assistant_id === assistant.id || (!n.assistant_id && isDefault))
-function AssistantArea({ canEdit, isInstanceAdmin }: { canEdit: boolean; isInstanceAdmin: boolean }) {
+function AssistantEntries({ assistants, isInstanceAdmin }: { assistants: Assistant[]; isInstanceAdmin: boolean }) {
const t = useT()
- const assistants = useAssistants()
const numbers = useRows('phone_numbers').sort((a, b) => a.created_at.localeCompare(b.created_at))
- const [picked, setPicked] = useState<string | null>(null)
- const assistant = assistants.find(a => a.id === picked) ?? assistants[0]
- return (
- <section className="sh-card sh-assistant" aria-labelledby="sh-assistant-title">
- {assistants.length > 1 && (
- <div className="sh-switch" role="tablist" aria-label={t('settings.home.assistant.switch')}>
- {assistants.map((a, i) => (
- <button
- key={a.id}
- type="button"
- role="tab"
- aria-selected={a.id === assistant?.id}
- className="sh-switch-item"
- onClick={() => setPicked(a.id)}
- >
- <span className="sh-mark sh-mark-sm" aria-hidden="true">
- <Icon name="waveform" size={14} />
- </span>
- <span className="sh-switch-text">
- <b>{a.name}</b>
- <span>
- {numbersOf(a, i === 0, numbers).map(n => formatNumber(n.e164))[0] ??
- t('settings.home.assistant.noNumber')}
- </span>
- </span>
- </button>
- ))}
- </div>
- )}
- {assistant ? (
- <AssistantBody
- key={assistant.id}
- assistant={assistant}
- numbers={numbersOf(assistant, assistant.id === assistants[0]?.id, numbers)}
- canEdit={canEdit}
- isInstanceAdmin={isInstanceAdmin}
- />
- ) : (
- <AreaHead
- id="sh-assistant-title"
- mark={
- <span className="sh-mark sh-mark-lg" aria-hidden="true">
- <Icon name="waveform" size={22} />
- </span>
- }
- title={pages.assistant.title}
- line={t('settings.home.assistant.lineNone')}
- href="#assistant"
- keys={['G', 'A']}
- />
- )}
- </section>
- )
-}
-
-function AssistantBody({
- assistant,
- numbers,
- canEdit,
- isInstanceAdmin,
-}: {
- assistant: Assistant
- numbers: PhoneNumber[]
- canEdit: boolean
- isInstanceAdmin: boolean
-}) {
- const t = useT()
- const sections = useAssistantSections(assistant, canEdit)
- const name = assistant.name.trim() || t('settings.assistant.name.fallback')
- return (
- <>
- <AreaHead
- id="sh-assistant-title"
- big
- mark={
- <span className="sh-mark sh-mark-lg" aria-hidden="true">
- <Icon name="waveform" size={22} />
- </span>
- }
+ if (!assistants.length)
+ return (
+ <Entry
+ href="#assistant"
+ mark={<AssistantMark />}
+ title={pages.assistant.title}
+ line={t('settings.home.assistant.lineNone')}
+ tip={`${pages.assistant.title} (${ASSISTANT_KEYS.join(' ')})`}
+ />
+ )
+ return assistants.map((a, i) => {
+ const name = a.name.trim() || t('settings.assistant.name.fallback')
+ const own = numbersOf(a, i === 0, numbers)
+ return (
+ <Entry
+ key={a.id}
+ href={`#assistant/${a.id}/general`}
+ mark={<AssistantMark />}
title={name}
- extra={<AnswerState assistant={name} numbers={numbers} isInstanceAdmin={isInstanceAdmin} />}
+ meta={own[0] ? formatNumber(own[0].e164) : undefined}
line={t('settings.home.assistant.line', { name })}
- href={`#assistant/${assistant.id}/general`}
- keys={['G', 'A']}
+ status={<AnswerState assistant={name} hasNumber={own.length > 0} isInstanceAdmin={isInstanceAdmin} />}
+ tip={i === 0 ? `${name} (${ASSISTANT_KEYS.join(' ')})` : undefined}
/>
- <ul className="sh-tiles">
- {sections.map(s => (
- <li key={s.id}>
- <a className="sh-tile" href={`#assistant/${assistant.id}/${s.id}`}>
- <span className="sh-tile-head">
- <Icon name={ASSISTANT_ICONS[s.id] ?? 'gear'} size={15} />
- <b>{s.label}</b>
- {!!s.count && <span className="nav-n">{s.count}</span>}
- {s.mark}
- </span>
- {s.description && <span className="sh-tile-line">{s.description}</span>}
- </a>
- </li>
- ))}
- </ul>
- </>
- )
+ )
+ })
}
-/** The assistant's numbers (each opens its settings) and whether calls to them are answered; nothing while unknown. */
+/** Whether calls to the assistant are answered, as a quiet mark with its words; nothing while unknown. */
function AnswerState({
assistant,
- numbers,
+ hasNumber,
isInstanceAdmin,
}: {
assistant: string
- numbers: PhoneNumber[]
+ hasNumber: boolean
isInstanceAdmin: boolean
}) {
const t = useT()
const presence = usePresence()
const why = notAnsweringWhy(presence, assistant, isInstanceAdmin)
- const state = !numbers.length ? (
- <StatusMark state="missing" label={t('settings.home.assistant.noNumber')} />
- ) : presence.kind === 'answering' ? (
- <StatusMark state="works" label={t('settings.home.assistant.answering')} />
- ) : why ? (
- <StatusMark state={why.reason === 'failing' ? 'failing' : 'partly'} label={why.title} />
- ) : null
- const words = !numbers.length
- ? t('settings.home.assistant.noNumber')
+ const [state, words] = !hasNumber
+ ? (['missing', t('settings.home.assistant.noNumber')] as const)
: presence.kind === 'answering'
- ? t('settings.home.assistant.answering')
- : why?.title
+ ? (['works', t('settings.home.assistant.answering')] as const)
+ : why
+ ? ([why.reason === 'failing' ? 'failing' : 'partly', why.title] as const)
+ : [null, null]
+ if (!state) return null
return (
- <span className="sh-state">
- {numbers.map(n => (
- <a
- key={n.id}
- className="as-chip"
- href={`#workspace/phone/${n.id}`}
- title={t('settings.assistantHeader.numberTip')}
- >
- {formatNumber(n.e164)}
- </a>
- ))}
- {state && (
- <span className="sh-state-words">
- {state}
- {words}
- </span>
- )}
- </span>
+ <>
+ <StatusMark state={state} label={words} />
+ <span className="sh-entry-state">{words}</span>
+ </>
)
}
-function WorkspaceArea({
- canEdit,
- billing,
- workspaceName,
-}: {
- canEdit: boolean
- billing: boolean
- workspaceName: string
-}) {
+function WorkspaceEntry({ name, billing }: { name: string; billing: boolean }) {
const t = useT()
- const all = useWorkspaceSections(canEdit, billing)
- const sections = all.filter(s => s.id !== 'danger')
- const danger = all.find(s => s.id === 'danger')
+ const iconUrl = workspaceIconOf(useWorkspaces(), tabWorkspace() ?? '')
return (
- <section className="sh-card" aria-labelledby="sh-workspace-title">
- <AreaHead
- id="sh-workspace-title"
- mark={<AreaMark icon="building" />}
- title={pages.workspace.title}
- line={t(billing ? 'settings.home.workspace.line' : 'settings.home.workspace.lineNoBilling', {
- workspace: workspaceName,
- })}
- href="#workspace"
- />
- <SectionRows page="workspace" sections={sections} icons={WORKSPACE_ICONS} />
- {danger && (
- <a className="sh-danger" href={sectionHash('workspace', danger.id)}>
- {danger.description}
- </a>
- )}
- </section>
+ <Entry
+ href={sectionHash('workspace', 'general')}
+ mark={<WorkspaceMark name={name} iconUrl={iconUrl} size="lg" />}
+ title={name}
+ line={t(billing ? 'settings.home.workspace.line' : 'settings.home.workspace.lineNoBilling')}
+ />
)
}
-function AccountArea() {
+function YouEntry() {
const t = useT()
- const sections = useAccountSections(true)
+ const user = auth.useSession().data?.user
+ const me = useMember(user?.id ?? null)
+ const name = user?.name || user?.email || pages.account.title
return (
- <section className="sh-card" aria-labelledby="sh-account-title">
- <AreaHead
- id="sh-account-title"
- mark={<AreaMark icon="user" />}
- title={pages.account.title}
- line={t('settings.home.account.line')}
- href="#account"
- />
- <SectionRows page="account" sections={sections} icons={ACCOUNT_ICONS} />
- </section>
+ <Entry
+ href={sectionHash('account', 'profile')}
+ mark={<Avatar name={name} src={me ? memberAvatar(me) : null} size={40} />}
+ title={name}
+ line={t('settings.home.account.line')}
+ />
)
}
-/** Workspace and User settings: a general icon on a quiet square, the same for every workspace and person. */
-function AreaMark({ icon }: { icon: IconName }) {
+/** The assistant's mark: the waveform on the dark square, as in the navigation. */
+function AssistantMark() {
return (
- <span className="sh-mark sh-mark-md" aria-hidden="true">
- <Icon name={icon} size={22} />
+ <span className="sh-mark" aria-hidden="true">
+ <Icon name="waveform" size={20} />
</span>
)
}
-/** An area's head: its mark, its name (a link to the area) and one line on what is set there and for whom. */
-function AreaHead({
- id,
+/** One entry: mark, title (with a quiet detail), one line on what is in there, a status, the chevron. All of it opens. */
+function Entry({
+ href,
mark,
title,
- extra,
+ meta,
line,
- href,
- keys,
- big = false,
+ status,
+ tip,
}: {
- id: string
+ href: string
mark: ReactNode
title: string
- extra?: ReactNode
+ meta?: string
line: string
- href: string
- keys?: string[]
- big?: boolean
+ status?: ReactNode
+ tip?: string
}) {
return (
- <div className={cx('sh-head', big && 'is-big')}>
- {mark}
- <div className="sh-head-text">
- <span className="sh-title-row">
- <a id={id} className="sh-title" href={href}>
- {title}
- </a>
- {extra}
+ <a className="sh-entry" href={href} title={tip}>
+ <span className="sh-entry-lead">{mark}</span>
+ <span className="sh-entry-text">
+ <span className="sh-entry-title">
+ <b>{title}</b>
+ {meta && <span className="sh-entry-meta">{meta}</span>}
</span>
- <span className="sh-line">{line}</span>
- </div>
- {keys && <Kbd keys={keys} className="sh-keys" />}
- </div>
+ <span className="sh-entry-line">{line}</span>
+ </span>
+ {status && <span className="sh-entry-status">{status}</span>}
+ <Icon name="right" size={16} className="sh-entry-go" />
+ </a>
)
}
-function SectionRows({
- page,
- sections,
- icons,
-}: {
- page: string
- sections: readonly PageSection[]
- icons: Record<string, IconName>
-}) {
+/** The assistant's entry while it loads: the same row with its mark, title and line as grey shapes. */
+function EntrySkeleton() {
return (
- <ul className="sh-rows">
- {sections.map(s => (
- <li key={s.id}>
- <a className="sh-row" href={sectionHash(page, s.id)}>
- <Icon name={icons[s.id] ?? 'gear'} size={16} />
- <b>{s.label}</b>
- <Icon name="right" size={15} className="sh-row-go" />
- </a>
- </li>
- ))}
- </ul>
+ <div className="sh-entry" aria-hidden="true">
+ <span className="sh-entry-lead">
+ <Skeleton width={40} height={40} className="sh-mark-sk" />
+ </span>
+ <span className="sh-entry-text">
+ <span className="sh-entry-title">
+ <Skeleton shape="text" width={72} />
+ </span>
+ <span className="sh-entry-line">
+ <Skeleton shape="text" width={260} />
+ </span>
+ </span>
+ </div>
)
}
diff --git a/apps/web/src/settings/settings-home.css b/apps/web/src/settings/settings-home.css
index 20d26c29..385412ff 100644
--- a/apps/web/src/settings/settings-home.css
+++ b/apps/web/src/settings/settings-home.css
@@ -1,73 +1,120 @@
-/* Settings (SettingsHome.tsx): the assistant large on top, Workspace settings and User settings side by side below. */
-.sh-wrap { max-width: 1040px; margin: 0 auto; padding: 32px 24px 56px; display: grid; gap: 20px; }
-.sh-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
-
-.sh-card { background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 24px 24px 14px; min-width: 0; }
-.sh-assistant { padding: 26px 28px 28px; }
-
-/* An area's head: mark, its name, one line. */
-.sh-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
-.sh-head.is-big { margin-bottom: 18px; }
-.sh-head-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
-.sh-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
-.sh-title { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
-.sh-title:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
-.sh-line { font-size: 14px; line-height: 20px; color: var(--ink-muted); margin-top: 2px; }
-.sh-keys { align-self: flex-start; }
-
-/* The assistant's mark: the waveform on the dark square (the nav's Assistant icon), as large as the other two marks. */
-.sh-mark { display: grid; place-items: center; flex: none; background: var(--signal); color: var(--on-signal); }
-.sh-mark-lg { width: 48px; height: 48px; border-radius: 12px; align-self: flex-start; }
-.sh-mark-md { width: 48px; height: 48px; border-radius: 12px; background: var(--surface-hover); color: var(--ink); align-self: flex-start; }
-.sh-mark-sm { width: 30px; height: 30px; border-radius: 9px; }
-
-.sh-state { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
-.sh-state-words { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-muted); }
-
-/* Several assistants: one chip each above the head; the picked one dark. */
-.sh-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
-.sh-switch-item { display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 7px; border: 0; border-radius: var(--radius-md); background: var(--surface-hover); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
-.sh-switch-item:hover { background: var(--surface-strong, #ebe9e3); }
-.sh-switch-item[aria-selected="true"] { background: var(--signal); color: var(--on-signal); }
-.sh-switch-item[aria-selected="true"] .sh-mark { background: var(--on-signal); color: var(--signal); }
-.sh-switch-text { display: grid; line-height: 1.25; }
-.sh-switch-text b { font-size: 14px; font-weight: 600; }
-.sh-switch-text span { font-size: 12px; opacity: 0.72; }
-.sh-switch-item:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
+/* Settings (SettingsHome.tsx): one raised card with three entries (the assistant, the workspace, you), divided by
+ hairlines. Each entry is a link: mark, title, one line, a quiet status, the chevron. */
+.page-in.sh-page {
+ max-width: 680px;
+}
+.sh-list {
+ gap: 0;
+ padding: 0;
+ overflow: hidden;
+}
-/* The assistant's sections: four tiles a row. */
-.sh-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
-.sh-tile { box-sizing: border-box; display: grid; align-content: start; gap: 4px; height: 100%; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-hover); color: var(--ink); text-decoration: none; transition: background-color 120ms; }
-.sh-tile:hover { background: var(--surface-strong, #ebe9e3); }
-.sh-tile:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
-.sh-tile-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
-.sh-tile-head b { font-weight: 600; }
-.sh-tile-line { font-size: 12.5px; line-height: 17px; color: var(--ink-muted); }
+.sh-entry {
+ box-sizing: border-box;
+ display: flex;
+ align-items: center;
+ gap: 14px;
+ min-height: 72px;
+ padding: 14px 16px;
+ color: var(--ink);
+ text-decoration: none;
+ border-top: 1px solid var(--line);
+ transition: background-color 120ms;
+}
+.sh-list > .sh-entry:first-child,
+.sh-list > :first-child > .sh-entry:first-child {
+ border-top: 0;
+}
+a.sh-entry:hover {
+ background: var(--surface-hover);
+}
+a.sh-entry:focus-visible {
+ outline: 2px solid var(--focus);
+ outline-offset: -2px;
+}
-/* Workspace settings and User settings: one short row per section (the head's sentence says what is in there). */
-.sh-rows { list-style: none; margin: 0 -10px; padding: 0; }
-.sh-rows li + li .sh-row { box-shadow: 0 -1px 0 var(--line); }
-.sh-row { box-sizing: border-box; display: grid; grid-template-columns: 16px minmax(0, 1fr) 15px; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-size: 14px; }
-.sh-row > svg:first-child { color: var(--ink-muted); }
-.sh-row b { font-weight: 500; }
-.sh-row-go { color: var(--ink-muted); }
-.sh-row:hover { background: var(--surface-hover); box-shadow: none; }
-.sh-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
+.sh-entry-lead {
+ display: inline-flex;
+ flex: none;
+}
+/* One mark size for all three: the assistant's square, the workspace's square, your round picture. */
+.sh-entry-lead .ws-initial.is-lg {
+ width: 40px;
+ height: 40px;
+ font-size: 16px;
+}
+.sh-mark {
+ display: grid;
+ place-items: center;
+ width: 40px;
+ height: 40px;
+ border-radius: var(--radius-md);
+ background: var(--signal);
+ color: var(--on-signal);
+}
+.sh-mark-sk {
+ border-radius: var(--radius-md);
+}
-/* Leave, hand over or delete the workspace: a quiet link under the rows. */
-.sh-danger { display: inline-block; margin: 10px 0 6px; font-size: 13px; color: var(--ink-muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
-.sh-danger:hover { color: var(--ink); }
-.sh-danger:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
+.sh-entry-text {
+ display: grid;
+ gap: 2px;
+ flex: 1;
+ min-width: 0;
+}
+.sh-entry-title {
+ display: flex;
+ align-items: baseline;
+ gap: 10px;
+ min-width: 0;
+ font-size: 15px;
+ line-height: 22px;
+}
+.sh-entry-title b {
+ font-weight: 600;
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+.sh-entry-meta {
+ flex: none;
+ font-size: 13px;
+ color: var(--ink-muted);
+ font-variant-numeric: tabular-nums;
+}
+.sh-entry-line {
+ font-size: 13px;
+ line-height: 18px;
+ color: var(--ink-muted);
+}
-@media (max-width: 960px) {
- .sh-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
- .sh-pair { grid-template-columns: 1fr; }
+.sh-entry-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 6px;
+ flex: none;
+ font-size: 13px;
+ color: var(--ink-muted);
}
+.sh-entry-go {
+ flex: none;
+ color: var(--ink-muted);
+}
+
+/* Phone: the status goes under the line, so the title and its line keep the width. */
@media (max-width: 560px) {
- .sh-wrap { padding: 16px 12px 40px; gap: 12px; }
- .sh-card, .sh-assistant { padding: 18px 16px 10px; }
- .sh-head .sh-keys { display: none; }
- .sh-tiles { grid-template-columns: 1fr; gap: 0; margin: 0 -10px; }
- .sh-tiles li + li .sh-tile { box-shadow: 0 -1px 0 var(--line); }
- .sh-tile { background: none; border-radius: var(--radius-sm); padding: 10px; }
+ .sh-entry {
+ flex-wrap: wrap;
+ row-gap: 6px;
+ padding: 14px;
+ }
+ .sh-entry-text {
+ flex-basis: calc(100% - 40px - 14px - 16px - 28px);
+ }
+ .sh-entry-status {
+ order: 3;
+ flex-basis: 100%;
+ padding-left: 54px;
+ }
}
diff --git a/apps/web/src/shell/pages.tsx b/apps/web/src/shell/pages.tsx
index f05cb7a4..e6bb6867 100644
--- a/apps/web/src/shell/pages.tsx
+++ b/apps/web/src/shell/pages.tsx
@@ -71,18 +71,13 @@ export const pages = {
},
render: p => <Insights canEdit={p.canEditSettings} toast={p.toast} />,
},
- // Every setting starts here: the assistant, Workspace settings and User settings in one overview (G S).
+ // Every setting starts here: three entries, the assistant, the workspace and you (G S).
settings: {
get title() {
return i18n().t('shell.page.settings')
},
render: p => (
- <SettingsHome
- canEdit={p.canEditSettings}
- billing={!!p.billing}
- workspaceName={p.workspaceName}
- isInstanceAdmin={p.isInstanceAdmin}
- />
+ <SettingsHome billing={!!p.billing} workspaceName={p.workspaceName} isInstanceAdmin={p.isInstanceAdmin} />
),
},
assistant: {
diff --git a/packages/i18n/locales/en/settings.json b/packages/i18n/locales/en/settings.json
index c347a322..f90a87b5 100644
--- a/packages/i18n/locales/en/settings.json
+++ b/packages/i18n/locales/en/settings.json
@@ -899,14 +899,13 @@
"holidays.vacation.turnOn": "Turn on",
"holidays.vacation.until": "Last day closed",
"holidays.yourDay": "Your day",
- "home.account.line": "Only for you: your picture and name, language and notifications, how you sign in, where you are signed in and your personal API keys.",
+ "home.account.line": "Your profile, notifications, sign-in and API keys.",
"home.assistant.answering": "Answering calls",
- "home.assistant.line": "How {name} answers your phone and what happens on each call.",
- "home.assistant.lineNone": "How your assistant answers your phone and what happens on each call.",
+ "home.assistant.line": "How {name} answers calls and what happens after.",
+ "home.assistant.lineNone": "How your assistant answers calls and what happens after.",
"home.assistant.noNumber": "No number yet",
- "home.assistant.switch": "Assistants",
- "home.workspace.line": "Shared by everyone in {workspace}: business details, the team, phone numbers, call recordings and exports, and billing.",
- "home.workspace.lineNoBilling": "Shared by everyone in {workspace}: business details, the team, phone numbers, call recordings and exports.",
+ "home.workspace.line": "Team, phone numbers and billing, shared by everyone.",
+ "home.workspace.lineNoBilling": "Team and phone numbers, shared by everyone.",
"hours.byDay": "Opening hours by day",
"hours.changeTip": "Change your business hours",
"hours.closed": "Closed",