Plany: kontekst silowni w wierszu zakladek tygodni zamiast osobnego paska (krok 2)
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
|||||||
useExercises,
|
useExercises,
|
||||||
type PlanBody,
|
type PlanBody,
|
||||||
} from '../../api/queries';
|
} from '../../api/queries';
|
||||||
import { CalendarX, Check, ChevronRight, Dumbbell, Unlink } from 'lucide-react';
|
import { CalendarX, Check, ChevronRight, Unlink } from 'lucide-react';
|
||||||
import {
|
import {
|
||||||
BackButton,
|
BackButton,
|
||||||
Button,
|
Button,
|
||||||
@@ -443,8 +443,11 @@ export default function PlanEditor() {
|
|||||||
{step === 2 && (
|
{step === 2 && (
|
||||||
<>
|
<>
|
||||||
{/* Zakładki tygodni (sticky pod topbarem): każdy tydzień z osobna,
|
{/* Zakładki tygodni (sticky pod topbarem): każdy tydzień z osobna,
|
||||||
renderowany jest tylko panel aktywnej zakładki */}
|
renderowany jest tylko panel aktywnej zakładki. Siłownia — cichy
|
||||||
|
kontekst w tym samym wierszu (decyzja z kroku 1, filtruje katalog). */}
|
||||||
<div className="sticky top-[55px] md:top-[59px] z-20 -mx-4 px-4 md:-mx-8 md:px-8 py-2 bg-bg/95 backdrop-blur">
|
<div className="sticky top-[55px] md:top-[59px] z-20 -mx-4 px-4 md:-mx-8 md:px-8 py-2 bg-bg/95 backdrop-blur">
|
||||||
|
<div className="flex flex-wrap items-center gap-x-3 gap-y-1">
|
||||||
|
<div className="min-w-0 flex-1 basis-full sm:basis-0">
|
||||||
<Tabs
|
<Tabs
|
||||||
tabs={editor.weeks.map((w, wi) => ({
|
tabs={editor.weeks.map((w, wi) => ({
|
||||||
id: String(wi),
|
id: String(wi),
|
||||||
@@ -466,25 +469,21 @@ export default function PlanEditor() {
|
|||||||
onChange={(id) => setActiveWeek(parseInt(id, 10))}
|
onChange={(id) => setActiveWeek(parseInt(id, 10))}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<p className="ml-auto shrink-0 text-[0.8125rem] text-dim sm:ml-0">
|
||||||
<div ref={panelRef} className="scroll-mt-28">
|
{gymName ? `Siłownia: ${gymName}` : 'Bez siłowni'}
|
||||||
{/* Przypomnienie wybranej siłowni (decyzja zapada w kroku 1 — filtruje katalog) */}
|
|
||||||
<div className="mb-3 flex flex-wrap items-center gap-x-2.5 gap-y-1 rounded-xl border border-line bg-card px-4 py-2.5 text-[0.8125rem] text-dim">
|
|
||||||
<Dumbbell className="h-4 w-4 shrink-0 text-accent-text" aria-hidden="true" />
|
|
||||||
<span className="min-w-0">
|
|
||||||
Siłownia: <span className="font-semibold text-ink">{gymName ?? 'bez siłowni'}</span>
|
|
||||||
{' · '}
|
{' · '}
|
||||||
{gymName ? 'katalog ćwiczeń z jej sprzętu' : 'pełny katalog ćwiczeń'}
|
|
||||||
</span>
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="ml-auto cursor-pointer font-semibold text-accent-text underline underline-offset-2"
|
className="cursor-pointer font-semibold text-accent-text underline underline-offset-2"
|
||||||
onClick={() => setStep(1)}
|
onClick={() => setStep(1)}
|
||||||
>
|
>
|
||||||
Zmień
|
Zmień
|
||||||
</button>
|
</button>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div ref={panelRef} className="scroll-mt-28">
|
||||||
<WeekPanel
|
<WeekPanel
|
||||||
index={activeWi}
|
index={activeWi}
|
||||||
summary={weekSummaryActive}
|
summary={weekSummaryActive}
|
||||||
|
|||||||
Reference in New Issue
Block a user