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
+12 -4
View File
@@ -145,7 +145,7 @@ describe('MAdmin', () => {
fireEvent.click(screen.getByRole('button', { name: 'Administration' }));
// All standard sections are listed
expect(screen.getByRole('button', { name: 'User Defaults' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Defaults' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Backup' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Audit' })).toBeInTheDocument();
@@ -156,6 +156,14 @@ describe('MAdmin', () => {
expect(screen.queryByText('alice')).not.toBeInTheDocument();
});
it('FE-MOB-ADMIN-002b: a link to the desktop Security or Services tab opens the Settings section', async () => {
for (const tab of ['security', 'services', 'settings']) {
const { unmount } = render(<MAdmin />, { initialEntries: [`/admin?tab=${tab}`] });
await waitFor(() => expect(screen.getByText('Authentication Methods')).toBeInTheDocument());
unmount();
}
});
it('FE-MOB-ADMIN-003: the back button leaves for the dashboard', async () => {
renderAdmin();
await waitFor(() => expect(screen.getByText('alice')).toBeInTheDocument());
@@ -180,7 +188,7 @@ describe('MAdmin', () => {
fireEvent.click(screen.getByRole('button', { name: 'Administration' }));
expect(screen.queryByRole('button', { name: 'MCP Access' })).not.toBeInTheDocument();
expect(screen.queryByRole('button', { name: 'MCP' })).not.toBeInTheDocument();
expect(screen.queryByRole('button', { name: 'Dev: Notifications' })).not.toBeInTheDocument();
});
@@ -193,7 +201,7 @@ describe('MAdmin', () => {
renderAdmin();
await waitFor(() => expect(screen.getByText('alice')).toBeInTheDocument());
await openSection('MCP Access');
await openSection('MCP');
expect(screen.getByTestId('mcp-tokens-panel')).toBeInTheDocument();
});
@@ -212,7 +220,7 @@ describe('MAdmin', () => {
renderAdmin();
await waitFor(() => expect(screen.getByText('alice')).toBeInTheDocument());
await openSection('User Defaults');
await openSection('Defaults');
expect(screen.getByTestId('default-user-settings')).toBeInTheDocument();
await openSection('Personalization');
@@ -73,7 +73,7 @@ describe('MAdminMcpTokensPanel', () => {
it('FE-MOB-MCPTOK-001: renders the section header and both sub-section titles', async () => {
renderPanel();
expect(screen.getByText('MCP Access')).toBeInTheDocument();
expect(screen.getByText('MCP')).toBeInTheDocument();
expect(screen.getByText('Manage OAuth sessions and API tokens across all users')).toBeInTheDocument();
expect(screen.getByText('OAuth Sessions')).toBeInTheDocument();
expect(screen.getByText('API Tokens')).toBeInTheDocument();