App+Admin: przywrrocenie zakladki testowej w menu (test zawezania builda - api/web pominiete)
This commit is contained in:
@@ -21,6 +21,7 @@ import Exercises from './pages/catalog/Exercises';
|
||||
import EquipmentCatalog from './pages/catalog/Equipment';
|
||||
import Announcements from './pages/announcements/Announcements';
|
||||
import Logs from './pages/Logs';
|
||||
import TestPage from './pages/TestPage';
|
||||
import VerificationsList, { VerificationDetail } from './pages/Verifications';
|
||||
|
||||
export default function App() {
|
||||
@@ -62,6 +63,7 @@ export default function App() {
|
||||
<Route path="/verifications/:id" element={<VerificationDetail />} />
|
||||
<Route path="/announcements" element={<Announcements />} />
|
||||
<Route path="/logs" element={<Logs />} />
|
||||
<Route path="/test" element={<TestPage />} />
|
||||
</Route>
|
||||
<Route path="*" element={<Navigate to="/" replace />} />
|
||||
</Routes>
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
AppWindow,
|
||||
Building2,
|
||||
Dumbbell,
|
||||
FlaskConical,
|
||||
LogOut,
|
||||
Megaphone,
|
||||
Menu,
|
||||
@@ -45,6 +46,7 @@ const SECTIONS: NavSection[] = [
|
||||
labelKey: 'nav.management',
|
||||
items: [
|
||||
{ to: '/gyms', labelKey: 'nav.gyms', icon: Building2, end: false },
|
||||
{ to: '/test', labelKey: 'nav.test', icon: FlaskConical, end: false },
|
||||
{ to: '/verifications', labelKey: 'nav.verifications', icon: ShieldCheck, end: false },
|
||||
{ to: '/users', labelKey: 'nav.users', icon: Users, end: false },
|
||||
{ to: '/announcements', labelKey: 'nav.announcements', icon: Megaphone, end: false },
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
"roleTrainer": "Trainer",
|
||||
"roleMember": "Member",
|
||||
"buildInfo": "build {{sha}} · {{time}}",
|
||||
"buildDev": "dev"
|
||||
"buildDev": "dev",
|
||||
"test": "Test"
|
||||
},
|
||||
"topbar": {
|
||||
"openMenu": "Open menu",
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
"roleTrainer": "Trener",
|
||||
"roleMember": "Ćwiczący",
|
||||
"buildInfo": "wersja {{sha}} · {{time}}",
|
||||
"buildDev": "dev"
|
||||
"buildDev": "dev",
|
||||
"test": "Test"
|
||||
},
|
||||
"topbar": {
|
||||
"openMenu": "Otwórz menu",
|
||||
|
||||
8
admin/src/pages/TestPage.tsx
Normal file
8
admin/src/pages/TestPage.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTopbar } from '../topbar';
|
||||
|
||||
export default function TestPage() {
|
||||
const { t } = useTranslation();
|
||||
useTopbar({ title: t('common:nav.test') });
|
||||
return <p className="text-dim">{t('common:nav.test')}</p>;
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import PlanTemplates from './pages/plans/PlanTemplates';
|
||||
import PlanEditor from './pages/plans/PlanEditor';
|
||||
import PlanDetail from './pages/plans/PlanDetail';
|
||||
import Calendar from './pages/Calendar';
|
||||
import TestPage from './pages/TestPage';
|
||||
import DayExecution from './pages/DayExecution';
|
||||
import Profile from './pages/profile/Profile';
|
||||
import ProfileInfo from './pages/profile/ProfileInfo';
|
||||
@@ -85,6 +86,7 @@ export default function App() {
|
||||
<Route path="/plans/:id/edit" element={<PlanEditor />} />
|
||||
<Route path="/plans/:id" element={<PlanDetail />} />
|
||||
<Route path="/calendar" element={<Calendar />} />
|
||||
<Route path="/test" element={<TestPage />} />
|
||||
<Route path="/day/:dayId" element={<DayExecution />} />
|
||||
<Route path="/gyms" element={<Gyms />} />
|
||||
<Route path="/gyms/:id" element={<GymDetail />} />
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
Building2,
|
||||
CalendarDays,
|
||||
Dumbbell,
|
||||
FlaskConical,
|
||||
LayoutDashboard,
|
||||
LogOut,
|
||||
Mail,
|
||||
@@ -56,6 +57,7 @@ const NAV: NavItem[] = [
|
||||
];
|
||||
|
||||
const GYM_NAV: NavItem = { to: '/gyms', labelKey: 'gyms', icon: Building2, end: false };
|
||||
const TEST_NAV: NavItem = { to: '/test', labelKey: 'test', icon: FlaskConical, end: false };
|
||||
const TRAINEES_NAV: NavItem = { to: '/trainees', labelKey: 'trainees', icon: Users, end: false };
|
||||
const INVITATIONS_NAV: NavItem = {
|
||||
to: '/invitations',
|
||||
@@ -221,7 +223,7 @@ export default function Layout() {
|
||||
? { to: `/day/${activeSession.dayId}`, labelKey: 'training', icon: Play, end: false }
|
||||
: null;
|
||||
// „Siłownie” jest zawsze widoczne (wirtualne siłownie są dostępne dla każdego usera).
|
||||
let navItems: NavItem[] = [...NAV.slice(0, 3), GYM_NAV, NAV[3]];
|
||||
let navItems: NavItem[] = [...NAV.slice(0, 3), TEST_NAV, GYM_NAV, NAV[3]];
|
||||
if (trainingNav) navItems = [...navItems.slice(0, 3), trainingNav, ...navItems.slice(3)];
|
||||
// „Komunikator” jest zawsze widoczny (dla każdego zalogowanego), badge = nieprzeczytane.
|
||||
navItems = [
|
||||
|
||||
@@ -16,5 +16,6 @@
|
||||
"roleUser": "Trainee",
|
||||
"mainNav": "Main navigation",
|
||||
"buildInfo": "build {{sha}} · {{time}}",
|
||||
"buildDev": "dev"
|
||||
"buildDev": "dev",
|
||||
"test": "Test"
|
||||
}
|
||||
|
||||
@@ -16,5 +16,6 @@
|
||||
"roleUser": "Ćwiczący",
|
||||
"mainNav": "Nawigacja główna",
|
||||
"buildInfo": "wersja {{sha}} · {{time}}",
|
||||
"buildDev": "dev"
|
||||
"buildDev": "dev",
|
||||
"test": "Test"
|
||||
}
|
||||
|
||||
8
app/src/pages/TestPage.tsx
Normal file
8
app/src/pages/TestPage.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTopbar } from '../topbar';
|
||||
|
||||
export default function TestPage() {
|
||||
const { t } = useTranslation('nav');
|
||||
useTopbar({ title: t('test') });
|
||||
return <p className="text-dim">{t('test')}</p>;
|
||||
}
|
||||
Reference in New Issue
Block a user