diff --git a/docs/PLAN.md b/docs/PLAN.md index 3973378..f28c3ad 100644 --- a/docs/PLAN.md +++ b/docs/PLAN.md @@ -34,3 +34,4 @@ Updated: 2026-04-02 18. Restored panel language/theme preferences in Settings with `localStorage`, merged service `Command/Protocol` into a single `Type`, and removed the legacy `admin` service path from managed panel state. 19. Added service-removal confirmation with linked-user warnings, backend cascade deletion for removed services, and migration that strips persisted legacy `admin` services from stored state. 20. Made `npm run dev` start both the Vite client and Express backend, added a Vite API proxy for local development, and restored `system` as the default panel theme so the login screen follows OS appearance. +21. Re-separated the Settings tab into distinct panel-settings and services cards so panel preferences no longer appear inside the Services section. diff --git a/docs/PROJECT_INDEX.md b/docs/PROJECT_INDEX.md index e13ad30..7587813 100644 --- a/docs/PROJECT_INDEX.md +++ b/docs/PROJECT_INDEX.md @@ -24,7 +24,7 @@ Updated: 2026-04-02 - `src/main.tsx`: application bootstrap - `src/App.tsx`: authenticated panel shell with API-backed login, `sessionStorage` token persistence, localized labels, early theme application, and protected panel mutations -- `src/SystemTab.tsx`: Settings tab with panel language/style preferences, unified service type editing, remove confirmation, and generated config preview +- `src/SystemTab.tsx`: Settings tab with separate panel-settings and services cards, unified service type editing, remove confirmation, and generated config preview - `src/App.test.tsx`: login-gate, preferences persistence, modal interaction, pause/resume, delete-confirm, and settings-save UI tests - `src/app.css`: full panel styling - `src/data/mockDashboard.ts`: default panel state and frontend fallback snapshot diff --git a/src/App.test.tsx b/src/App.test.tsx index 9101bb5..ceca9d9 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -149,7 +149,8 @@ describe('App login gate', () => { await loginIntoPanel(user); await user.click(screen.getByRole('button', { name: /settings/i })); - expect(screen.queryByText(/panel settings/i)).not.toBeInTheDocument(); + expect(screen.getByRole('heading', { name: /panel settings/i })).toBeInTheDocument(); + expect(screen.getByRole('heading', { name: /^services$/i })).toBeInTheDocument(); expect(screen.queryByLabelText(/public host/i)).not.toBeInTheDocument(); expect(screen.queryByLabelText(/command/i)).not.toBeInTheDocument(); expect(screen.queryByLabelText(/protocol/i)).not.toBeInTheDocument(); diff --git a/src/SystemTab.tsx b/src/SystemTab.tsx index 9823934..f476106 100644 --- a/src/SystemTab.tsx +++ b/src/SystemTab.tsx @@ -73,52 +73,58 @@ export default function SystemTab({
-

{text.settings.title}

-
- - -
+
+ + +
+
+ +
+
+

{text.settings.title}

+
{draft.services.map((service, index) => ( diff --git a/src/lib/panelText.ts b/src/lib/panelText.ts index 0d22d8c..227b1fa 100644 --- a/src/lib/panelText.ts +++ b/src/lib/panelText.ts @@ -92,6 +92,7 @@ const text = { deleteAction: 'Delete user', }, settings: { + panelTitle: 'Panel settings', title: 'Services', generatedConfig: 'Generated config', serviceLabel: 'Service', @@ -207,6 +208,7 @@ const text = { deleteAction: 'Удалить пользователя', }, settings: { + panelTitle: 'Настройки панели', title: 'Сервисы', generatedConfig: 'Сгенерированный конфиг', serviceLabel: 'Сервис',