feat(settings): one look for every user and admin settings page

The settings pages had grown into a mix of styles: folds, dialogs behind
rows, full-width rows next to boxed ones, pills for every figure and buttons
in four sizes. Every page now uses the same kit.

- Cards keep their tinted head band; every part of a card is a rounded block
  with its own small head (SettingsBlock), and rows sit in rounded boxes.
- Nothing folds and nothing hides behind a dialog: the MCP config, OAuth
  scopes, mail how-to, AI privacy note and addon sub-options are all shown.
- Each page is split into two columns balanced by length (SettingsColumns).
- Long explanations moved into an info mark next to the label (HintMark).
- One button size everywhere (text-control); tab names are one word.
- Admin: the old Settings tab is split into Security and Services
  (?tab=settings still opens Security, and the phone keeps its single
  Settings section for both); the Integration group is gone, live flights
  and mail import sit next to the addons they configure.
- Addons: one card per type with rows, no search, filter or fold.
- Quota, TREK API facts, mail import status and Google's daily limit are
  compact lines and strips instead of tiles and pills.
- Language is a select; routing has its own card under the defaults;
  storage saves from the foot of its categories card.
- Unused keys, FoldSummary and the page-width wrapper are removed.
This commit is contained in:
Maurice
2026-11-13 23:18:28 +01:00
parent 5fe3dea4cc
commit 94ac7673a5
138 changed files with 1299 additions and 2188 deletions
+7 -14
View File
@@ -1,7 +1,5 @@
import React from 'react'
import { fs } from '../../components/shared/DialogShell'
import { StatusPill } from '../../components/Settings/settingsKit'
import FoldSummary from './FoldSummary'
import { SettingsBlock, StatusPill } from '../../components/Settings/settingsKit'
interface GoogleOptionsProps {
/** "Google options" — the heading of the fold. */
@@ -19,19 +17,14 @@ interface GoogleOptionsProps {
* an admin opens this card at all. The switches are the opposite — set once,
* then never touched, and there are five of them.
*
* A native <details> rather than a state hook: keyboard operable and announced
* to screen readers without writing any of that, and it survives a re-render
* without state. Drawn as a box of rows (settingsKit's SettingRows), the
* summary being its first row.
* Shown open: the settings pages fold nothing away.
*/
export default function GoogleOptions({ title, summary, children }: GoogleOptionsProps): React.ReactElement {
return (
<details className="group overflow-hidden rounded-[12px] border border-edge-faint bg-surface-secondary">
<FoldSummary>
<span className="min-w-0 flex-1 truncate font-medium text-content" style={fs(13, 'body')}>{title}</span>
<StatusPill>{summary}</StatusPill>
</FoldSummary>
<div className="divide-y divide-edge-faint border-t border-edge-faint bg-surface-card">{children}</div>
</details>
// A block of the card: its title and the count of switches on as the block's
// head, its rows inside.
<SettingsBlock title={title} badge={<StatusPill>{summary}</StatusPill>} flush>
{children}
</SettingsBlock>
)
}