diff --git a/client/admin.html b/client/admin.html deleted file mode 100644 index 7fe5088..0000000 --- a/client/admin.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - Загрузка данных — служебная страница - - -
- - - diff --git a/client/src/App.tsx b/client/src/App.tsx index 4a0ce09..37a8a59 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -1,4 +1,4 @@ -import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import { lazy, Suspense, useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { checkDataset } from './lib/checkDataset'; import type { Dataset } from './types'; import { TooltipProvider } from './components/Tooltip'; @@ -8,6 +8,7 @@ import { Deposits } from './sections/Deposits'; import { Taxes } from './sections/Taxes'; import { Finance } from './sections/Finance'; import { DataStatus } from './sections/DataStatus'; +const AdminSection = lazy(() => import('./admin/AdminApp').then((m) => ({ default: m.AdminSection }))); import { Login } from './components/Login'; import { Empty } from './components/ui'; import { readSession, seesAdminSections, seesSection, SESSION_CHECK_MS, type SessionState } from './lib/session'; @@ -15,6 +16,10 @@ import { decideFaceOffer, deviceName, faceKeyName, declinedName, safeStorage } f import { enrollFace, faceLoginPossible } from './lib/passkey'; const SECTIONS = [ + // Служебное - такой же раздел панели, как остальные (правка владельца + // 28.08.2026): раньше это была отдельная страница, и переход туда уводил + // из панели вместе со всеми вкладками. + { id: 'admin', label: 'Служебная', short: '00' }, { id: 'people', label: 'Люди', short: '01' }, { id: 'cash', label: 'Деньги', short: '02' }, { id: 'deposits', label: 'Депозиты', short: '03' }, @@ -24,7 +29,7 @@ const SECTIONS = [ ]; /** Разделы, закрытые от всех, кроме администратора. */ -const ADMIN_ONLY = new Set(['data']); +const ADMIN_ONLY = new Set(['data', 'admin']); function sectionFromHash(): string { const hash = window.location.hash.replace('#', ''); @@ -226,19 +231,6 @@ export default function App() {