Release v1.2.0: complete visual redesign

Rebuilt design system (one type scale, neutral surface ramp, hairline
separators), a 77-icon hand-drawn set replacing every emoji in the UI,
grouped routine-icon picker with the old emoji mapped forward, new tab
bar with a raised Start/Resume button, and a reorganised Home.

Chart fixes that came out of it: axis labels, gridlines and the target
line were painted with colour variables the new sheet no longer defines
and fell back to black-on-black; the hover readout is now placed from
its measured size so it can't be clipped at the edges, and it clears
when the pointer leaves the chart.
This commit is contained in:
Duarte Santos committed 2026-07-23 11:55:52 +02:00
1 parent fc36476a5f
commit b28a58930c
37 files changed
+2168 -1061

No files matched your search

+37
View File
@@ -1,5 +1,42 @@
# Changelog
## v1.2.0 — 2026-07-23
A complete visual redesign. Same app, same data — every screen redrawn.
### A designed interface, not an assembled one
- 🎨 **Rebuilt design system.** One type scale carrying hierarchy through size instead of making
everything bold, a neutral surface ramp instead of saturated blue-greys, hairline separators
instead of outlined boxes, and motion that acknowledges a press rather than animating for
decoration. Light and dark are both first-class, and the eight accent colours now pick their
label colour by measured contrast — the default green in light mode was failing WCAG AA on
every primary button before.
- ✏️ **A hand-drawn icon set** (77 icons, single stroke weight, drawn on one 24×24 grid) replaces
every emoji in the interface. Emoji render differently on each platform, sit on their own
baseline and can't take a theme colour, which is what made the old UI feel stitched together.
Icons inherit the surrounding text colour and optical size.
- 🏋️ **Routine icons.** Picking an icon for a routine now offers a grouped set — strength,
equipment, cardio, recovery — instead of an emoji keyboard. Routines you already made keep
their look: the old emoji are mapped forward automatically, so nothing to migrate and nothing
to redo.
- ▶️ **New tab bar** with a raised Start button that turns into a pulsing orange Resume while a
workout is running.
- 🏠 **Home reads as a plan for today** — week strip, today's session as one tappable row, body
weight, and your streak.
### Charts
- 📈 **Axis labels, gridlines and the target-weight line are visible again** in dark mode. They
were painted with colour variables that no longer existed, which silently fell back to black
on black — and to no stroke at all for the lines.
- 💬 **The hover readout stays on screen.** It used to be positioned with a fixed offset that
assumed one label width, so the first and last point pushed it under the chart's clip; it's now
placed from its measured size and kept inside the frame, dropping below the point when the
point sits high enough that the label would cover the value it reports.
- 🖱️ **It also goes away again** — moving off the chart now clears the readout, crosshair and
marker, which previously stayed until you hovered somewhere else.
## v1.1.3 — 2026-07-22
Admin dashboard for self-hosters (opt-in — off by default), equipment filtering, and
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "opengym-frontend",
"private": true,
"version": "1.1.3",
"version": "1.2.0",
"type": "module",
"scripts": {
"dev": "vite",
+13 -2
View File
@@ -1,10 +1,13 @@
import { useEffect } from 'react'
import { HashRouter, Routes, Route, Navigate, useNavigate, useLocation } from 'react-router-dom'
import { useStore } from './store/useStore.js'
import { useUI } from './store/useUI.js'
import { bindUI } from './components/ui.jsx'
import { ACCENTS } from './lib/format.js'
import { setLang, useLang } from './lib/i18n.js'
import { setNav } from './lib/nav.js'
import { startFlow } from './sheets.jsx'
import Icon from './components/Icon.jsx'
import TabBar from './components/TabBar.jsx'
import Modals from './components/Modals.jsx'
import Toast from './components/Toast.jsx'
@@ -20,12 +23,14 @@ import Library from './views/Library.jsx'
import Settings from './views/Settings.jsx'
import Admin from './views/Admin.jsx'
bindUI(useUI) // lets the shared controls open sheets without importing the store at module scope
function applyPrefs(theme, accent) {
const de = document.documentElement
de.dataset.theme = theme === 'light' ? 'light' : 'dark'
de.dataset.accent = ACCENTS[accent] ? accent : 'lime'
const meta = document.querySelector('meta[name="theme-color"]')
if (meta) meta.content = de.dataset.theme === 'light' ? '#f2f4f7' : '#0c0e12'
if (meta) meta.content = de.dataset.theme === 'light' ? '#f2f2f7' : '#000000'
}
function Shell() {
@@ -42,7 +47,13 @@ function Shell() {
useEffect(() => { window.scrollTo(0, 0) }, [loc.pathname])
const authed = user || isGuest
if (!ready && !authed) return <div id="app"><div style={{ paddingTop: '42vh', textAlign: 'center', fontSize: '2.2rem' }}>🏋️</div></div>
if (!ready && !authed) return (
<div id="app">
<div style={{ paddingTop: '44vh', display: 'flex', justifyContent: 'center', fontSize: 34, color: 'var(--label-3)' }}>
<Icon name="dumbbell" />
</div>
</div>
)
return (
<>
+142
View File
@@ -0,0 +1,142 @@
// openGym icon set — hand-drawn on a 24×24 grid, stroke-based, single weight.
//
// Everything is one <svg> primitive with `currentColor`, so an icon inherits the
// text colour and optical size of whatever it sits in. No emoji anywhere in the
// chrome: emoji render differently on every platform, sit on their own baseline
// and can't take a theme colour, which is what made the old UI feel assembled
// rather than designed.
//
// Conventions, so a new icon never looks foreign next to an old one:
// · 24×24 viewBox, live area 3…21 — 3px of optical padding all round
// · strokes only (no fills) except where a shape reads better solid (star.fill)
// · round caps + round joins, stroke width from --icon-stroke (1.7 default)
// · geometry snapped to .5 so it lands on pixel edges at 24px
const P = {
/* ---- navigation ---- */
house: <path d="M3.5 10.7 12 3.8l8.5 6.9M5.9 9.4V19a1.4 1.4 0 0 0 1.4 1.4h9.4A1.4 1.4 0 0 0 18.1 19V9.4" />,
calendar: <><rect x="3.4" y="5.2" width="17.2" height="15.4" rx="3.2" /><path d="M8.2 3.4v3.4M15.8 3.4v3.4M3.4 10.2h17.2" /></>,
chart: <path d="M4.5 20.2V13M9.5 20.2V6.4M14.5 20.2v-5.1M19.5 20.2V9.6" />,
magnifier: <><circle cx="11" cy="11" r="7" /><path d="m20.5 20.5-4.4-4.4" /></>,
// A real cog outline (8 teeth, generated on a circle) — an earlier version drew
// radial rays and was indistinguishable from `sun` at tab-bar size.
gear: <><path d="M20.48 10.59 20.48 13.41 18.58 13.72 17.87 15.43 19 17 17 19 15.43 17.87 13.72 18.58 13.41 20.48 10.59 20.48 10.28 18.58 8.57 17.87 7 19 5 17 6.13 15.43 5.42 13.72 3.52 13.41 3.52 10.59 5.42 10.28 6.13 8.57 5 7 7 5 8.57 6.13 10.28 5.42 10.59 3.52 13.41 3.52 13.72 5.42 15.43 6.13 17 5 19 7 17.87 8.57 18.58 10.28Z" /><circle cx="12" cy="12" r="3.1" /></>,
/* ---- training ---- */
dumbbell: <><rect x="5.9" y="7.9" width="3.2" height="8.2" rx="1.3" /><rect x="14.9" y="7.9" width="3.2" height="8.2" rx="1.3" /><path d="M9.1 12h5.8M3.6 9.9v4.2M20.4 9.9v4.2" /></>,
barbell: <path d="M2.9 12h18.2M7.4 7.4v9.2M9.8 9.3v5.4M16.6 7.4v9.2M14.2 9.3v5.4" />,
figureRun: <><circle cx="14.2" cy="4.9" r="1.9" /><path d="M13.4 9.1 9.6 11.4l1.7 3.3-2.4 5.4M13.4 9.1l3.4 1.5 1.4 3.4M11.3 14.7l4.3.9 1.5 4.5M9.6 11.4 6 10.2" /></>,
figureStrength: <><circle cx="12" cy="5.2" r="2" /><path d="M12 8.4v5.6M12 14 9.2 20.5M12 14l2.8 6.5M8 10.6h8M5.4 9.1v3M18.6 9.1v3" /></>,
scale: <><rect x="3.4" y="4.4" width="17.2" height="16.2" rx="3.4" /><path d="M8.3 9.2a3.9 3.9 0 0 1 7.4 0" /><path d="M12 9.2v2.5M8.9 16.2h6.2" /></>,
flame: <path d="M12 20.4c3.2 0 5.4-2.1 5.4-5.1 0-3.9-3.4-5.6-2.6-9.8-2.5.8-4 2.9-4 5.1 0 1-.5 1.6-1.2 1.6-.8 0-1.2-.7-1.2-1.8-1.1 1.2-1.8 2.9-1.8 4.9 0 3 2.2 5.1 5.4 5.1Z" />,
timer: <><circle cx="12" cy="13.4" r="7.2" /><path d="M12 9.6v3.8h2.8M9.6 3.4h4.8" /></>,
clock: <><circle cx="12" cy="12" r="8.2" /><path d="M12 7.4V12l3.1 1.9" /></>,
/* ---- status / achievement ---- */
trophy: <><path d="M7.6 4h8.8v4.6a4.4 4.4 0 0 1-8.8 0Z" /><path d="M7.6 5.6H4.9v1.5a3 3 0 0 0 2.9 3M16.4 5.6h2.7v1.5a3 3 0 0 1-2.9 3M12 13v3.4M8.6 20.4h6.8l-.7-4H9.3Z" /></>,
medal: <><circle cx="12" cy="14.8" r="5.2" /><circle cx="12" cy="14.8" r="1.9" /><path d="M9.1 9.9 6.4 3.6M14.9 9.9l2.7-6.3" /></>,
target: <><circle cx="12" cy="12" r="8.2" /><circle cx="12" cy="12" r="4.6" /><circle cx="12" cy="12" r="1.1" /></>,
star: <path d="m12 3.9 2.6 5.3 5.8.8-4.2 4.1 1 5.8-5.2-2.7-5.2 2.7 1-5.8-4.2-4.1 5.8-.8Z" />,
starFill: <path d="m12 3.9 2.6 5.3 5.8.8-4.2 4.1 1 5.8-5.2-2.7-5.2 2.7 1-5.8-4.2-4.1 5.8-.8Z" fill="currentColor" stroke="none" />,
crown: <path d="M4.2 17.6h15.6M4.2 17.6 3.4 7.2l4.6 3.2L12 4.6l4 5.8 4.6-3.2-.8 10.4Z" />,
bolt: <path d="M13.4 3.4 5.6 13.6h5.2l-.2 7 7.8-10.2h-5.2Z" />,
shield: <path d="M12 3.6 5 6.2v5.5c0 4 2.9 7.5 7 8.7 4.1-1.2 7-4.7 7-8.7V6.2Z" />,
heart: <path d="M12 20c-.4 0-.8-.1-1-.4l-6.2-6a4.6 4.6 0 0 1 0-6.6 4.4 4.4 0 0 1 6.2 0l1 1 1-1a4.4 4.4 0 0 1 6.2 0 4.6 4.6 0 0 1 0 6.6l-6.2 6c-.2.3-.6.4-1 .4Z" />,
rocket: <><path d="M12 3.6c2.8 2.5 4.2 5.7 4.2 9.1v4.5H7.8v-4.5c0-3.4 1.4-6.6 4.2-9.1Z" /><circle cx="12" cy="10.3" r="1.8" /><path d="M7.8 14 5.2 16.6v3.8l2.6-2M16.2 14l2.6 2.6v3.8l-2.6-2" /></>,
sparkles: <><path d="m8.4 3.8 1.1 2.9 2.9 1.1-2.9 1.1-1.1 2.9-1.1-2.9L4.4 7.8l2.9-1.1Z" /><path d="m16.2 12.4.8 2.1 2.1.8-2.1.8-.8 2.1-.8-2.1-2.1-.8 2.1-.8Z" /></>,
lightbulb: <><path d="M9.2 16.4a5.6 5.6 0 1 1 5.6 0v1.8H9.2Z" /><path d="M10 20.6h4" /></>,
/* ---- routine glyphs: what a training day actually is ---- */
// Named after the split or the kit, because that's how people name routines
// ("Push Day", "Leg Day", "Kettlebell") — an award icon says nothing about it.
arm: <><circle cx="7" cy="5.8" r="1.9" /><path d="M7 8.8v4.6l-1.2 6.2M7 11.4l4.4 1.9" /><rect x="12.2" y="10.8" width="2.3" height="5" rx=".9" /><rect x="15.9" y="10.8" width="2.3" height="5" rx=".9" /><path d="M14.5 13.3h1.4" /></>,
abs: <><path d="M7.8 4.4h8.4v10.4a4.2 4.2 0 0 1-8.4 0Z" /><path d="M12 5.4v12M8.2 9h7.6M8.6 12.7h6.8" /></>,
legs: <><path d="M8.4 4.2h7.2" /><path d="M9.9 4.2v4.9l-1.3 4.4.9 6.3M14.1 4.2v4.9l1.3 4.4-.9 6.3" /><path d="M7.7 19.8h2.6M13.7 19.8h2.6" /></>,
pullup: <><path d="M3.6 5.1h16.8M8.5 5.5v2.3M15.5 5.5v2.3" /><circle cx="12" cy="10.5" r="1.9" /><path d="m8.5 7.8 3.5 5 3.5-5M12 13.3v3.9M12 17.2l-2.1 3.2M12 17.2l2.1 3.2" /></>,
kettlebell: <><path d="M9.5 11V9.6a2.5 2.5 0 0 1 5 0V11" /><path d="M14.9 11.8c2.2 1.5 3.6 3.9 3.6 6.4a1.6 1.6 0 0 1-1.6 1.6H7.1a1.6 1.6 0 0 1-1.6-1.6c0-2.5 1.4-4.9 3.6-6.4Z" /></>,
plate: <><circle cx="12" cy="12" r="8.2" /><circle cx="12" cy="12" r="2.7" /></>,
machine: <><path d="M12 3.6v3.1" /><rect x="6.6" y="6.7" width="10.8" height="12.9" rx="1.9" /><path d="M9 10.1h6M9 13.2h6M9 16.3h6" /></>,
bike: <><circle cx="6.2" cy="16.2" r="3.5" /><circle cx="17.8" cy="16.2" r="3.5" /><path d="m6.2 16.2 4.3-7.4h4.9l2.4 7.4M9.3 8.8h4.5M13.8 8.8l-2.6 7.4" /></>,
swim: <><circle cx="8.8" cy="8.2" r="1.8" /><path d="m10.9 10 4.6-2.2 3.3 3.4" /><path d="M3.5 15.6c1.6-1.3 3.1-1.3 4.7 0s3.1 1.3 4.7 0 3.1-1.3 4.7 0c.9.7 1.7.9 2.6.5" /></>,
boxing: <><path d="M7.6 8.6A4.6 4.6 0 0 1 12.2 4h1.6a5.4 5.4 0 0 1 5.4 5.4v2.4a3 3 0 0 1-3 3H7.6Z" /><path d="M7.6 14.8v2.3a2.6 2.6 0 0 0 2.6 2.6h5.2a2.6 2.6 0 0 0 2.6-2.6v-2.3" /><path d="M7.6 9.8H6.3a1.8 1.8 0 0 0 0 3.6h1.3" /></>,
stretch: <><circle cx="14.4" cy="5.4" r="1.9" /><path d="M14.4 8.2c-3 1.4-5 4-5.8 7.4" /><path d="M8.6 15.6 6.2 20M8.6 15.6l4.6 4.4" /><path d="M12.6 9.6 18 12" /></>,
/* ---- actions ---- */
plus: <path d="M12 5.2v13.6M5.2 12h13.6" />,
minus: <path d="M5.2 12h13.6" />,
check: <path d="m4.8 12.6 4.8 4.8L19.2 6.8" />,
checkCircle: <><circle cx="12" cy="12" r="8.2" /><path d="m8.2 12.2 2.7 2.7 5.1-5.4" /></>,
xmark: <path d="M6.2 6.2 17.8 17.8M17.8 6.2 6.2 17.8" />,
pencil: <><path d="M17.1 3.9a2.1 2.1 0 0 1 3 3l-9.9 9.9-4 1 1-4Z" /><path d="m15.1 5.9 3 3" /></>,
trash: <><path d="M4.8 6.6h14.4M9.4 6.6V4.8a1.2 1.2 0 0 1 1.2-1.2h2.8a1.2 1.2 0 0 1 1.2 1.2v1.8" /><path d="M6.6 6.6 7.4 19a1.6 1.6 0 0 0 1.6 1.4h6a1.6 1.6 0 0 0 1.6-1.4l.8-12.4" /><path d="M10.4 10.2v6.4M13.6 10.2v6.4" /></>,
link: <><path d="M10.2 13.8a3.6 3.6 0 0 0 5.4.4l2.6-2.6a3.6 3.6 0 0 0-5.1-5.1l-1.5 1.5" /><path d="M13.8 10.2a3.6 3.6 0 0 0-5.4-.4l-2.6 2.6a3.6 3.6 0 0 0 5.1 5.1l1.5-1.5" /></>,
play: <path d="M8.4 5.6 18 12l-9.6 6.4Z" />,
pause: <path d="M9.4 5.8v12.4M14.6 5.8v12.4" />,
reset: <><path d="M4.4 12a7.6 7.6 0 1 0 2.3-5.4" /><path d="M4 4.4v4.4h4.4" /></>,
bell: <><path d="M6.6 10.4a5.4 5.4 0 0 1 10.8 0c0 4 1.4 5.6 1.4 5.6H5.2s1.4-1.6 1.4-5.6Z" /><path d="M10.1 19.2a2.1 2.1 0 0 0 3.8 0" /></>,
bellSlash: <><path d="M8.1 6.6a5.4 5.4 0 0 1 9.3 3.8c0 4 1.4 5.6 1.4 5.6H9.4M6.6 16H5.2s1.4-1.6 1.4-5.6v-.6" /><path d="M10.1 19.2a2.1 2.1 0 0 0 3.8 0M4 3.6l16 16.8" /></>,
chevronRight: <path d="m9.6 5.6 6.6 6.4-6.6 6.4" />,
chevronLeft: <path d="m14.4 5.6-6.6 6.4 6.6 6.4" />,
chevronDown: <path d="m5.6 9.4 6.4 6.2 6.4-6.2" />,
chevronUp: <path d="m5.6 14.6 6.4-6.2 6.4 6.2" />,
arrowUp: <path d="M12 19.6V4.4M6.2 10.6 12 4.4l5.8 6.2" />,
arrowDown: <path d="M12 4.4v15.2M6.2 13.4 12 19.6l5.8-6.2" />,
expand: <path d="M14.4 4.4h5.2v5.2M9.6 19.6H4.4v-5.2M19.6 4.4 13.8 10.2M4.4 19.6l5.8-5.8" />,
minimize: <path d="M19.6 9.6h-5.2V4.4M4.4 14.4h5.2v5.2M14.4 9.6l5.2-5.2M9.6 14.4l-5.2 5.2" />,
/* ---- objects ---- */
person: <><circle cx="12" cy="8" r="3.8" /><path d="M4.8 20.4a7.2 7.2 0 0 1 14.4 0" /></>,
personCircle: <><circle cx="12" cy="12" r="8.4" /><circle cx="12" cy="10" r="2.9" /><path d="M6.6 18.4a5.8 5.8 0 0 1 10.8 0" /></>,
clipboard: <><rect x="5.4" y="4.8" width="13.2" height="15.8" rx="2.6" /><path d="M9 4.8a1.6 1.6 0 0 1 1.6-1.6h2.8A1.6 1.6 0 0 1 15 4.8v1.4H9Z" /><path d="M9.2 11.6h5.6M9.2 15.2h4" /></>,
list: <path d="M8.4 6.6h11.2M8.4 12h11.2M8.4 17.4h11.2M4.6 6.6h.01M4.6 12h.01M4.6 17.4h.01" />,
folder: <path d="M3.6 7.4a2 2 0 0 1 2-2h3.1l2 2.4h6.7a2 2 0 0 1 2 2v7.8a2 2 0 0 1-2 2H5.6a2 2 0 0 1-2-2Z" />,
globe: <><circle cx="12" cy="12" r="8.2" /><path d="M3.8 12h16.4M12 3.8c2.1 2.2 3.2 5.1 3.2 8.2s-1.1 6-3.2 8.2c-2.1-2.2-3.2-5.1-3.2-8.2s1.1-6 3.2-8.2Z" /></>,
moon: <path d="M19.4 14.2A7.8 7.8 0 0 1 9.8 4.6a8.2 8.2 0 1 0 9.6 9.6Z" />,
sun: <><circle cx="12" cy="12" r="4.4" /><path d="M12 3.6v2M12 18.4v2M20.4 12h-2M5.6 12h-2M17.94 6.06l-1.42 1.42M7.48 16.52l-1.42 1.42M17.94 17.94l-1.42-1.42M7.48 7.48 6.06 6.06" /></>,
key: <><circle cx="8.2" cy="15.8" r="3.8" /><path d="m10.9 13.1 8-8M16.6 7.4l2 2M14.6 9.4l2 2" /></>,
lock: <><rect x="5" y="10.4" width="14" height="10" rx="2.8" /><path d="M8.4 10.4V7.8a3.6 3.6 0 0 1 7.2 0v2.6" /></>,
download: <path d="M12 3.8v11.4M7.6 11.2 12 15.6l4.4-4.4M4.6 19.4h14.8" />,
upload: <path d="M12 15.6V4.2M7.6 8.2 12 3.8l4.4 4.4M4.6 19.4h14.8" />,
wrench: <path d="M15.2 3.9a5 5 0 0 0-4.8 6.6l-6 6a2.1 2.1 0 0 0 3 3l6-6a5 5 0 0 0 6.1-6.3l-2.9 2.9-2.8-.7-.7-2.8Z" />,
// checkered, not a pennant — this marks "finish workout", and a 2×2 grid is
// what reads as a finish line at 16px
flag: <><path d="M6 20.4V4.2" /><path d="M6.4 5.2h13v9.2h-13" /><path d="M12.9 5.2v9.2M6.4 9.8h13" /></>,
chartLine: <path d="M3.6 20.2V4.4M3.6 20.2h16.8M6.4 16.4l3.9-4.8 3.1 2.7 5.2-6.6" />,
dot: <circle cx="12" cy="12" r="4.2" fill="currentColor" stroke="none" />,
history: <><path d="M4.5 12.2a7.6 7.6 0 1 0 2.5-5.6" /><path d="M4.1 4.4v4.3h4.3" /><path d="M12 8.3v4.2l3.1 1.9" /></>,
signOut: <><path d="M14.2 4.6H7a1.9 1.9 0 0 0-1.9 1.9v11a1.9 1.9 0 0 0 1.9 1.9h7.2" /><path d="m16.8 8.4 3.6 3.6-3.6 3.6M20.4 12H10.2" /></>,
shuffle: <><path d="M3.6 7.2h2.9c1.6 0 2.8.9 3.8 2.4l3 4.8c1 1.5 2.2 2.4 3.8 2.4h2.9M3.6 16.8h2.9c1.6 0 2.8-.9 3.8-2.4l.7-1.1M15.6 9.9l.7-1.1c1-1.5 2.2-2.4 3.8-2.4h1.9" /><path d="m17.9 4.3 2.8 2.1-2.8 2.1M17.9 14.7l2.8 2.1-2.8 2.1" /></>,
info: <><circle cx="12" cy="12" r="8.2" /><path d="M12 11v5.4" /><circle cx="12" cy="7.9" r=".9" fill="currentColor" stroke="none" /></>,
}
// A few keys are aliases so call sites can say what they mean.
P.search = P.magnifier
P.settings = P.gear
P.exercises = P.magnifier
P.weight = P.scale
P.streak = P.flame
P.done = P.check
export const ICON_NAMES = Object.keys(P)
/**
* <Icon name="flame" /> — inherits font-size via `1em` sizing
* <Icon name="flame" size={28} /> — explicit pixel size
*/
export default function Icon({ name, size, className = '', style, ...rest }) {
const d = P[name]
if (!d) return null
const s = size ? { width: size, height: size } : null
return (
<svg
className={'icn ' + className}
viewBox="0 0 24 24"
aria-hidden="true"
focusable="false"
style={s ? { ...s, ...style } : style}
{...rest}
>
{d}
</svg>
)
}
+36 -12
View File
@@ -1,14 +1,37 @@
import { useRef, useState } from 'react'
import { useLayoutEffect, useRef, useState } from 'react'
import { fmtNum, fmtDate, MONTHS, isoOf } from '../lib/format.js'
import { t } from '../lib/i18n.js'
const W = 340 // viewBox width; the svg stretches to its container, height comes from `h`
// points: [{ t: ms, y: num, d?: iso }] sorted by t. opts: { h, unit, color, axes, goal }
export default function LineChart({ points, h = 150, unit = '', color = 'var(--acc)', axes = true, goal = null }) {
const svgRef = useRef(null)
const wrapRef = useRef(null)
const tipRef = useRef(null)
const [hover, setHover] = useState(null) // { x, y, iso, v }
// The tooltip is placed after layout, from its measured size, because the chart
// lives in an overflow-clipped box: a fixed half-width offset (what this used to
// do) hangs the label off the edge on the first and last point, and the clip then
// eats it. Reading offsetWidth here also covers translated labels, which are not
// all the same length. Writing straight to the node's style keeps this off the
// render path — hover fires on every mouse move.
useLayoutEffect(() => {
const tip = tipRef.current, wrap = wrapRef.current
if (!hover || !tip || !wrap) return
const cw = wrap.clientWidth, ch = wrap.clientHeight
const tw = tip.offsetWidth, th = tip.offsetHeight
const M = 4 // breathing room against the clip
const cx = hover.x / W * cw, cy = hover.y / h * ch
tip.style.left = Math.max(M, Math.min(cw - tw - M, cx - tw / 2)) + 'px'
// Parked at the top, but dropped below the point when the point sits high
// enough that the label would cover the very value it is reporting.
tip.style.top = (cy < th + 14 ? Math.min(ch - th - M, cy + 14) : M) + 'px'
})
if (!points || points.length === 0) return <div className="empty small">{t('No data yet')}</div>
const W = 340, H = h
const H = h
const P = { l: axes ? 34 : 8, r: 12, t: 10, b: axes ? 22 : 8 }
const single = points.length === 1
const pts = single ? [points[0], points[0]] : points
@@ -30,8 +53,8 @@ export default function LineChart({ points, h = 150, unit = '', color = 'var(--a
for (let v = Math.ceil(ymin / step) * step; v <= ymax + 1e-9; v += step) {
const y = Y(v)
gridlines.push(<g key={'y' + v}>
<line x1={P.l} y1={y} x2={W - P.r} y2={y} stroke="var(--line)" strokeWidth="1" strokeDasharray="2 4" />
<text x={P.l - 5} y={y + 3.5} textAnchor="end" fontSize="9.5" fill="var(--dim)">{fmtNum(v)}</text>
<line x1={P.l} y1={y} x2={W - P.r} y2={y} stroke="var(--sep-op)" strokeWidth="1" strokeDasharray="2 4" />
<text x={P.l - 5} y={y + 3.5} textAnchor="end" fontSize="9.5" fill="var(--label-2)">{fmtNum(v)}</text>
</g>)
}
const d0 = new Date(t0), d1 = new Date(t1)
@@ -49,8 +72,8 @@ export default function LineChart({ points, h = 150, unit = '', color = 'var(--a
if (i % every) return
const x = X(tk.t)
gridlines.push(<g key={'x' + i}>
<line x1={x} y1={P.t} x2={x} y2={H - P.b} stroke="var(--line)" strokeWidth="1" strokeDasharray="2 4" />
<text x={x} y={H - 7} textAnchor={tk.anchor || 'middle'} fontSize="9.5" fill="var(--dim)">{tk.txt}</text>
<line x1={x} y1={P.t} x2={x} y2={H - P.b} stroke="var(--sep-op)" strokeWidth="1" strokeDasharray="2 4" />
<text x={x} y={H - 7} textAnchor={tk.anchor || 'middle'} fontSize="9.5" fill="var(--label-2)">{tk.txt}</text>
</g>)
})
}
@@ -72,8 +95,9 @@ export default function LineChart({ points, h = 150, unit = '', color = 'var(--a
}
return (
<div className="chart-i"
<div className="chart-i" ref={wrapRef}
onMouseMove={onMove} onMouseDown={onMove}
onMouseLeave={() => setHover(null)}
onTouchStart={onMove} onTouchMove={onMove}>
<svg ref={svgRef} viewBox={`0 0 ${W} ${H}`} preserveAspectRatio="none" style={{ aspectRatio: `${W}/${H}` }}>
<defs><linearGradient id={gid} x1="0" y1="0" x2="0" y2="1">
@@ -82,19 +106,19 @@ export default function LineChart({ points, h = 150, unit = '', color = 'var(--a
</linearGradient></defs>
{gridlines}
{goal != null && isFinite(goal) && <>
<line x1={P.l} y1={Y(goal)} x2={W - P.r} y2={Y(goal)} stroke="var(--gold)" strokeWidth="1.6" strokeDasharray="7 4" />
<text x={W - P.r - 2} y={Y(goal) - 5} textAnchor="end" fontSize="9.5" fontWeight="700" fill="var(--gold)">🎯 {fmtNum(goal)}</text>
<line x1={P.l} y1={Y(goal)} x2={W - P.r} y2={Y(goal)} stroke="var(--yellow)" strokeWidth="1.6" strokeDasharray="7 4" />
<text x={W - P.r - 2} y={Y(goal) - 5} textAnchor="end" fontSize="9.5" fontWeight="700" fill="var(--yellow)">{fmtNum(goal)}</text>
</>}
<polygon points={`${P.l},${H - P.b} ${poly} ${X(last.t).toFixed(1)},${H - P.b}`} fill={`url(#${gid})`} />
<polyline points={poly} fill="none" stroke={color} strokeWidth="2.5" strokeLinejoin="round" strokeLinecap="round" />
<circle cx={X(last.t)} cy={Y(last.y)} r="4" fill={color} />
{hover && <g>
<line className="cvl" x1={hover.x} y1={P.t} x2={hover.x} y2={H - P.b} stroke="var(--mut)" strokeWidth="1" strokeDasharray="3 3" />
<line className="chl" x1={P.l} y1={hover.y} x2={W - P.r} y2={hover.y} stroke="var(--mut)" strokeWidth="1" strokeDasharray="3 3" />
<line className="cvl" x1={hover.x} y1={P.t} x2={hover.x} y2={H - P.b} stroke="var(--label-3)" strokeWidth="1" strokeDasharray="3 3" />
<line className="chl" x1={P.l} y1={hover.y} x2={W - P.r} y2={hover.y} stroke="var(--label-3)" strokeWidth="1" strokeDasharray="3 3" />
<circle cx={hover.x} cy={hover.y} r="5" fill={color} stroke="var(--bg)" strokeWidth="2" />
</g>}
</svg>
{hover && <div className="ctip" style={{ left: `calc(${hover.x / W * 100}% - 55px)` }}>
{hover && <div className="ctip" ref={tipRef}>
{fmtDate(hover.iso, true)} · {fmtNum(hover.v)}{unit ? ' ' + unit : ''}
</div>}
</div>
+12 -3
View File
@@ -2,6 +2,7 @@ import { useState } from 'react'
import { imgSrc, gifSrc } from '../lib/exercises.js'
import { useStore } from '../store/useStore.js'
import { t } from '../lib/i18n.js'
import Icon from './Icon.jsx'
// Big autoplaying animation; tap toggles to the still frame. `compact` shrinks it (superset cards).
// Custom exercises have no media — the animation stays blank by design (issue #11).
@@ -18,13 +19,21 @@ export default function Media({ ex, id, compact, minimizable }) {
return (
<div className={'exmedia' + (compact ? ' compact' : '') + (mini ? ' mini' : '')} id={id} onClick={() => setPlaying(p => !p)}>
<img decoding="async" src={playing ? gifSrc(ex) : imgSrc(ex)} alt={ex.n} />
{minimizable && <button className="giftoggle" onClick={toggleSize}>{mini ? '⤢ ' + t('Expand') : '⤡ ' + t('Minimize')}</button>}
{!mini && <span className="gifhint">{playing ? '⏸ ' + t('tap to pause') : '▶ ' + t('tap to play')}</span>}
{minimizable && (
<button className="giftoggle" onClick={toggleSize}>
<Icon name={mini ? 'expand' : 'minimize'} />{mini ? t('Expand') : t('Minimize')}
</button>
)}
{!mini && (
<span className="gifhint">
<Icon name={playing ? 'pause' : 'play'} />{playing ? t('tap to pause') : t('tap to play')}
</span>
)}
</div>
)
}
export function Thumb({ ex }) {
if (!ex.img) return <div className="thumb thumb-x">🏋️</div>
if (!ex.img) return <div className="thumb thumb-x"><Icon name="dumbbell" /></div>
return <img className="thumb" loading="lazy" decoding="async" src={imgSrc(ex)} alt="" />
}
+3 -31
View File
@@ -1,31 +1,3 @@
import { useRef, useState } from 'react'
// Numeric input that accepts "," as decimal separator — iOS decimal keypads in many
// locales only offer a comma, and type="number" reports "" for it (value snaps to 0).
// Keeps a local string draft while focused so partial input like "33," survives typing.
export default function NumField({ value, onChange, decimal = true, ...rest }) {
const [draft, setDraft] = useState(null)
const committed = useRef(null)
// external change (e.g. −/+ buttons) while a draft is showing → drop the draft
if (draft !== null && committed.current !== value) { setDraft(null); committed.current = null }
const commit = raw => {
let s = raw.replace(/,/g, '.').replace(/[^0-9.]/g, '')
const i = s.indexOf('.')
if (i !== -1) s = decimal ? s.slice(0, i + 1) + s.slice(i + 1).replace(/\./g, '') : s.slice(0, i)
const n = s === '' || s === '.' ? 0 : Math.max(0, parseFloat(s))
committed.current = n
setDraft(s)
onChange(n)
}
return (
<input
type="text"
inputMode={decimal ? 'decimal' : 'numeric'}
value={draft ?? (value ?? '')}
onFocus={e => e.target.select()}
onChange={e => commit(e.target.value)}
onBlur={() => { setDraft(null); committed.current = null }}
{...rest}
/>
)
}
// Kept as a module so existing imports keep working — the implementation now
// lives in the shared control set.
export { NumberField as default } from './ui.jsx'
+4 -2
View File
@@ -1,5 +1,7 @@
import { useUI } from '../store/useUI.js'
import { t } from '../lib/i18n.js'
import { Button } from './ui.jsx'
export default function RestTimer() {
const timer = useUI(s => s.timer)
const { addRest, stopRest } = useUI()
@@ -10,8 +12,8 @@ export default function RestTimer() {
<div id="timer">
<div className="t">{m}:{s}</div>
<div className="bar"><i style={{ width: pct + '%' }} /></div>
<button className="btn sm" onClick={() => addRest(15)}>+15s</button>
<button className="btn sm primary" onClick={stopRest}>{t('Skip')}</button>
<Button size="sm" icon="plus" onClick={() => addRest(15)}>15s</Button>
<Button size="sm" variant="primary" onClick={stopRest}>{t('Skip')}</Button>
</div>
)
}
+3 -20
View File
@@ -1,20 +1,3 @@
import NumField from './NumField.jsx'
// Number field with −/+ buttons; tapping the field selects its content so typing replaces.
export default function Stepper({ value, step = 1, onChange, decimal = true, className = '', label }) {
const set = v => onChange(Math.max(0, Math.round((v || 0) * 100) / 100))
const inner = (
<div className={'step ' + className}>
<button onClick={() => set((+value || 0) - step)}>−</button>
<NumField value={value} decimal={decimal} onChange={onChange} />
<button onClick={() => set((+value || 0) + step)}>+</button>
</div>
)
if (!label) return inner
return (
<div>
<div className="small muted" style={{ marginBottom: 5, textAlign: 'center' }}>{label}</div>
{inner}
</div>
)
}
// Kept as a module so existing imports keep working — the implementation now
// lives in the shared control set.
export { Stepper as default } from './ui.jsx'
+11 -13
View File
@@ -3,13 +3,7 @@ import { useStore } from '../store/useStore.js'
import { effectiveRoutine } from '../lib/history.js'
import { todayISO } from '../lib/format.js'
import { t } from '../lib/i18n.js'
const ICONS = {
home: <path d="M3 10.5 12 3l9 7.5M5 9.5V21h14V9.5" />,
plan: <><rect x="3" y="5" width="18" height="16" rx="2" /><path d="M8 3v4M16 3v4M3 11h18" /></>,
stats: <path d="M4 20V10M10 20V4M16 20v-8M22 20H2" />,
library: <><circle cx="11" cy="11" r="7" /><path d="m21 21-4.3-4.3" /></>
}
import Icon from './Icon.jsx'
export default function TabBar({ onStart }) {
const nav = useNavigate()
@@ -28,18 +22,22 @@ export default function TabBar({ onStart }) {
}
nav('/workout')
}
const Icon = ({ k }) => <svg viewBox="0 0 24 24">{ICONS[k]}</svg>
const Tab = ({ k, icon, to, label }) => (
<button className={on(k) ? 'on' : ''} onClick={() => nav(to)}>
<Icon name={icon} /><span>{label}</span>
</button>
)
return (
<nav id="tabbar">
<button className={on('home') ? 'on' : ''} onClick={() => nav('/home')}><Icon k="home" /><span>{t('Home')}</span></button>
<button className={on('plan') ? 'on' : ''} onClick={() => nav('/plan')}><Icon k="plan" /><span>{t('Plan')}</span></button>
<Tab k="home" icon="house" to="/home" label={t('Home')} />
<Tab k="plan" icon="calendar" to="/plan" label={t('Plan')} />
<button className={'start' + (S.active ? ' rec' : '')} onClick={startWorkout}>
<span className="cir"><svg viewBox="0 0 24 24"><path d="M6.5 6.5v11M17.5 6.5v11M2.5 9.5v5M21.5 9.5v5M6.5 12h11" /></svg></span>
<span className="cir"><Icon name={S.active ? 'play' : 'dumbbell'} /></span>
<span>{S.active ? t('Resume') : t('Start')}</span>
</button>
<button className={on('stats') ? 'on' : ''} onClick={() => nav('/stats')}><Icon k="stats" /><span>{t('Stats')}</span></button>
<button className={on('library') ? 'on' : ''} onClick={() => nav('/library')}><Icon k="library" /><span>{t('Exercises')}</span></button>
<Tab k="stats" icon="chart" to="/stats" label={t('Stats')} />
<Tab k="library" icon="list" to="/library" label={t('Exercises')} />
</nav>
)
}
+293
View File
@@ -0,0 +1,293 @@
// openGym control set.
//
// Every input in the app is built here rather than styled on top of a native
// widget. Native controls are the single loudest "unfinished" tell: a checkbox
// renders blue on iOS and grey on Android, a range slider paints its own white
// track that no theme reaches, and a <select> opens a system list that ignores
// dark mode entirely. Rebuilding them means one visual language and one focus
// treatment across every platform.
//
// Shared rules:
// · every control is driven by (value, onChange) — no internal source of truth
// · hit targets are ≥44px even when the painted control is smaller
// · :active gives a scale/tint response so touch feels acknowledged
// · focus-visible draws a ring; pointer interaction never does
import { useRef, useState, useEffect, useCallback, forwardRef } from 'react'
import Icon from './Icon.jsx'
/* ============================ text ============================ */
// Numeric input accepting "," as decimal separator — iOS decimal keypads in many
// locales only offer a comma, and type="number" reports "" for it (value snaps to
// 0). Keeps a local string draft while focused so partial input like "33," survives.
export function NumberField({ value, onChange, decimal = true, className = '', ...rest }) {
const [draft, setDraft] = useState(null)
const committed = useRef(null)
if (draft !== null && committed.current !== value) { setDraft(null); committed.current = null }
const commit = raw => {
let s = raw.replace(/,/g, '.').replace(/[^0-9.]/g, '')
const i = s.indexOf('.')
if (i !== -1) s = decimal ? s.slice(0, i + 1) + s.slice(i + 1).replace(/\./g, '') : s.slice(0, i)
const n = s === '' || s === '.' ? 0 : Math.max(0, parseFloat(s))
committed.current = n
setDraft(s)
onChange(n)
}
return (
<input
type="text"
inputMode={decimal ? 'decimal' : 'numeric'}
className={'num ' + className}
value={draft ?? (value ?? '')}
onFocus={e => e.target.select()}
onChange={e => commit(e.target.value)}
onBlur={() => { setDraft(null); committed.current = null }}
{...rest}
/>
)
}
// forwardRef so callers can focus it or read its value imperatively
export const TextField = forwardRef(function TextField({ className = '', ...rest }, ref) {
return <input ref={ref} className={'field ' + className} {...rest} />
})
export function TextArea({ className = '', ...rest }) {
return <textarea className={'field area ' + className} {...rest} />
}
export function SearchField({ value, onChange, onClear, ...rest }) {
return (
<div className="searchf">
<Icon name="magnifier" className="lead" />
<input className="field" value={value} onChange={onChange} {...rest} />
{!!value && (
<button className="clear" onClick={onClear} aria-label="Clear">
<Icon name="xmark" />
</button>
)}
</div>
)
}
/* ============================ switch ============================ */
export function Switch({ checked, onChange, disabled }) {
return (
<button
role="switch"
aria-checked={!!checked}
disabled={disabled}
className={'sw' + (checked ? ' on' : '')}
onClick={() => onChange(!checked)}
>
<span className="knob" />
</button>
)
}
/* ============================ segmented ============================ */
// options: [{ value, label, icon? }] — the selected pill slides between cells.
export function Segmented({ options, value, onChange, className = '' }) {
const i = Math.max(0, options.findIndex(o => o.value === value))
return (
<div className={'seg ' + className} style={{ '--n': options.length, '--i': i }}>
<span className="seg-sel" aria-hidden="true" />
{options.map(o => (
<button
key={o.value}
className={o.value === value ? 'on' : ''}
aria-pressed={o.value === value}
onClick={() => onChange(o.value)}
>
{o.icon && <Icon name={o.icon} />}
{o.label && <span>{o.label}</span>}
</button>
))}
</div>
)
}
/* ============================ stepper ============================ */
export function Stepper({ value, step = 1, onChange, decimal = true, className = '', label, unit }) {
const set = v => onChange(Math.max(0, Math.round((v || 0) * 100) / 100))
const inner = (
<div className={'stp ' + className}>
<button onClick={() => set((+value || 0) - step)} aria-label="Decrease"><Icon name="minus" /></button>
<span className="val">
<NumberField value={value} decimal={decimal} onChange={onChange} />
{unit && <i>{unit}</i>}
</span>
<button onClick={() => set((+value || 0) + step)} aria-label="Increase"><Icon name="plus" /></button>
</div>
)
if (!label) return inner
return <div className="stp-w"><span className="stp-l">{label}</span>{inner}</div>
}
/* ============================ slider ============================ */
// Pointer-driven so the fill, track and thumb are all ours — no ::-webkit-*
// pseudo-elements, which is the only way the control looks identical on every
// platform and can pick up the accent colour.
export function Slider({ value, min = 0, max = 100, step = 1, onChange, className = '' }) {
const ref = useRef(null)
const [drag, setDrag] = useState(false)
const pct = Math.min(100, Math.max(0, ((value - min) / (max - min)) * 100))
const posToValue = useCallback(clientX => {
const el = ref.current
if (!el) return value
const r = el.getBoundingClientRect()
const f = Math.min(1, Math.max(0, (clientX - r.left) / r.width))
const raw = min + f * (max - min)
const snapped = Math.round(raw / step) * step
// step can be fractional (0.1) — round away binary noise
return Math.min(max, Math.max(min, Math.round(snapped * 1000) / 1000))
}, [min, max, step, value])
useEffect(() => {
if (!drag) return
const move = e => {
e.preventDefault()
onChange(posToValue(e.touches ? e.touches[0].clientX : e.clientX))
}
const up = () => setDrag(false)
window.addEventListener('pointermove', move)
window.addEventListener('pointerup', up)
window.addEventListener('pointercancel', up)
return () => {
window.removeEventListener('pointermove', move)
window.removeEventListener('pointerup', up)
window.removeEventListener('pointercancel', up)
}
}, [drag, onChange, posToValue])
const key = e => {
const d = e.key === 'ArrowRight' || e.key === 'ArrowUp' ? step
: e.key === 'ArrowLeft' || e.key === 'ArrowDown' ? -step : 0
if (!d) return
e.preventDefault()
onChange(Math.min(max, Math.max(min, Math.round((value + d) * 1000) / 1000)))
}
return (
<div
ref={ref}
className={'sld' + (drag ? ' dragging' : '') + ' ' + className}
role="slider"
tabIndex={0}
aria-valuenow={value} aria-valuemin={min} aria-valuemax={max}
data-nodrag /* keeps the sheet from swipe-dismissing */
onKeyDown={key}
onPointerDown={e => { e.currentTarget.setPointerCapture?.(e.pointerId); setDrag(true); onChange(posToValue(e.clientX)) }}
>
<span className="sld-track"><span className="sld-fill" style={{ width: pct + '%' }} /></span>
<span className="sld-knob" style={{ left: pct + '%' }} />
</div>
)
}
/* ============================ checkbox ============================ */
export function Check({ checked, onChange, className = '', size }) {
return (
<button
role="checkbox"
aria-checked={!!checked}
className={'chk' + (checked ? ' on' : '') + ' ' + className}
style={size ? { width: size, height: size } : null}
onClick={() => onChange(!checked)}
>
<Icon name="check" />
</button>
)
}
/* ============================ grouped list ============================ */
// The inset-grouped list is the app's main structural primitive: a titled
// section holding rows separated by hairlines that stop short of the leading
// edge, so the icon column reads as a continuous rail.
export function Section({ title, footer, children, className = '' }) {
return (
<section className={'sect ' + className}>
{title && <h2 className="sect-t">{title}</h2>}
<div className="sect-b">{children}</div>
{footer && <p className="sect-f">{footer}</p>}
</section>
)
}
export function Row({ icon, iconTint, title, subtitle, value, accessory = 'none', onClick, danger, children, className = '' }) {
const Tag = onClick ? 'button' : 'div'
return (
<Tag className={'lrow' + (onClick ? ' tap' : '') + (danger ? ' danger' : '') + ' ' + className} onClick={onClick}>
{icon && <span className="lrow-i" style={iconTint ? { '--tint': iconTint } : null}><Icon name={icon} /></span>}
<span className="lrow-m">
<span className="lrow-t">{title}</span>
{subtitle && <span className="lrow-s">{subtitle}</span>}
</span>
{children}
{value != null && <span className="lrow-v">{value}</span>}
{accessory === 'chevron' && <Icon name="chevronRight" className="lrow-c" />}
{accessory === 'check' && <Icon name="check" className="lrow-k" />}
</Tag>
)
}
/* ============================ picker ============================ */
// Replaces <select>. A native select opens a system list that ignores the app's
// theme entirely — on dark mode it flashes a white sheet — and can't show more
// than a bare label per option. This opens our own sheet with a checkmark on the
// current value, which is also how iOS itself handles a long option list.
export function SelectRow({ icon, iconTint, title, value, options, onChange, sheetTitle }) {
const cur = options.find(o => o.value === value)
const open = () => {
const { openSheet } = require_ui()
const h = openSheet(close => (
<>
<h3>{sheetTitle || title}</h3>
<div className="sect-b">
{options.map(o => (
<button key={o.value} className="lrow tap" onClick={() => { close(); onChange(o.value) }}>
<span className="lrow-m"><span className="lrow-t">{o.label}</span>
{o.subtitle && <span className="lrow-s">{o.subtitle}</span>}</span>
{o.value === value && <Icon name="check" className="lrow-k" />}
</button>
))}
</div>
<div style={{ height: 8 }} />
</>
))
return h
}
return (
<Row icon={icon} iconTint={iconTint} title={title} value={cur ? cur.label : value} accessory="chevron" onClick={open} />
)
}
// Late import keeps this module free of a cycle at load time (useUI pulls in the
// store, which pulls in helpers that import controls).
let _ui = null
export function bindUI(store) { _ui = store }
function require_ui() {
if (!_ui) throw new Error('ui store not bound — call bindUI(useUI) once at boot')
return _ui.getState()
}
/* ============================ buttons ============================ */
export function Button({ variant = 'plain', size, icon, trailingIcon, children, className = '', ...rest }) {
return (
<button className={`btn ${variant}${size ? ' ' + size : ''} ${className}`} {...rest}>
{icon && <Icon name={icon} />}
{children && <span>{children}</span>}
{trailingIcon && <Icon name={trailingIcon} />}
</button>
)
}
+722 -302
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -35,4 +35,4 @@ export function weekKey(d) {
export const localTZ = () => { try { return Intl.DateTimeFormat().resolvedOptions().timeZone || 'UTC' } catch { return 'UTC' } }
export const uid = () => Date.now().toString(36) + Math.random().toString(36).slice(2, 7)
export const ACCENTS = { lime: '#a3e635', sky: '#38bdf8', orange: '#fb923c', violet: '#a78bfa', pink: '#f472b6', red: '#f87171', teal: '#2dd4bf', gold: '#fbbf24' }
export const ACCENTS = { lime: '#30d158', sky: '#0a84ff', orange: '#ff9f0a', violet: '#bf5af2', pink: '#ff375f', red: '#ff453a', teal: '#40c8e0', gold: '#ffd60a' }
+49
View File
@@ -0,0 +1,49 @@
// Routine glyphs.
//
// Routines used to store a literal emoji in `r.emoji` ('💪', '🦵', …). The
// redesign stores an icon key instead, but the field keeps its name so existing
// synced state stays readable by both builds — no migration, no lost routines.
//
// glyphOf() accepts either form: a known icon key passes through, a legacy emoji
// is mapped, and anything unrecognised falls back to the default.
import { ICON_NAMES } from '../components/Icon.jsx'
export const DEFAULT_GLYPH = 'figureStrength'
// The picker offers glyphs that describe a TRAINING DAY — the split, the kit, or
// the kind of session. The first version offered trophy/medal/crown/flag/star,
// which say how a workout went, not what it is; nobody names a routine "crown".
// Grouped, because 20 loose icons is a wall — you scan the group first.
export const GLYPH_GROUPS = [
{ key: 'Strength', items: ['figureStrength', 'arm', 'abs', 'legs', 'pullup'] },
{ key: 'Equipment', items: ['dumbbell', 'barbell', 'kettlebell', 'plate', 'machine'] },
{ key: 'Cardio', items: ['figureRun', 'bike', 'swim', 'boxing', 'timer'] },
{ key: 'Recovery', items: ['stretch', 'moon', 'heart', 'flame', 'bolt'] },
]
export const GLYPHS = GLYPH_GROUPS.flatMap(g => g.items)
// Legacy emoji → icon key, so routines created before the redesign keep a
// sensible glyph instead of all collapsing onto the default.
const LEGACY = {
'💪': 'arm', '🦾': 'arm', '🫸': 'figureStrength', '🫷': 'pullup',
'🏋️': 'dumbbell', '🏋': 'dumbbell', '🏋️‍♀️': 'dumbbell',
'🦵': 'legs', '🍑': 'legs',
'🔥': 'flame', '⚡': 'bolt', '💥': 'bolt', '🧨': 'bolt', '😤': 'flame',
'🏃': 'figureRun', '🏃‍♀️': 'figureRun', '🚴': 'bike', '🏊': 'swim',
'🤸': 'stretch', '🧘': 'stretch', '🧘‍♀️': 'stretch',
'🥊': 'boxing', '🧗': 'pullup', '⛰️': 'figureRun', '🏔️': 'figureRun', '🚀': 'bolt',
'🎯': 'target', '🏆': 'trophy', '🥇': 'medal', '⭐': 'star', '🌟': 'star',
'👑': 'crown', '🛡️': 'shield', '⚔️': 'shield', '❤️‍🔥': 'heart',
'🦍': 'kettlebell', '🐂': 'barbell', '🐻': 'kettlebell', '🦁': 'boxing',
'🐺': 'figureRun', '🦈': 'swim', '🤖': 'machine',
}
export function glyphOf(v) {
if (!v) return DEFAULT_GLYPH
if (ICON_NAMES.includes(v)) return v
if (LEGACY[v]) return LEGACY[v]
// strip variation selectors / ZWJ sequences and retry the base emoji
const base = [...v].filter(c => c !== '️' && c !== '‍')[0]
return LEGACY[base] || DEFAULT_GLYPH
}
+42 -34
View File
@@ -46,16 +46,16 @@ export default {
'June': 'Juni', 'July': 'Juli', 'August': 'August', 'September': 'September',
'October': 'Oktober', 'November': 'November', 'December': 'Dezember',
// --- body weight & goal ---
'Quick check-in ⚖️': 'Kurzer Check-in ⚖️',
'Quick check-in': 'Kurzer Check-in',
'Log body weight': 'Körpergewicht eintragen',
'Slide or tap to set your weight — tracked before every workout so your curve stays honest.': 'Schieben oder tippen, um dein Gewicht zu setzen — vor jedem Training erfasst, damit deine Kurve ehrlich bleibt.',
'Save & start workout': 'Speichern & Training starten',
'Skip today': 'Heute überspringen',
'↺ Choose a different workout': '↺ Anderes Training wählen',
'Choose a different workout': 'Anderes Training wählen',
'Recent weigh-ins': 'Letzte Messungen',
'Enter a valid weight': 'Gib ein gültiges Gewicht ein',
'Weight saved ✓': 'Gewicht gespeichert ✓',
'Target weight 🎯': 'Zielgewicht 🎯',
'Weight saved': 'Gewicht gespeichert',
'Target weight': 'Zielgewicht',
'Your goal is drawn as a line through the weight charts, and gains/losses are colored by whether they move toward it.': 'Dein Ziel wird als Linie in den Gewichts-Charts angezeigt, und Zu-/Abnahmen werden danach eingefärbt, ob sie darauf zusteuern.',
'Save goal': 'Ziel speichern',
'Goal set: {0}': 'Ziel gesetzt: {0}',
@@ -63,18 +63,18 @@ export default {
'Goal removed': 'Ziel entfernt',
'Remove goal': 'Ziel entfernen',
'Body weight': 'Körpergewicht',
'reached! 🎉': 'erreicht! 🎉',
'reached!': 'erreicht!',
'{0} to gain': 'noch {0} zunehmen',
'{0} to lose': 'noch {0} abnehmen',
"No entries yet — log your weight to start the curve. It's also asked before every workout.": 'Noch keine Einträge — trag dein Gewicht ein, um die Kurve zu starten. Es wird auch vor jedem Training abgefragt.',
// --- exercise detail / picker / config ---
'Best:': 'Bestwert:',
'+ Add to my plan': '+ Zu meinem Plan',
'Add to my plan': 'Zu meinem Plan',
'How to': 'Ausführung',
'instructions in English': 'Anleitung auf Englisch',
'New routine': 'Neue Routine',
'Add “{0}”': '„{0}“ hinzufügen',
'“{0}” added to {1} ✓': '„{0}“ zu {1} hinzugefügt ✓',
'“{0}” added to {1}': '„{0}“ zu {1} hinzugefügt',
'Pick a routine — sets, reps & weight come next.': 'Wähle eine Routine — Sätze, Wiederholungen & Gewicht kommen gleich.',
'{0} exercises': '{0} Übungen',
'already in': 'schon drin',
@@ -83,7 +83,7 @@ export default {
'Search {0} exercises…': '{0} Übungen durchsuchen…',
'Chosen': 'Gewählt',
'Nothing chosen yet — add exercises and they’ll show up here.': 'Noch nichts gewählt — füge Übungen hinzu, dann erscheinen sie hier.',
'No match 🤷': 'Kein Treffer 🤷',
'No match': 'Kein Treffer',
'Show more': 'Mehr anzeigen',
'Intervals': 'Intervalle',
'Minutes': 'Minuten',
@@ -93,11 +93,11 @@ export default {
'Weight ({0})': 'Gewicht ({0})',
'Add to routine': 'Zur Routine hinzufügen',
'Remove exercise': 'Übung entfernen',
'Pick an emoji': 'Emoji auswählen',
'Pick an icon': 'Symbol auswählen',
// --- day planning / calendar ---
'Back to weekly plan': 'Zurück zum Wochenplan',
'{0} set to rest': '{0} als Pausentag gesetzt',
'{0} planned for {1} ✓': '{0} für {1} geplant ✓',
'{0} planned for {1}': '{0} für {1} geplant',
'Weekly plan:': 'Wochenplan:',
'changed for this day': 'für diesen Tag geändert',
'Sick, missed a day or want a different session? Pick what to train instead.': 'Krank, Tag verpasst oder Lust auf was anderes? Wähle, was du stattdessen trainierst.',
@@ -121,23 +121,23 @@ export default {
'Confirm the weight you worked with — your highest becomes the default next time.': 'Bestätige das Gewicht, mit dem du trainiert hast — dein höchstes wird beim nächsten Mal vorausgefüllt.',
'Then finish the superset partner.': 'Dann den Supersatz-Partner abschliessen.',
'Previous best:': 'Bisheriger Bestwert:',
'new record! 🏆': 'neuer Rekord! 🏆',
'Save ✓': 'Speichern ✓',
'Save & next exercise ›': 'Speichern & nächste Übung ›',
'new record!': 'neuer Rekord!',
'Save': 'Speichern',
'Save & next exercise': 'Speichern & nächste Übung',
'Just close': 'Nur schliessen',
'Save weight': 'Gewicht speichern',
'Tracked — next time starts at {0} 📈': 'Gespeichert — nächstes Mal startest du bei {0} 📈',
'Tracked — next time starts at {0}': 'Gespeichert — nächstes Mal startest du bei {0}',
"That's the whole workout!": 'Das war das ganze Training!',
'Every exercise done — great work. Finish up, or keep going and add another exercise.': 'Alle Übungen geschafft — stark! Schliesse ab oder mach weiter und füge eine Übung hinzu.',
'Finish workout 🏁': 'Training beenden 🏁',
'Finish workout': 'Training beenden',
'Continue workout': 'Weitertrainieren',
'Keep going 💪 — tap “+ Add exercise” below': 'Weiter so 💪 — tippe unten auf „+ Übung hinzufügen“',
'Keep going — tap “+ Add exercise” below': 'Weiter so — tippe unten auf „+ Übung hinzufügen“',
'Workout complete!': 'Training abgeschlossen!',
'Duration': 'Dauer',
'Volume': 'Volumen',
'PRs': 'Rekorde',
'New PR:': 'Neuer Rekord:',
'Nice! 💪': 'Stark! 💪',
'Nice!': 'Stark!',
'Nothing logged yet': 'Noch nichts eingetragen',
'You haven’t checked off any sets. Finish the workout anyway?': 'Du hast noch keine Sätze abgehakt. Training trotzdem beenden?',
'Finish anyway': 'Trotzdem beenden',
@@ -158,10 +158,10 @@ export default {
'Duration (min)': 'Dauer (min)',
'Last time': 'Letztes Mal',
'Last time you hit all reps — try {0}': 'Letztes Mal alle Wdh. geschafft — versuch {0}',
'Weights bumped to {0} 💪': 'Gewichte auf {0} erhöht 💪',
'Weights bumped to {0}': 'Gewichte auf {0} erhöht',
'Remove set': 'Satz entfernen',
'Add set': 'Satz hinzufügen',
'Cardio logged 🏃': 'Cardio eingetragen 🏃',
'Cardio logged': 'Cardio eingetragen',
'Discard workout?': 'Training verwerfen?',
'The sets you logged in this session will be lost.': 'Die in dieser Einheit eingetragenen Sätze gehen verloren.',
'Superset {0} / {1}': 'Supersatz {0} / {1}',
@@ -169,13 +169,13 @@ export default {
'Superset · do these back-to-back, rest after both': 'Supersatz · direkt nacheinander, Pause erst danach',
'Freestyle workout — add your first exercise.': 'Freies Training — füge deine erste Übung hinzu.',
'Finish workout early · {0} exercises': 'Training vorzeitig beenden · {0} Übungen',
'Rest over — next set! 💪': 'Pause vorbei — nächster Satz! 💪',
'Rest over — next set!': 'Pause vorbei — nächster Satz!',
// --- home ---
'Hi {0} 💪': 'Hi {0} 💪',
'Hi {0}': 'Hi {0}',
'This week': 'Diese Woche',
'{0} — in progress': '{0} — läuft',
'Resume ▶': 'Weiter ▶',
'Welcome! 👋': 'Willkommen! 👋',
'Welcome!': 'Willkommen!',
'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Richte deinen Wochenplan ein — oder lade einen fertigen Push-/Pull-/Beine-Plan.',
'Load starter plan (PPL)': 'Starterplan laden (PPL)',
'Build my own plan': 'Eigenen Plan erstellen',
@@ -194,7 +194,7 @@ export default {
'Exercise progress': 'Übungs-Fortschritt',
'Top speed per workout': 'Top-Tempo pro Training',
'Best set weight per workout': 'Bestes Satzgewicht pro Training',
'Finish your first workout to see progress curves here. 📈': 'Schliess dein erstes Training ab, um hier Fortschrittskurven zu sehen. 📈',
'Finish your first workout to see progress curves here.': 'Schliess dein erstes Training ab, um hier Fortschrittskurven zu sehen.',
'Recent workouts': 'Letzte Trainings',
'Less time': 'Weniger',
'More time': 'Mehr',
@@ -209,7 +209,7 @@ export default {
// --- routine edit ---
'Superset with exercise above': 'Supersatz mit der Übung darüber',
'No exercises yet — add your first one.': 'Noch keine Übungen — füge deine erste hinzu.',
'Tip: tap 🔗 on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Tipp: Tippe bei einer Übung auf 🔗, um sie mit der darüber zum Supersatz zu verbinden — du machst sie direkt nacheinander.',
'Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Tippe bei einer Übung auf die Verknüpfen-Taste, um sie mit der darüber zum Supersatz zu verbinden — du machst sie direkt nacheinander.',
'Delete routine?': 'Routine löschen?',
'“{0}” and its exercises will be removed.': '„{0}“ und ihre Übungen werden entfernt.',
'Delete routine': 'Routine löschen',
@@ -220,13 +220,13 @@ export default {
'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Starterplan geladen — Mo Push · Mi Pull · Fr Beine',
// --- login / account ---
'Enter a name': 'Gib einen Namen ein',
'Profile created — data from this device moved into it ✓': 'Profil erstellt — Daten von diesem Gerät wurden übernommen ✓',
'Profile created — data moved into it ✓': 'Profil erstellt — Daten übernommen ✓',
'Welcome, {0} 💪': 'Willkommen, {0} 💪',
'Welcome back, {0} 💪': 'Willkommen zurück, {0} 💪',
'Profile created — data from this device moved into it': 'Profil erstellt — Daten von diesem Gerät wurden übernommen',
'Profile created — data moved into it': 'Profil erstellt — Daten übernommen',
'Welcome, {0}': 'Willkommen, {0}',
'Welcome back, {0}': 'Willkommen zurück, {0}',
'Registration failed': 'Registrierung fehlgeschlagen',
'Sign-in failed': 'Anmeldung fehlgeschlagen',
'Create your profile ✨': 'Erstelle dein Profil ✨',
'Create your profile': 'Erstelle dein Profil',
'Pick a name, then confirm with {0}. The passkey is saved in your device — no password needed.': 'Wähle einen Namen und bestätige mit {0}. Der Passkey wird auf deinem Gerät gespeichert — kein Passwort nötig.',
'Pick a name, then confirm with your device.': 'Wähle einen Namen und bestätige mit deinem Gerät.',
'Your name': 'Dein Name',
@@ -268,10 +268,10 @@ export default {
'Deletes your plan, workouts and body weight on this device. This cannot be undone.': 'Löscht Plan, Trainings und Körpergewicht auf diesem Gerät. Das kann nicht rückgängig gemacht werden.',
'Delete everything': 'Alles löschen',
'All data reset': 'Alle Daten zurückgesetzt',
'Backup exported ✓': 'Backup exportiert ✓',
'Backup exported': 'Backup exportiert',
'Import backup?': 'Backup importieren?',
'This replaces all current data with the backup file.': 'Das ersetzt alle aktuellen Daten durch die Backup-Datei.',
'Backup imported ✓': 'Backup importiert ✓',
'Backup imported': 'Backup importiert',
'Import failed: {0}': 'Import fehlgeschlagen: {0}',
'Tip': 'Tipp',
'In Chrome: ⋮ menu → Add to Home screen': 'In Chrome: ⋮-Menü → Zum Startbildschirm hinzufügen',
@@ -292,7 +292,7 @@ export default {
'Test sent — should arrive any second': 'Test gesendet — sollte jeden Moment ankommen',
'Test failed': 'Test fehlgeschlagen',
'Notifications off': 'Benachrichtigungen aus',
'Notifications on 🔔': 'Benachrichtigungen an 🔔',
'Notifications on': 'Benachrichtigungen an',
'Could not change notification settings': 'Benachrichtigungs-Einstellungen konnten nicht geändert werden',
// --- media ---
'tap to pause': 'Tippen zum Pausieren',
@@ -302,6 +302,14 @@ export default {
'lower legs': 'Unterschenkel', 'neck': 'Nacken', 'shoulders': 'Schultern',
'upper arms': 'Oberarme', 'upper legs': 'Oberschenkel', 'waist': 'Rumpf',
// --- data terms: equipment ---
'Details': 'Details',
'Finish': 'Beenden',
'Start {0}': '{0} starten',
'Guest mode — data lives only in this browser.': 'Gastmodus — die Daten liegen nur in diesem Browser.',
'Keeps your data safe and separate per person.': 'Hält deine Daten sicher und pro Person getrennt.',
'Strength': 'Kraft',
'Equipment': 'Geräte',
'Recovery': 'Erholung',
'Any equipment': 'Alle Geräte',
'assisted': 'assistiert', 'band': 'Band', 'barbell': 'Langhantel', 'body weight': 'Körpergewicht',
'bosu ball': 'Bosu-Ball', 'cable': 'Kabelzug', 'dumbbell': 'Kurzhantel',
@@ -339,11 +347,11 @@ export default {
'Give it a name': 'Gib ihr einen Namen',
'Pick a body part': 'Wähle eine Körperpartie',
'“{0}” already exists': '„{0}“ existiert bereits',
'“{0}” created ✓': '„{0}“ erstellt ✓',
'“{0}” created': '„{0}“ erstellt',
'Cardio exercises log time + speed instead of weight × reps.': 'Cardio-Übungen erfassen Zeit + Tempo statt Gewicht × Wdh.',
'custom': 'eigene',
'Edit': 'Bearbeiten',
'Saved ✓': 'Gespeichert ✓',
'Saved': 'Gespeichert',
'Delete “{0}”?': '„{0}“ löschen?',
'It will be removed from your routines. Already-logged workouts keep their sets.': 'Sie wird aus deinen Routinen entfernt. Bereits geloggte Workouts behalten ihre Sätze.',
'Exercise deleted': 'Übung gelöscht',
+42 -34
View File
@@ -43,16 +43,16 @@ export default {
'January': 'Enero', 'February': 'Febrero', 'March': 'Marzo', 'April': 'Abril',
'June': 'Junio', 'July': 'Julio', 'August': 'Agosto', 'September': 'Septiembre',
'October': 'Octubre', 'November': 'Noviembre', 'December': 'Diciembre',
'Quick check-in ⚖️': 'Chequeo rápido ⚖️',
'Quick check-in': 'Chequeo rápido',
'Log body weight': 'Registrar peso corporal',
'Slide or tap to set your weight — tracked before every workout so your curve stays honest.': 'Desliza o toca para fijar tu peso — se registra antes de cada entrenamiento para que tu curva sea honesta.',
'Save & start workout': 'Guardar y empezar',
'Skip today': 'Saltar hoy',
'↺ Choose a different workout': '↺ Elegir otro entrenamiento',
'Choose a different workout': 'Elegir otro entrenamiento',
'Recent weigh-ins': 'Pesajes recientes',
'Enter a valid weight': 'Introduce un peso válido',
'Weight saved ✓': 'Peso guardado ✓',
'Target weight 🎯': 'Peso objetivo 🎯',
'Weight saved': 'Peso guardado',
'Target weight': 'Peso objetivo',
'Your goal is drawn as a line through the weight charts, and gains/losses are colored by whether they move toward it.': 'Tu meta se dibuja como una línea en las gráficas de peso, y las subidas/bajadas se colorean según se acerquen a ella.',
'Save goal': 'Guardar meta',
'Goal set: {0}': 'Meta fijada: {0}',
@@ -60,17 +60,17 @@ export default {
'Goal removed': 'Meta eliminada',
'Remove goal': 'Eliminar meta',
'Body weight': 'Peso corporal',
'reached! 🎉': '¡conseguido! 🎉',
'reached!': '¡conseguido!',
'{0} to gain': '{0} por ganar',
'{0} to lose': '{0} por perder',
"No entries yet — log your weight to start the curve. It's also asked before every workout.": 'Sin registros aún — apunta tu peso para empezar la curva. También se pide antes de cada entrenamiento.',
'Best:': 'Mejor:',
'+ Add to my plan': '+ Añadir a mi plan',
'Add to my plan': 'Añadir a mi plan',
'How to': 'Cómo hacerlo',
'instructions in English': 'instrucciones en inglés',
'New routine': 'Nueva rutina',
'Add “{0}”': 'Añadir «{0}»',
'“{0}” added to {1} ✓': '«{0}» añadido a {1} ✓',
'“{0}” added to {1}': '«{0}» añadido a {1}',
'Pick a routine — sets, reps & weight come next.': 'Elige una rutina — series, repeticiones y peso vienen después.',
'{0} exercises': '{0} ejercicios',
'already in': 'ya incluido',
@@ -79,7 +79,7 @@ export default {
'Search {0} exercises…': 'Buscar entre {0} ejercicios…',
'Chosen': 'Elegidos',
'Nothing chosen yet — add exercises and they’ll show up here.': 'Nada elegido aún — añade ejercicios y aparecerán aquí.',
'No match 🤷': 'Sin resultados 🤷',
'No match': 'Sin resultados',
'Show more': 'Mostrar más',
'Intervals': 'Intervalos',
'Minutes': 'Minutos',
@@ -89,10 +89,10 @@ export default {
'Weight ({0})': 'Peso ({0})',
'Add to routine': 'Añadir a la rutina',
'Remove exercise': 'Quitar ejercicio',
'Pick an emoji': 'Elige un emoji',
'Pick an icon': 'Elige un icono',
'Back to weekly plan': 'Volver al plan semanal',
'{0} set to rest': '{0} marcado como descanso',
'{0} planned for {1} ✓': '{0} planificado para {1} ✓',
'{0} planned for {1}': '{0} planificado para {1}',
'Weekly plan:': 'Plan semanal:',
'changed for this day': 'cambiado para este día',
'Sick, missed a day or want a different session? Pick what to train instead.': '¿Enfermo, te saltaste un día o quieres otra sesión? Elige qué entrenar en su lugar.',
@@ -115,23 +115,23 @@ export default {
'Confirm the weight you worked with — your highest becomes the default next time.': 'Confirma el peso con el que trabajaste — el más alto será el predeterminado la próxima vez.',
'Then finish the superset partner.': 'Luego termina el otro ejercicio de la superserie.',
'Previous best:': 'Mejor anterior:',
'new record! 🏆': '¡nuevo récord! 🏆',
'Save ✓': 'Guardar ✓',
'Save & next exercise ›': 'Guardar y siguiente ejercicio ›',
'new record!': '¡nuevo récord!',
'Save': 'Guardar',
'Save & next exercise': 'Guardar y siguiente ejercicio',
'Just close': 'Solo cerrar',
'Save weight': 'Guardar peso',
'Tracked — next time starts at {0} 📈': 'Registrado — la próxima vez empiezas en {0} 📈',
'Tracked — next time starts at {0}': 'Registrado — la próxima vez empiezas en {0}',
"That's the whole workout!": '¡Ese era todo el entrenamiento!',
'Every exercise done — great work. Finish up, or keep going and add another exercise.': 'Todos los ejercicios hechos — ¡buen trabajo! Termina, o sigue y añade otro ejercicio.',
'Finish workout 🏁': 'Terminar entrenamiento 🏁',
'Finish workout': 'Terminar entrenamiento',
'Continue workout': 'Continuar entrenamiento',
'Keep going 💪 — tap “+ Add exercise” below': 'Sigue así 💪 — toca «+ Añadir ejercicio» abajo',
'Keep going — tap “+ Add exercise” below': 'Sigue así — toca «+ Añadir ejercicio» abajo',
'Workout complete!': '¡Entrenamiento completado!',
'Duration': 'Duración',
'Volume': 'Volumen',
'PRs': 'Récords',
'New PR:': 'Nuevo récord:',
'Nice! 💪': '¡Genial! 💪',
'Nice!': '¡Genial!',
'Nothing logged yet': 'Nada registrado aún',
'You haven’t checked off any sets. Finish the workout anyway?': 'No has marcado ninguna serie. ¿Terminar el entrenamiento igualmente?',
'Finish anyway': 'Terminar igualmente',
@@ -151,10 +151,10 @@ export default {
'Duration (min)': 'Duración (min)',
'Last time': 'La última vez',
'Last time you hit all reps — try {0}': 'La última vez completaste todas las reps — prueba {0}',
'Weights bumped to {0} 💪': 'Pesos subidos a {0} 💪',
'Weights bumped to {0}': 'Pesos subidos a {0}',
'Remove set': 'Quitar serie',
'Add set': 'Añadir serie',
'Cardio logged 🏃': 'Cardio registrado 🏃',
'Cardio logged': 'Cardio registrado',
'Discard workout?': '¿Descartar entrenamiento?',
'The sets you logged in this session will be lost.': 'Las series registradas en esta sesión se perderán.',
'Superset {0} / {1}': 'Superserie {0} / {1}',
@@ -162,12 +162,12 @@ export default {
'Superset · do these back-to-back, rest after both': 'Superserie · hazlos seguidos, descansa después de ambos',
'Freestyle workout — add your first exercise.': 'Entrenamiento libre — añade tu primer ejercicio.',
'Finish workout early · {0} exercises': 'Terminar antes · {0} ejercicios',
'Rest over — next set! 💪': '¡Descanso terminado — siguiente serie! 💪',
'Hi {0} 💪': 'Hola {0} 💪',
'Rest over — next set!': '¡Descanso terminado — siguiente serie!',
'Hi {0}': 'Hola {0}',
'This week': 'Esta semana',
'{0} — in progress': '{0} — en curso',
'Resume ▶': 'Seguir ▶',
'Welcome! 👋': '¡Bienvenido! 👋',
'Welcome!': '¡Bienvenido!',
'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Configura tu rutina semanal para empezar — o carga un plan Push / Pull / Piernas ya hecho.',
'Load starter plan (PPL)': 'Cargar plan inicial (PPL)',
'Build my own plan': 'Crear mi propio plan',
@@ -185,7 +185,7 @@ export default {
'Exercise progress': 'Progreso por ejercicio',
'Top speed per workout': 'Velocidad máxima por entrenamiento',
'Best set weight per workout': 'Mejor peso por entrenamiento',
'Finish your first workout to see progress curves here. 📈': 'Termina tu primer entrenamiento para ver curvas de progreso aquí. 📈',
'Finish your first workout to see progress curves here.': 'Termina tu primer entrenamiento para ver curvas de progreso aquí.',
'Recent workouts': 'Entrenamientos recientes',
'Less time': 'Menos',
'More time': 'Más',
@@ -198,7 +198,7 @@ export default {
'Load starter plan (Push / Pull / Legs)': 'Cargar plan inicial (Push / Pull / Piernas)',
'Superset with exercise above': 'Superserie con el ejercicio de arriba',
'No exercises yet — add your first one.': 'Aún no hay ejercicios — añade el primero.',
'Tip: tap 🔗 on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Consejo: toca 🔗 en un ejercicio para hacer superserie con el de arriba — los harás seguidos.',
'Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Toca el botón de enlace en un ejercicio para hacer superserie con el de arriba — los harás seguidos.',
'Delete routine?': '¿Eliminar rutina?',
'“{0}” and its exercises will be removed.': '«{0}» y sus ejercicios se eliminarán.',
'Delete routine': 'Eliminar rutina',
@@ -207,13 +207,13 @@ export default {
'No workouts yet.': 'Aún no hay entrenamientos.',
'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Plan inicial cargado — Lun Push · Mié Pull · Vie Piernas',
'Enter a name': 'Introduce un nombre',
'Profile created — data from this device moved into it ✓': 'Perfil creado — los datos de este dispositivo se han movido a él ✓',
'Profile created — data moved into it ✓': 'Perfil creado — datos movidos a él ✓',
'Welcome, {0} 💪': 'Bienvenido, {0} 💪',
'Welcome back, {0} 💪': 'Bienvenido de nuevo, {0} 💪',
'Profile created — data from this device moved into it': 'Perfil creado — los datos de este dispositivo se han movido a él',
'Profile created — data moved into it': 'Perfil creado — datos movidos a él',
'Welcome, {0}': 'Bienvenido, {0}',
'Welcome back, {0}': 'Bienvenido de nuevo, {0}',
'Registration failed': 'Registro fallido',
'Sign-in failed': 'Inicio de sesión fallido',
'Create your profile ✨': 'Crea tu perfil ✨',
'Create your profile': 'Crea tu perfil',
'Pick a name, then confirm with {0}. The passkey is saved in your device — no password needed.': 'Elige un nombre y confirma con {0}. La passkey se guarda en tu dispositivo — sin contraseñas.',
'Pick a name, then confirm with your device.': 'Elige un nombre y confirma con tu dispositivo.',
'Your name': 'Tu nombre',
@@ -254,10 +254,10 @@ export default {
'Deletes your plan, workouts and body weight on this device. This cannot be undone.': 'Elimina tu plan, entrenamientos y peso corporal en este dispositivo. No se puede deshacer.',
'Delete everything': 'Eliminar todo',
'All data reset': 'Todos los datos restablecidos',
'Backup exported ✓': 'Copia exportada ✓',
'Backup exported': 'Copia exportada',
'Import backup?': '¿Importar copia?',
'This replaces all current data with the backup file.': 'Esto sustituye todos los datos actuales por el archivo de copia.',
'Backup imported ✓': 'Copia importada ✓',
'Backup imported': 'Copia importada',
'Import failed: {0}': 'Importación fallida: {0}',
'Tip': 'Consejo',
'In Chrome: ⋮ menu → Add to Home screen': 'En Chrome: menú ⋮ → Añadir a pantalla de inicio',
@@ -278,13 +278,21 @@ export default {
'Test sent — should arrive any second': 'Prueba enviada — debería llegar en segundos',
'Test failed': 'Prueba fallida',
'Notifications off': 'Notificaciones desactivadas',
'Notifications on 🔔': 'Notificaciones activadas 🔔',
'Notifications on': 'Notificaciones activadas',
'Could not change notification settings': 'No se pudo cambiar la configuración de notificaciones',
'tap to pause': 'toca para pausar',
'tap to play': 'toca para reproducir',
'back': 'espalda', 'cardio': 'cardio', 'chest': 'pecho', 'lower arms': 'antebrazos',
'lower legs': 'pantorrillas', 'neck': 'cuello', 'shoulders': 'hombros',
'upper arms': 'brazos', 'upper legs': 'piernas', 'waist': 'abdomen',
'Details': 'Detalles',
'Finish': 'Terminar',
'Start {0}': 'Empezar {0}',
'Guest mode — data lives only in this browser.': 'Modo invitado: los datos solo viven en este navegador.',
'Keeps your data safe and separate per person.': 'Mantiene tus datos seguros y separados por persona.',
'Strength': 'Fuerza',
'Equipment': 'Equipo',
'Recovery': 'Recuperación',
'Any equipment': 'Cualquier equipo',
'assisted': 'asistido', 'band': 'banda', 'barbell': 'barra', 'body weight': 'peso corporal',
'bosu ball': 'bosu', 'cable': 'polea', 'dumbbell': 'mancuerna',
@@ -321,11 +329,11 @@ export default {
'Give it a name': 'Ponle un nombre',
'Pick a body part': 'Elige una parte del cuerpo',
'“{0}” already exists': '«{0}» ya existe',
'“{0}” created ✓': '«{0}» creado ✓',
'“{0}” created': '«{0}» creado',
'Cardio exercises log time + speed instead of weight × reps.': 'Los ejercicios de cardio registran tiempo + velocidad en vez de peso × reps.',
'custom': 'propio',
'Edit': 'Editar',
'Saved ✓': 'Guardado ✓',
'Saved': 'Guardado',
'Delete “{0}”?': '¿Eliminar «{0}»?',
'It will be removed from your routines. Already-logged workouts keep their sets.': 'Se quitará de tus rutinas. Los entrenamientos ya registrados conservan sus series.',
'Exercise deleted': 'Ejercicio eliminado',
+42 -34
View File
@@ -43,16 +43,16 @@ export default {
'January': 'Janvier', 'February': 'Février', 'March': 'Mars', 'April': 'Avril',
'June': 'Juin', 'July': 'Juillet', 'August': 'Août', 'September': 'Septembre',
'October': 'Octobre', 'November': 'Novembre', 'December': 'Décembre',
'Quick check-in ⚖️': 'Pesée rapide ⚖️',
'Quick check-in': 'Pesée rapide',
'Log body weight': 'Noter le poids corporel',
'Slide or tap to set your weight — tracked before every workout so your curve stays honest.': 'Glisse ou tape pour régler ton poids — noté avant chaque séance pour que ta courbe reste honnête.',
'Save & start workout': 'Enregistrer et démarrer',
'Skip today': "Passer aujourd'hui",
'↺ Choose a different workout': '↺ Choisir une autre séance',
'Choose a different workout': 'Choisir une autre séance',
'Recent weigh-ins': 'Pesées récentes',
'Enter a valid weight': 'Entre un poids valide',
'Weight saved ✓': 'Poids enregistré ✓',
'Target weight 🎯': 'Poids cible 🎯',
'Weight saved': 'Poids enregistré',
'Target weight': 'Poids cible',
'Your goal is drawn as a line through the weight charts, and gains/losses are colored by whether they move toward it.': "Ton objectif apparaît comme une ligne sur les graphiques de poids, et les variations sont colorées selon qu'elles s'en rapprochent.",
'Save goal': "Enregistrer l'objectif",
'Goal set: {0}': 'Objectif fixé : {0}',
@@ -60,17 +60,17 @@ export default {
'Goal removed': 'Objectif supprimé',
'Remove goal': "Supprimer l'objectif",
'Body weight': 'Poids corporel',
'reached! 🎉': 'atteint ! 🎉',
'reached!': 'atteint !',
'{0} to gain': '{0} à prendre',
'{0} to lose': '{0} à perdre',
"No entries yet — log your weight to start the curve. It's also asked before every workout.": "Aucune entrée — note ton poids pour démarrer la courbe. Il est aussi demandé avant chaque séance.",
'Best:': 'Record :',
'+ Add to my plan': '+ Ajouter à mon plan',
'Add to my plan': 'Ajouter à mon plan',
'How to': 'Exécution',
'instructions in English': 'instructions en anglais',
'New routine': 'Nouvelle routine',
'Add “{0}”': 'Ajouter « {0} »',
'“{0}” added to {1} ✓': '« {0} » ajouté à {1} ✓',
'“{0}” added to {1}': '« {0} » ajouté à {1}',
'Pick a routine — sets, reps & weight come next.': 'Choisis une routine — séries, répétitions et poids viennent ensuite.',
'{0} exercises': '{0} exercices',
'already in': 'déjà dedans',
@@ -79,7 +79,7 @@ export default {
'Search {0} exercises…': 'Rechercher parmi {0} exercices…',
'Chosen': 'Choisis',
'Nothing chosen yet — add exercises and they’ll show up here.': 'Rien de choisi — ajoute des exercices et ils apparaîtront ici.',
'No match 🤷': 'Aucun résultat 🤷',
'No match': 'Aucun résultat',
'Show more': 'Afficher plus',
'Intervals': 'Intervalles',
'Minutes': 'Minutes',
@@ -89,10 +89,10 @@ export default {
'Weight ({0})': 'Poids ({0})',
'Add to routine': 'Ajouter à la routine',
'Remove exercise': "Retirer l'exercice",
'Pick an emoji': 'Choisis un emoji',
'Pick an icon': 'Choisis une icône',
'Back to weekly plan': 'Retour au plan hebdo',
'{0} set to rest': '{0} passé en repos',
'{0} planned for {1} ✓': '{0} prévu pour {1} ✓',
'{0} planned for {1}': '{0} prévu pour {1}',
'Weekly plan:': 'Plan hebdo :',
'changed for this day': 'modifié pour ce jour',
'Sick, missed a day or want a different session? Pick what to train instead.': 'Malade, jour manqué ou envie d’autre chose ? Choisis quoi entraîner à la place.',
@@ -115,23 +115,23 @@ export default {
'Confirm the weight you worked with — your highest becomes the default next time.': 'Confirme le poids utilisé — le plus élevé devient la valeur par défaut la prochaine fois.',
'Then finish the superset partner.': 'Puis termine le partenaire du superset.',
'Previous best:': 'Ancien record :',
'new record! 🏆': 'nouveau record ! 🏆',
'Save ✓': 'Enregistrer ✓',
'Save & next exercise ›': 'Enregistrer et exercice suivant ›',
'new record!': 'nouveau record !',
'Save': 'Enregistrer',
'Save & next exercise': 'Enregistrer et exercice suivant',
'Just close': 'Juste fermer',
'Save weight': 'Enregistrer le poids',
'Tracked — next time starts at {0} 📈': 'Noté — la prochaine fois tu démarres à {0} 📈',
'Tracked — next time starts at {0}': 'Noté — la prochaine fois tu démarres à {0}',
"That's the whole workout!": 'C’était toute la séance !',
'Every exercise done — great work. Finish up, or keep going and add another exercise.': 'Tous les exercices faits — bravo ! Termine, ou continue et ajoute un exercice.',
'Finish workout 🏁': 'Terminer la séance 🏁',
'Finish workout': 'Terminer la séance',
'Continue workout': 'Continuer la séance',
'Keep going 💪 — tap “+ Add exercise” below': 'Continue 💪 — tape « + Ajouter un exercice » en bas',
'Keep going — tap “+ Add exercise” below': 'Continue — tape « + Ajouter un exercice » en bas',
'Workout complete!': 'Séance terminée !',
'Duration': 'Durée',
'Volume': 'Volume',
'PRs': 'Records',
'New PR:': 'Nouveau record :',
'Nice! 💪': 'Bien joué ! 💪',
'Nice!': 'Bien joué !',
'Nothing logged yet': 'Rien de noté',
'You haven’t checked off any sets. Finish the workout anyway?': 'Tu n’as coché aucune série. Terminer la séance quand même ?',
'Finish anyway': 'Terminer quand même',
@@ -151,10 +151,10 @@ export default {
'Duration (min)': 'Durée (min)',
'Last time': 'La dernière fois',
'Last time you hit all reps — try {0}': 'Toutes les reps réussies la dernière fois — essaie {0}',
'Weights bumped to {0} 💪': 'Poids montés à {0} 💪',
'Weights bumped to {0}': 'Poids montés à {0}',
'Remove set': 'Retirer une série',
'Add set': 'Ajouter une série',
'Cardio logged 🏃': 'Cardio noté 🏃',
'Cardio logged': 'Cardio noté',
'Discard workout?': 'Abandonner la séance ?',
'The sets you logged in this session will be lost.': 'Les séries notées dans cette session seront perdues.',
'Superset {0} / {1}': 'Superset {0} / {1}',
@@ -162,12 +162,12 @@ export default {
'Superset · do these back-to-back, rest after both': 'Superset · enchaîne-les, repos après les deux',
'Freestyle workout — add your first exercise.': 'Séance libre — ajoute ton premier exercice.',
'Finish workout early · {0} exercises': 'Terminer plus tôt · {0} exercices',
'Rest over — next set! 💪': 'Repos fini — série suivante ! 💪',
'Hi {0} 💪': 'Salut {0} 💪',
'Rest over — next set!': 'Repos fini — série suivante !',
'Hi {0}': 'Salut {0}',
'This week': 'Cette semaine',
'{0} — in progress': '{0} — en cours',
'Resume ▶': 'Reprendre ▶',
'Welcome! 👋': 'Bienvenue ! 👋',
'Welcome!': 'Bienvenue !',
'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Configure ta routine hebdo pour commencer — ou charge un plan Push / Pull / Jambes tout prêt.',
'Load starter plan (PPL)': 'Charger le plan de départ (PPL)',
'Build my own plan': 'Créer mon propre plan',
@@ -185,7 +185,7 @@ export default {
'Exercise progress': 'Progression par exercice',
'Top speed per workout': 'Vitesse max par séance',
'Best set weight per workout': 'Meilleur poids par séance',
'Finish your first workout to see progress curves here. 📈': 'Termine ta première séance pour voir tes courbes de progression ici. 📈',
'Finish your first workout to see progress curves here.': 'Termine ta première séance pour voir tes courbes de progression ici.',
'Recent workouts': 'Séances récentes',
'Less time': 'Moins',
'More time': 'Plus',
@@ -198,7 +198,7 @@ export default {
'Load starter plan (Push / Pull / Legs)': 'Charger le plan de départ (Push / Pull / Jambes)',
'Superset with exercise above': "Superset avec l'exercice au-dessus",
'No exercises yet — add your first one.': 'Aucun exercice — ajoute le premier.',
'Tip: tap 🔗 on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Astuce : tape 🔗 sur un exercice pour le mettre en superset avec celui au-dessus — tu les feras enchaînés.',
'Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Appuie sur le bouton de liaison d’un exercice pour le mettre en superset avec celui au-dessus — tu les enchaîneras.',
'Delete routine?': 'Supprimer la routine ?',
'“{0}” and its exercises will be removed.': '« {0} » et ses exercices seront supprimés.',
'Delete routine': 'Supprimer la routine',
@@ -207,13 +207,13 @@ export default {
'No workouts yet.': 'Aucune séance pour l’instant.',
'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Plan de départ chargé — Lun Push · Mer Pull · Ven Jambes',
'Enter a name': 'Entre un nom',
'Profile created — data from this device moved into it ✓': 'Profil créé — les données de cet appareil y ont été transférées ✓',
'Profile created — data moved into it ✓': 'Profil créé — données transférées ✓',
'Welcome, {0} 💪': 'Bienvenue, {0} 💪',
'Welcome back, {0} 💪': 'Content de te revoir, {0} 💪',
'Profile created — data from this device moved into it': 'Profil créé — les données de cet appareil y ont été transférées',
'Profile created — data moved into it': 'Profil créé — données transférées',
'Welcome, {0}': 'Bienvenue, {0}',
'Welcome back, {0}': 'Content de te revoir, {0}',
'Registration failed': 'Échec de l’inscription',
'Sign-in failed': 'Échec de la connexion',
'Create your profile ✨': 'Crée ton profil ✨',
'Create your profile': 'Crée ton profil',
'Pick a name, then confirm with {0}. The passkey is saved in your device — no password needed.': 'Choisis un nom, puis confirme avec {0}. La passkey est enregistrée sur ton appareil — pas de mot de passe.',
'Pick a name, then confirm with your device.': 'Choisis un nom, puis confirme avec ton appareil.',
'Your name': 'Ton nom',
@@ -254,10 +254,10 @@ export default {
'Deletes your plan, workouts and body weight on this device. This cannot be undone.': 'Supprime ton plan, tes séances et ton poids corporel sur cet appareil. Irréversible.',
'Delete everything': 'Tout supprimer',
'All data reset': 'Toutes les données réinitialisées',
'Backup exported ✓': 'Sauvegarde exportée ✓',
'Backup exported': 'Sauvegarde exportée',
'Import backup?': 'Importer la sauvegarde ?',
'This replaces all current data with the backup file.': 'Cela remplace toutes les données actuelles par le fichier de sauvegarde.',
'Backup imported ✓': 'Sauvegarde importée ✓',
'Backup imported': 'Sauvegarde importée',
'Import failed: {0}': 'Échec de l’import : {0}',
'Tip': 'Astuce',
'In Chrome: ⋮ menu → Add to Home screen': 'Dans Chrome : menu ⋮ → Ajouter à l’écran d’accueil',
@@ -278,13 +278,21 @@ export default {
'Test sent — should arrive any second': 'Test envoyé — il devrait arriver d’une seconde à l’autre',
'Test failed': 'Échec du test',
'Notifications off': 'Notifications désactivées',
'Notifications on 🔔': 'Notifications activées 🔔',
'Notifications on': 'Notifications activées',
'Could not change notification settings': 'Impossible de modifier les réglages de notification',
'tap to pause': 'toucher pour mettre en pause',
'tap to play': 'toucher pour lire',
'back': 'dos', 'cardio': 'cardio', 'chest': 'pectoraux', 'lower arms': 'avant-bras',
'lower legs': 'mollets', 'neck': 'cou', 'shoulders': 'épaules',
'upper arms': 'bras', 'upper legs': 'cuisses', 'waist': 'abdos',
'Details': 'Détails',
'Finish': 'Terminer',
'Start {0}': 'Commencer {0}',
'Guest mode — data lives only in this browser.': 'Mode invité — les données ne vivent que dans ce navigateur.',
'Keeps your data safe and separate per person.': 'Garde tes données en sécurité et séparées par personne.',
'Strength': 'Force',
'Equipment': 'Équipement',
'Recovery': 'Récupération',
'Any equipment': 'Tout équipement',
'assisted': 'assisté', 'band': 'élastique', 'barbell': 'barre', 'body weight': 'poids du corps',
'bosu ball': 'bosu', 'cable': 'poulie', 'dumbbell': 'haltère',
@@ -321,11 +329,11 @@ export default {
'Give it a name': 'Donnez-lui un nom',
'Pick a body part': 'Choisissez une partie du corps',
'“{0}” already exists': '« {0} » existe déjà',
'“{0}” created ✓': '« {0} » créé ✓',
'“{0}” created': '« {0} » créé',
'Cardio exercises log time + speed instead of weight × reps.': 'Les exercices cardio enregistrent temps + vitesse au lieu de poids × reps.',
'custom': 'perso',
'Edit': 'Modifier',
'Saved ✓': 'Enregistré ✓',
'Saved': 'Enregistré',
'Delete “{0}”?': 'Supprimer « {0} » ?',
'It will be removed from your routines. Already-logged workouts keep their sets.': 'Il sera retiré de vos routines. Les séances déjà enregistrées gardent leurs séries.',
'Exercise deleted': 'Exercice supprimé',
+42 -34
View File
@@ -43,16 +43,16 @@ export default {
'January': 'जनवरी', 'February': 'फ़रवरी', 'March': 'मार्च', 'April': 'अप्रैल',
'June': 'जून', 'July': 'जुलाई', 'August': 'अगस्त', 'September': 'सितंबर',
'October': 'अक्टूबर', 'November': 'नवंबर', 'December': 'दिसंबर',
'Quick check-in ⚖️': 'झटपट वज़न चेक ⚖️',
'Quick check-in': 'झटपट वज़न चेक',
'Log body weight': 'शरीर का वज़न दर्ज करें',
'Slide or tap to set your weight — tracked before every workout so your curve stays honest.': 'वज़न सेट करने के लिए स्लाइड या टैप करें — हर वर्कआउट से पहले दर्ज होता है ताकि आपका ग्राफ़ सही रहे।',
'Save & start workout': 'सहेजें और वर्कआउट शुरू करें',
'Skip today': 'आज छोड़ें',
'↺ Choose a different workout': '↺ दूसरा वर्कआउट चुनें',
'Choose a different workout': 'दूसरा वर्कआउट चुनें',
'Recent weigh-ins': 'हाल के वज़न',
'Enter a valid weight': 'सही वज़न दर्ज करें',
'Weight saved ✓': 'वज़न सहेजा गया ✓',
'Target weight 🎯': 'लक्ष्य वज़न 🎯',
'Weight saved': 'वज़न सहेजा गया',
'Target weight': 'लक्ष्य वज़न',
'Your goal is drawn as a line through the weight charts, and gains/losses are colored by whether they move toward it.': 'आपका लक्ष्य वज़न चार्ट में एक रेखा के रूप में दिखता है, और बढ़त/घटत को इस आधार पर रंगा जाता है कि वे लक्ष्य की ओर जा रहे हैं या नहीं।',
'Save goal': 'लक्ष्य सहेजें',
'Goal set: {0}': 'लक्ष्य सेट: {0}',
@@ -60,17 +60,17 @@ export default {
'Goal removed': 'लक्ष्य हटाया गया',
'Remove goal': 'लक्ष्य हटाएँ',
'Body weight': 'शरीर का वज़न',
'reached! 🎉': 'पूरा हुआ! 🎉',
'reached!': 'पूरा हुआ!',
'{0} to gain': '{0} बढ़ाना बाकी',
'{0} to lose': '{0} घटाना बाकी',
"No entries yet — log your weight to start the curve. It's also asked before every workout.": 'अभी कोई एंट्री नहीं — ग्राफ़ शुरू करने के लिए वज़न दर्ज करें। हर वर्कआउट से पहले भी पूछा जाता है।',
'Best:': 'सर्वश्रेष्ठ:',
'+ Add to my plan': '+ मेरी योजना में जोड़ें',
'Add to my plan': 'मेरी योजना में जोड़ें',
'How to': 'कैसे करें',
'instructions in English': 'निर्देश अंग्रेज़ी में',
'New routine': 'नया रूटीन',
'Add “{0}”': '"{0}" जोड़ें',
'“{0}” added to {1} ✓': '"{0}" को {1} में जोड़ा गया ✓',
'“{0}” added to {1}': '"{0}" को {1} में जोड़ा गया',
'Pick a routine — sets, reps & weight come next.': 'एक रूटीन चुनें — सेट, रेप्स और वज़न आगे आते हैं।',
'{0} exercises': '{0} व्यायाम',
'already in': 'पहले से है',
@@ -79,7 +79,7 @@ export default {
'Search {0} exercises…': '{0} व्यायामों में खोजें…',
'Chosen': 'चुने हुए',
'Nothing chosen yet — add exercises and they’ll show up here.': 'अभी कुछ नहीं चुना — व्यायाम जोड़ें तो वे यहाँ दिखेंगे।',
'No match 🤷': 'कोई परिणाम नहीं 🤷',
'No match': 'कोई परिणाम नहीं',
'Show more': 'और दिखाएँ',
'Intervals': 'इंटरवल',
'Minutes': 'मिनट',
@@ -89,10 +89,10 @@ export default {
'Weight ({0})': 'वज़न ({0})',
'Add to routine': 'रूटीन में जोड़ें',
'Remove exercise': 'व्यायाम हटाएँ',
'Pick an emoji': 'इमोजी चुनें',
'Pick an icon': 'आइकन चुनें',
'Back to weekly plan': 'साप्ताहिक योजना पर वापस',
'{0} set to rest': '{0} आराम के लिए सेट',
'{0} planned for {1} ✓': '{0} को {1} के लिए तय किया ✓',
'{0} planned for {1}': '{0} को {1} के लिए तय किया',
'Weekly plan:': 'साप्ताहिक योजना:',
'changed for this day': 'इस दिन के लिए बदला गया',
'Sick, missed a day or want a different session? Pick what to train instead.': 'बीमार हैं, दिन छूट गया या कुछ और करना है? चुनें कि इसके बदले क्या ट्रेन करें।',
@@ -115,23 +115,23 @@ export default {
'Confirm the weight you worked with — your highest becomes the default next time.': 'जिस वज़न से काम किया उसकी पुष्टि करें — सबसे ज़्यादा वज़न अगली बार डिफ़ॉल्ट बन जाएगा।',
'Then finish the superset partner.': 'फिर सुपरसेट का दूसरा व्यायाम पूरा करें।',
'Previous best:': 'पिछला सर्वश्रेष्ठ:',
'new record! 🏆': 'नया रिकॉर्ड! 🏆',
'Save ✓': 'सहेजें ✓',
'Save & next exercise ›': 'सहेजें और अगला व्यायाम ›',
'new record!': 'नया रिकॉर्ड!',
'Save': 'सहेजें',
'Save & next exercise': 'सहेजें और अगला व्यायाम',
'Just close': 'बस बंद करें',
'Save weight': 'वज़न सहेजें',
'Tracked — next time starts at {0} 📈': 'दर्ज हुआ — अगली बार {0} से शुरू होगा 📈',
'Tracked — next time starts at {0}': 'दर्ज हुआ — अगली बार {0} से शुरू होगा',
"That's the whole workout!": 'पूरा वर्कआउट हो गया!',
'Every exercise done — great work. Finish up, or keep going and add another exercise.': 'सारे व्यायाम पूरे — बढ़िया काम! समाप्त करें, या जारी रखें और एक और व्यायाम जोड़ें।',
'Finish workout 🏁': 'वर्कआउट समाप्त करें 🏁',
'Finish workout': 'वर्कआउट समाप्त करें',
'Continue workout': 'वर्कआउट जारी रखें',
'Keep going 💪 — tap “+ Add exercise” below': 'जारी रखें 💪 — नीचे "+ व्यायाम जोड़ें" पर टैप करें',
'Keep going — tap “+ Add exercise” below': 'जारी रखें — नीचे "+ व्यायाम जोड़ें" पर टैप करें',
'Workout complete!': 'वर्कआउट पूरा!',
'Duration': 'अवधि',
'Volume': 'वॉल्यूम',
'PRs': 'रिकॉर्ड',
'New PR:': 'नया रिकॉर्ड:',
'Nice! 💪': 'बहुत बढ़िया! 💪',
'Nice!': 'बहुत बढ़िया!',
'Nothing logged yet': 'अभी कुछ दर्ज नहीं',
'You haven’t checked off any sets. Finish the workout anyway?': 'आपने कोई सेट चेक नहीं किया। फिर भी वर्कआउट समाप्त करें?',
'Finish anyway': 'फिर भी समाप्त करें',
@@ -151,10 +151,10 @@ export default {
'Duration (min)': 'अवधि (मिनट)',
'Last time': 'पिछली बार',
'Last time you hit all reps — try {0}': 'पिछली बार सारे रेप्स पूरे किए — {0} आज़माएँ',
'Weights bumped to {0} 💪': 'वज़न बढ़ाकर {0} किया 💪',
'Weights bumped to {0}': 'वज़न बढ़ाकर {0} किया',
'Remove set': 'सेट हटाएँ',
'Add set': 'सेट जोड़ें',
'Cardio logged 🏃': 'कार्डियो दर्ज हुआ 🏃',
'Cardio logged': 'कार्डियो दर्ज हुआ',
'Discard workout?': 'वर्कआउट छोड़ें?',
'The sets you logged in this session will be lost.': 'इस सत्र में दर्ज किए सेट खो जाएँगे।',
'Superset {0} / {1}': 'सुपरसेट {0} / {1}',
@@ -162,12 +162,12 @@ export default {
'Superset · do these back-to-back, rest after both': 'सुपरसेट · इन्हें लगातार करें, दोनों के बाद आराम',
'Freestyle workout — add your first exercise.': 'फ्रीस्टाइल वर्कआउट — पहला व्यायाम जोड़ें।',
'Finish workout early · {0} exercises': 'जल्दी समाप्त करें · {0} व्यायाम',
'Rest over — next set! 💪': 'आराम खत्म — अगला सेट! 💪',
'Hi {0} 💪': 'नमस्ते {0} 💪',
'Rest over — next set!': 'आराम खत्म — अगला सेट!',
'Hi {0}': 'नमस्ते {0}',
'This week': 'इस हफ़्ते',
'{0} — in progress': '{0} — चल रहा है',
'Resume ▶': 'जारी रखें ▶',
'Welcome! 👋': 'स्वागत है! 👋',
'Welcome!': 'स्वागत है!',
'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'शुरू करने के लिए अपना साप्ताहिक रूटीन बनाएँ — या बना-बनाया पुश / पुल / लेग्स प्लान लोड करें।',
'Load starter plan (PPL)': 'स्टार्टर प्लान लोड करें (PPL)',
'Build my own plan': 'अपनी योजना बनाएँ',
@@ -185,7 +185,7 @@ export default {
'Exercise progress': 'व्यायाम की प्रगति',
'Top speed per workout': 'हर वर्कआउट की अधिकतम गति',
'Best set weight per workout': 'हर वर्कआउट का सर्वश्रेष्ठ सेट वज़न',
'Finish your first workout to see progress curves here. 📈': 'प्रगति ग्राफ़ देखने के लिए पहला वर्कआउट पूरा करें। 📈',
'Finish your first workout to see progress curves here.': 'प्रगति ग्राफ़ देखने के लिए पहला वर्कआउट पूरा करें।',
'Recent workouts': 'हाल के वर्कआउट',
'Less time': 'कम',
'More time': 'ज़्यादा',
@@ -198,7 +198,7 @@ export default {
'Load starter plan (Push / Pull / Legs)': 'स्टार्टर प्लान लोड करें (पुश / पुल / लेग्स)',
'Superset with exercise above': 'ऊपर वाले व्यायाम के साथ सुपरसेट',
'No exercises yet — add your first one.': 'अभी कोई व्यायाम नहीं — पहला जोड़ें।',
'Tip: tap 🔗 on an exercise to superset it with the one above — you’ll do them back-to-back.': 'सुझाव: किसी व्यायाम पर 🔗 टैप करें ताकि वह ऊपर वाले के साथ सुपरसेट बने — आप इन्हें लगातार करेंगे।',
'Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.': 'किसी व्यायाम पर लिंक बटन दबाएँ ताकि वह ऊपर वाले के साथ सुपरसेट बने — आप उन्हें लगातार करेंगे।',
'Delete routine?': 'रूटीन हटाएँ?',
'“{0}” and its exercises will be removed.': '"{0}" और उसके व्यायाम हटा दिए जाएँगे।',
'Delete routine': 'रूटीन हटाएँ',
@@ -207,13 +207,13 @@ export default {
'No workouts yet.': 'अभी कोई वर्कआउट नहीं।',
'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'स्टार्टर प्लान लोड हुआ — सोम पुश · बुध पुल · शुक्र लेग्स',
'Enter a name': 'नाम दर्ज करें',
'Profile created — data from this device moved into it ✓': 'प्रोफ़ाइल बनी — इस डिवाइस का डेटा उसमें चला गया ✓',
'Profile created — data moved into it ✓': 'प्रोफ़ाइल बनी — डेटा स्थानांतरित ✓',
'Welcome, {0} 💪': 'स्वागत है, {0} 💪',
'Welcome back, {0} 💪': 'वापसी पर स्वागत है, {0} 💪',
'Profile created — data from this device moved into it': 'प्रोफ़ाइल बनी — इस डिवाइस का डेटा उसमें चला गया',
'Profile created — data moved into it': 'प्रोफ़ाइल बनी — डेटा स्थानांतरित',
'Welcome, {0}': 'स्वागत है, {0}',
'Welcome back, {0}': 'वापसी पर स्वागत है, {0}',
'Registration failed': 'पंजीकरण विफल',
'Sign-in failed': 'साइन-इन विफल',
'Create your profile ✨': 'अपनी प्रोफ़ाइल बनाएँ ✨',
'Create your profile': 'अपनी प्रोफ़ाइल बनाएँ',
'Pick a name, then confirm with {0}. The passkey is saved in your device — no password needed.': 'नाम चुनें, फिर {0} से पुष्टि करें। पासकी आपके डिवाइस में सहेजी जाती है — पासवर्ड की ज़रूरत नहीं।',
'Pick a name, then confirm with your device.': 'नाम चुनें, फिर अपने डिवाइस से पुष्टि करें।',
'Your name': 'आपका नाम',
@@ -254,10 +254,10 @@ export default {
'Deletes your plan, workouts and body weight on this device. This cannot be undone.': 'इस डिवाइस पर आपकी योजना, वर्कआउट और वज़न हट जाएँगे। इसे पूर्ववत नहीं किया जा सकता।',
'Delete everything': 'सब हटाएँ',
'All data reset': 'सारा डेटा रीसेट',
'Backup exported ✓': 'बैकअप निर्यात हुआ ✓',
'Backup exported': 'बैकअप निर्यात हुआ',
'Import backup?': 'बैकअप आयात करें?',
'This replaces all current data with the backup file.': 'यह वर्तमान सारा डेटा बैकअप फ़ाइल से बदल देगा।',
'Backup imported ✓': 'बैकअप आयात हुआ ✓',
'Backup imported': 'बैकअप आयात हुआ',
'Import failed: {0}': 'आयात विफल: {0}',
'Tip': 'सुझाव',
'In Chrome: ⋮ menu → Add to Home screen': 'Chrome में: ⋮ मेनू → होम स्क्रीन पर जोड़ें',
@@ -278,13 +278,21 @@ export default {
'Test sent — should arrive any second': 'परीक्षण भेजा — किसी भी क्षण पहुँचेगा',
'Test failed': 'परीक्षण विफल',
'Notifications off': 'सूचनाएँ बंद',
'Notifications on 🔔': 'सूचनाएँ चालू 🔔',
'Notifications on': 'सूचनाएँ चालू',
'Could not change notification settings': 'सूचना सेटिंग नहीं बदल सके',
'tap to pause': 'रोकने के लिए टैप करें',
'tap to play': 'चलाने के लिए टैप करें',
'back': 'पीठ', 'cardio': 'कार्डियो', 'chest': 'छाती', 'lower arms': 'अग्रबाहु',
'lower legs': 'पिंडलियाँ', 'neck': 'गर्दन', 'shoulders': 'कंधे',
'upper arms': 'बाजू', 'upper legs': 'जाँघें', 'waist': 'पेट',
'Details': 'विवरण',
'Finish': 'समाप्त',
'Start {0}': '{0} शुरू करें',
'Guest mode — data lives only in this browser.': 'अतिथि मोड — डेटा केवल इसी ब्राउज़र में रहता है।',
'Keeps your data safe and separate per person.': 'आपका डेटा सुरक्षित और हर व्यक्ति के लिए अलग रखता है।',
'Strength': 'शक्ति',
'Equipment': 'उपकरण',
'Recovery': 'रिकवरी',
'Any equipment': 'कोई भी उपकरण',
'assisted': 'सहायता प्राप्त', 'band': 'बैंड', 'barbell': 'बारबेल', 'body weight': 'शरीर का वज़न',
'bosu ball': 'बोसु बॉल', 'cable': 'केबल', 'dumbbell': 'डम्बल',
@@ -321,11 +329,11 @@ export default {
'Give it a name': 'कोई नाम दें',
'Pick a body part': 'एक बॉडी पार्ट चुनें',
'“{0}” already exists': '“{0}” पहले से मौजूद है',
'“{0}” created ✓': '“{0}” बन गई ✓',
'“{0}” created': '“{0}” बन गई',
'Cardio exercises log time + speed instead of weight × reps.': 'कार्डियो एक्सरसाइज़ में वज़न × रेप्स की जगह समय + गति दर्ज होती है।',
'custom': 'कस्टम',
'Edit': 'संपादित करें',
'Saved ✓': 'सहेजा गया ✓',
'Saved': 'सहेजा गया',
'Delete “{0}”?': '“{0}” हटाएं?',
'It will be removed from your routines. Already-logged workouts keep their sets.': 'यह आपकी रूटीन से हट जाएगी। दर्ज की गई वर्कआउट में सेट बने रहेंगे।',
'Exercise deleted': 'एक्सरसाइज़ हटाई गई',
+42 -34
View File
@@ -43,16 +43,16 @@ export default {
'January': 'Gennaio', 'February': 'Febbraio', 'March': 'Marzo', 'April': 'Aprile',
'June': 'Giugno', 'July': 'Luglio', 'August': 'Agosto', 'September': 'Settembre',
'October': 'Ottobre', 'November': 'Novembre', 'December': 'Dicembre',
'Quick check-in ⚖️': 'Check-in veloce ⚖️',
'Quick check-in': 'Check-in veloce',
'Log body weight': 'Registra peso corporeo',
'Slide or tap to set your weight — tracked before every workout so your curve stays honest.': 'Scorri o tocca per impostare il peso — registrato prima di ogni allenamento così la tua curva resta onesta.',
'Save & start workout': 'Salva e inizia',
'Skip today': 'Salta oggi',
'↺ Choose a different workout': '↺ Scegli un altro allenamento',
'Choose a different workout': 'Scegli un altro allenamento',
'Recent weigh-ins': 'Pesate recenti',
'Enter a valid weight': 'Inserisci un peso valido',
'Weight saved ✓': 'Peso salvato ✓',
'Target weight 🎯': 'Peso obiettivo 🎯',
'Weight saved': 'Peso salvato',
'Target weight': 'Peso obiettivo',
'Your goal is drawn as a line through the weight charts, and gains/losses are colored by whether they move toward it.': 'Il tuo obiettivo appare come una linea nei grafici del peso, e aumenti/cali sono colorati a seconda che vi si avvicinino.',
'Save goal': 'Salva obiettivo',
'Goal set: {0}': 'Obiettivo impostato: {0}',
@@ -60,17 +60,17 @@ export default {
'Goal removed': 'Obiettivo rimosso',
'Remove goal': 'Rimuovi obiettivo',
'Body weight': 'Peso corporeo',
'reached! 🎉': 'raggiunto! 🎉',
'reached!': 'raggiunto!',
'{0} to gain': '{0} da prendere',
'{0} to lose': '{0} da perdere',
"No entries yet — log your weight to start the curve. It's also asked before every workout.": 'Nessun dato — registra il tuo peso per iniziare la curva. Viene chiesto anche prima di ogni allenamento.',
'Best:': 'Record:',
'+ Add to my plan': '+ Aggiungi al mio piano',
'Add to my plan': 'Aggiungi al mio piano',
'How to': 'Esecuzione',
'instructions in English': 'istruzioni in inglese',
'New routine': 'Nuova routine',
'Add “{0}”': 'Aggiungi «{0}»',
'“{0}” added to {1} ✓': '«{0}» aggiunto a {1} ✓',
'“{0}” added to {1}': '«{0}» aggiunto a {1}',
'Pick a routine — sets, reps & weight come next.': 'Scegli una routine — serie, ripetizioni e peso arrivano dopo.',
'{0} exercises': '{0} esercizi',
'already in': 'già incluso',
@@ -79,7 +79,7 @@ export default {
'Search {0} exercises…': 'Cerca tra {0} esercizi…',
'Chosen': 'Scelti',
'Nothing chosen yet — add exercises and they’ll show up here.': 'Ancora niente — aggiungi esercizi e appariranno qui.',
'No match 🤷': 'Nessun risultato 🤷',
'No match': 'Nessun risultato',
'Show more': 'Mostra altro',
'Intervals': 'Intervalli',
'Minutes': 'Minuti',
@@ -89,10 +89,10 @@ export default {
'Weight ({0})': 'Peso ({0})',
'Add to routine': 'Aggiungi alla routine',
'Remove exercise': 'Rimuovi esercizio',
'Pick an emoji': 'Scegli un emoji',
'Pick an icon': 'Scegli un’icona',
'Back to weekly plan': 'Torna al piano settimanale',
'{0} set to rest': '{0} impostato a riposo',
'{0} planned for {1} ✓': '{0} pianificato per {1} ✓',
'{0} planned for {1}': '{0} pianificato per {1}',
'Weekly plan:': 'Piano settimanale:',
'changed for this day': 'modificato per questo giorno',
'Sick, missed a day or want a different session? Pick what to train instead.': 'Malato, giorno saltato o voglia di altro? Scegli cosa allenare al suo posto.',
@@ -115,23 +115,23 @@ export default {
'Confirm the weight you worked with — your highest becomes the default next time.': 'Conferma il peso usato — il più alto diventa il predefinito la prossima volta.',
'Then finish the superset partner.': "Poi completa l'altro esercizio del superset.",
'Previous best:': 'Record precedente:',
'new record! 🏆': 'nuovo record! 🏆',
'Save ✓': 'Salva ✓',
'Save & next exercise ›': 'Salva e prossimo esercizio ›',
'new record!': 'nuovo record!',
'Save': 'Salva',
'Save & next exercise': 'Salva e prossimo esercizio',
'Just close': 'Chiudi soltanto',
'Save weight': 'Salva peso',
'Tracked — next time starts at {0} 📈': 'Registrato — la prossima volta parti da {0} 📈',
'Tracked — next time starts at {0}': 'Registrato — la prossima volta parti da {0}',
"That's the whole workout!": 'Allenamento completato!',
'Every exercise done — great work. Finish up, or keep going and add another exercise.': 'Tutti gli esercizi fatti — ottimo lavoro! Concludi, o continua e aggiungi un altro esercizio.',
'Finish workout 🏁': 'Termina allenamento 🏁',
'Finish workout': 'Termina allenamento',
'Continue workout': 'Continua allenamento',
'Keep going 💪 — tap “+ Add exercise” below': 'Continua così 💪 — tocca «+ Aggiungi esercizio» in basso',
'Keep going — tap “+ Add exercise” below': 'Continua così — tocca «+ Aggiungi esercizio» in basso',
'Workout complete!': 'Allenamento completato!',
'Duration': 'Durata',
'Volume': 'Volume',
'PRs': 'Record',
'New PR:': 'Nuovo record:',
'Nice! 💪': 'Grande! 💪',
'Nice!': 'Grande!',
'Nothing logged yet': 'Niente registrato',
'You haven’t checked off any sets. Finish the workout anyway?': 'Non hai spuntato nessuna serie. Terminare comunque?',
'Finish anyway': 'Termina comunque',
@@ -151,10 +151,10 @@ export default {
'Duration (min)': 'Durata (min)',
'Last time': "L'ultima volta",
'Last time you hit all reps — try {0}': "L'ultima volta hai completato tutte le rip. — prova {0}",
'Weights bumped to {0} 💪': 'Pesi aumentati a {0} 💪',
'Weights bumped to {0}': 'Pesi aumentati a {0}',
'Remove set': 'Rimuovi serie',
'Add set': 'Aggiungi serie',
'Cardio logged 🏃': 'Cardio registrato 🏃',
'Cardio logged': 'Cardio registrato',
'Discard workout?': 'Scartare allenamento?',
'The sets you logged in this session will be lost.': 'Le serie registrate in questa sessione andranno perse.',
'Superset {0} / {1}': 'Superset {0} / {1}',
@@ -162,12 +162,12 @@ export default {
'Superset · do these back-to-back, rest after both': 'Superset · falli uno dopo l’altro, riposo dopo entrambi',
'Freestyle workout — add your first exercise.': 'Allenamento libero — aggiungi il primo esercizio.',
'Finish workout early · {0} exercises': 'Termina in anticipo · {0} esercizi',
'Rest over — next set! 💪': 'Riposo finito — prossima serie! 💪',
'Hi {0} 💪': 'Ciao {0} 💪',
'Rest over — next set!': 'Riposo finito — prossima serie!',
'Hi {0}': 'Ciao {0}',
'This week': 'Questa settimana',
'{0} — in progress': '{0} — in corso',
'Resume ▶': 'Riprendi ▶',
'Welcome! 👋': 'Benvenuto! 👋',
'Welcome!': 'Benvenuto!',
'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Imposta la tua routine settimanale — o carica un piano Push / Pull / Gambe già pronto.',
'Load starter plan (PPL)': 'Carica piano iniziale (PPL)',
'Build my own plan': 'Crea il mio piano',
@@ -185,7 +185,7 @@ export default {
'Exercise progress': 'Progressi per esercizio',
'Top speed per workout': 'Velocità massima per allenamento',
'Best set weight per workout': 'Miglior peso per allenamento',
'Finish your first workout to see progress curves here. 📈': 'Completa il primo allenamento per vedere qui le curve dei progressi. 📈',
'Finish your first workout to see progress curves here.': 'Completa il primo allenamento per vedere qui le curve dei progressi.',
'Recent workouts': 'Allenamenti recenti',
'Less time': 'Meno',
'More time': 'Più',
@@ -198,7 +198,7 @@ export default {
'Load starter plan (Push / Pull / Legs)': 'Carica piano iniziale (Push / Pull / Gambe)',
'Superset with exercise above': "Superset con l'esercizio sopra",
'No exercises yet — add your first one.': 'Ancora nessun esercizio — aggiungi il primo.',
'Tip: tap 🔗 on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Suggerimento: tocca 🔗 su un esercizio per farne un superset con quello sopra — li farai uno dopo l’altro.',
'Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Tocca il pulsante di collegamento su un esercizio per farne un superset con quello sopra — li farai di seguito.',
'Delete routine?': 'Eliminare routine?',
'“{0}” and its exercises will be removed.': '«{0}» e i suoi esercizi verranno rimossi.',
'Delete routine': 'Elimina routine',
@@ -207,13 +207,13 @@ export default {
'No workouts yet.': 'Ancora nessun allenamento.',
'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Piano iniziale caricato — Lun Push · Mer Pull · Ven Gambe',
'Enter a name': 'Inserisci un nome',
'Profile created — data from this device moved into it ✓': 'Profilo creato — i dati di questo dispositivo sono stati trasferiti ✓',
'Profile created — data moved into it ✓': 'Profilo creato — dati trasferiti ✓',
'Welcome, {0} 💪': 'Benvenuto, {0} 💪',
'Welcome back, {0} 💪': 'Bentornato, {0} 💪',
'Profile created — data from this device moved into it': 'Profilo creato — i dati di questo dispositivo sono stati trasferiti',
'Profile created — data moved into it': 'Profilo creato — dati trasferiti',
'Welcome, {0}': 'Benvenuto, {0}',
'Welcome back, {0}': 'Bentornato, {0}',
'Registration failed': 'Registrazione fallita',
'Sign-in failed': 'Accesso fallito',
'Create your profile ✨': 'Crea il tuo profilo ✨',
'Create your profile': 'Crea il tuo profilo',
'Pick a name, then confirm with {0}. The passkey is saved in your device — no password needed.': 'Scegli un nome e conferma con {0}. La passkey viene salvata sul tuo dispositivo — nessuna password.',
'Pick a name, then confirm with your device.': 'Scegli un nome e conferma con il tuo dispositivo.',
'Your name': 'Il tuo nome',
@@ -254,10 +254,10 @@ export default {
'Deletes your plan, workouts and body weight on this device. This cannot be undone.': 'Elimina piano, allenamenti e peso corporeo su questo dispositivo. Irreversibile.',
'Delete everything': 'Elimina tutto',
'All data reset': 'Tutti i dati azzerati',
'Backup exported ✓': 'Backup esportato ✓',
'Backup exported': 'Backup esportato',
'Import backup?': 'Importare backup?',
'This replaces all current data with the backup file.': 'Sostituisce tutti i dati attuali con il file di backup.',
'Backup imported ✓': 'Backup importato ✓',
'Backup imported': 'Backup importato',
'Import failed: {0}': 'Import fallito: {0}',
'Tip': 'Suggerimento',
'In Chrome: ⋮ menu → Add to Home screen': 'In Chrome: menu ⋮ → Aggiungi a schermata Home',
@@ -278,13 +278,21 @@ export default {
'Test sent — should arrive any second': 'Prova inviata — dovrebbe arrivare a momenti',
'Test failed': 'Prova fallita',
'Notifications off': 'Notifiche disattivate',
'Notifications on 🔔': 'Notifiche attivate 🔔',
'Notifications on': 'Notifiche attivate',
'Could not change notification settings': 'Impossibile modificare le impostazioni delle notifiche',
'tap to pause': 'tocca per mettere in pausa',
'tap to play': 'tocca per riprodurre',
'back': 'schiena', 'cardio': 'cardio', 'chest': 'petto', 'lower arms': 'avambracci',
'lower legs': 'polpacci', 'neck': 'collo', 'shoulders': 'spalle',
'upper arms': 'braccia', 'upper legs': 'gambe', 'waist': 'addome',
'Details': 'Dettagli',
'Finish': 'Termina',
'Start {0}': 'Inizia {0}',
'Guest mode — data lives only in this browser.': 'Modalità ospite — i dati restano solo in questo browser.',
'Keeps your data safe and separate per person.': 'Mantiene i tuoi dati al sicuro e separati per persona.',
'Strength': 'Forza',
'Equipment': 'Attrezzi',
'Recovery': 'Recupero',
'Any equipment': 'Qualsiasi attrezzo',
'assisted': 'assistito', 'band': 'elastico', 'barbell': 'bilanciere', 'body weight': 'corpo libero',
'bosu ball': 'bosu', 'cable': 'cavo', 'dumbbell': 'manubrio',
@@ -321,11 +329,11 @@ export default {
'Give it a name': 'Dagli un nome',
'Pick a body part': 'Scegli una parte del corpo',
'“{0}” already exists': '«{0}» esiste già',
'“{0}” created ✓': '«{0}» creato ✓',
'“{0}” created': '«{0}» creato',
'Cardio exercises log time + speed instead of weight × reps.': 'Gli esercizi cardio registrano tempo + velocità invece di peso × rip.',
'custom': 'personale',
'Edit': 'Modifica',
'Saved ✓': 'Salvato ✓',
'Saved': 'Salvato',
'Delete “{0}”?': 'Eliminare «{0}»?',
'It will be removed from your routines. Already-logged workouts keep their sets.': 'Verrà rimosso dalle tue routine. Gli allenamenti già registrati mantengono le loro serie.',
'Exercise deleted': 'Esercizio eliminato',
+42 -34
View File
@@ -43,16 +43,16 @@ export default {
'January': '1월', 'February': '2월', 'March': '3월', 'April': '4월',
'June': '6월', 'July': '7월', 'August': '8월', 'September': '9월',
'October': '10월', 'November': '11월', 'December': '12월',
'Quick check-in ⚖️': '빠른 체중 체크 ⚖️',
'Quick check-in': '빠른 체중 체크',
'Log body weight': '체중 기록',
'Slide or tap to set your weight — tracked before every workout so your curve stays honest.': '슬라이드하거나 탭해서 체중을 설정하세요 — 매 운동 전에 기록되어 그래프가 정직하게 유지됩니다.',
'Save & start workout': '저장하고 운동 시작',
'Skip today': '오늘은 건너뛰기',
'↺ Choose a different workout': '↺ 다른 운동 선택',
'Choose a different workout': '다른 운동 선택',
'Recent weigh-ins': '최근 체중 기록',
'Enter a valid weight': '올바른 무게를 입력하세요',
'Weight saved ✓': '체중 저장됨 ✓',
'Target weight 🎯': '목표 체중 🎯',
'Weight saved': '체중 저장됨',
'Target weight': '목표 체중',
'Your goal is drawn as a line through the weight charts, and gains/losses are colored by whether they move toward it.': '목표가 체중 그래프에 선으로 표시되며, 증감은 목표에 가까워지는지에 따라 색이 입혀집니다.',
'Save goal': '목표 저장',
'Goal set: {0}': '목표 설정: {0}',
@@ -60,17 +60,17 @@ export default {
'Goal removed': '목표 삭제됨',
'Remove goal': '목표 삭제',
'Body weight': '체중',
'reached! 🎉': '달성! 🎉',
'reached!': '달성!',
'{0} to gain': '{0} 증량 남음',
'{0} to lose': '{0} 감량 남음',
"No entries yet — log your weight to start the curve. It's also asked before every workout.": '아직 기록이 없어요 — 체중을 기록해 그래프를 시작하세요. 매 운동 전에도 물어봅니다.',
'Best:': '최고 기록:',
'+ Add to my plan': '+ 내 계획에 추가',
'Add to my plan': '내 계획에 추가',
'How to': '운동 방법',
'instructions in English': '설명은 영어로 제공',
'New routine': '새 루틴',
'Add “{0}”': '"{0}" 추가',
'“{0}” added to {1} ✓': '"{0}"이(가) {1}에 추가됨 ✓',
'“{0}” added to {1}': '"{0}"이(가) {1}에 추가됨',
'Pick a routine — sets, reps & weight come next.': '루틴을 선택하세요 — 세트, 횟수, 무게는 다음 단계입니다.',
'{0} exercises': '운동 {0}개',
'already in': '이미 있음',
@@ -79,7 +79,7 @@ export default {
'Search {0} exercises…': '{0}개 운동 검색…',
'Chosen': '즐겨찾기',
'Nothing chosen yet — add exercises and they’ll show up here.': '아직 없어요 — 운동을 추가하면 여기에 표시됩니다.',
'No match 🤷': '검색 결과 없음 🤷',
'No match': '검색 결과 없음',
'Show more': '더 보기',
'Intervals': '인터벌',
'Minutes': '분',
@@ -89,10 +89,10 @@ export default {
'Weight ({0})': '무게 ({0})',
'Add to routine': '루틴에 추가',
'Remove exercise': '운동 제거',
'Pick an emoji': '이모지 선택',
'Pick an icon': '아이콘 선택',
'Back to weekly plan': '주간 계획으로 복귀',
'{0} set to rest': '{0}을(를) 휴식일로 설정',
'{0} planned for {1} ✓': '{1}에 {0} 예정됨 ✓',
'{0} planned for {1}': '{1}에 {0} 예정됨',
'Weekly plan:': '주간 계획:',
'changed for this day': '이 날만 변경됨',
'Sick, missed a day or want a different session? Pick what to train instead.': '아프거나, 하루를 놓쳤거나, 다른 운동이 하고 싶나요? 대신 할 운동을 선택하세요.',
@@ -115,23 +115,23 @@ export default {
'Confirm the weight you worked with — your highest becomes the default next time.': '사용한 무게를 확인하세요 — 최고 무게가 다음번 기본값이 됩니다.',
'Then finish the superset partner.': '그다음 슈퍼세트 짝 운동을 마무리하세요.',
'Previous best:': '이전 최고 기록:',
'new record! 🏆': '신기록! 🏆',
'Save ✓': '저장 ✓',
'Save & next exercise ›': '저장하고 다음 운동 ›',
'new record!': '신기록!',
'Save': '저장',
'Save & next exercise': '저장하고 다음 운동',
'Just close': '그냥 닫기',
'Save weight': '무게 저장',
'Tracked — next time starts at {0} 📈': '기록됨 — 다음번엔 {0}부터 시작합니다 📈',
'Tracked — next time starts at {0}': '기록됨 — 다음번엔 {0}부터 시작합니다',
"That's the whole workout!": '오늘 운동 전부 끝!',
'Every exercise done — great work. Finish up, or keep going and add another exercise.': '모든 운동 완료 — 수고했어요! 마무리하거나, 계속해서 운동을 추가하세요.',
'Finish workout 🏁': '운동 마치기 🏁',
'Finish workout': '운동 마치기',
'Continue workout': '운동 계속하기',
'Keep going 💪 — tap “+ Add exercise” below': '계속 가요 💪 — 아래 "+ 운동 추가"를 탭하세요',
'Keep going — tap “+ Add exercise” below': '계속 가요 — 아래 "+ 운동 추가"를 탭하세요',
'Workout complete!': '운동 완료!',
'Duration': '시간',
'Volume': '볼륨',
'PRs': '신기록',
'New PR:': '신기록:',
'Nice! 💪': '좋아요! 💪',
'Nice!': '좋아요!',
'Nothing logged yet': '아직 기록 없음',
'You haven’t checked off any sets. Finish the workout anyway?': '체크한 세트가 없어요. 그래도 운동을 마칠까요?',
'Finish anyway': '그래도 마치기',
@@ -151,10 +151,10 @@ export default {
'Duration (min)': '시간 (분)',
'Last time': '지난번',
'Last time you hit all reps — try {0}': '지난번에 모든 횟수를 채웠어요 — {0}에 도전해 보세요',
'Weights bumped to {0} 💪': '무게를 {0}(으)로 올렸어요 💪',
'Weights bumped to {0}': '무게를 {0}(으)로 올렸어요',
'Remove set': '세트 빼기',
'Add set': '세트 추가',
'Cardio logged 🏃': '유산소 기록됨 🏃',
'Cardio logged': '유산소 기록됨',
'Discard workout?': '운동을 버릴까요?',
'The sets you logged in this session will be lost.': '이 세션에서 기록한 세트가 사라집니다.',
'Superset {0} / {1}': '슈퍼세트 {0} / {1}',
@@ -162,12 +162,12 @@ export default {
'Superset · do these back-to-back, rest after both': '슈퍼세트 · 연달아 수행하고, 둘 다 끝난 뒤 휴식',
'Freestyle workout — add your first exercise.': '자유 운동 — 첫 운동을 추가하세요.',
'Finish workout early · {0} exercises': '일찍 마치기 · 운동 {0}개',
'Rest over — next set! 💪': '휴식 끝 — 다음 세트! 💪',
'Hi {0} 💪': '안녕하세요 {0} 💪',
'Rest over — next set!': '휴식 끝 — 다음 세트!',
'Hi {0}': '안녕하세요 {0}',
'This week': '이번 주',
'{0} — in progress': '{0} — 진행 중',
'Resume ▶': '이어하기 ▶',
'Welcome! 👋': '환영합니다! 👋',
'Welcome!': '환영합니다!',
'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': '주간 루틴을 설정해 시작하세요 — 또는 미리 만들어진 푸시 / 풀 / 레그 계획을 불러오세요.',
'Load starter plan (PPL)': '스타터 계획 불러오기 (PPL)',
'Build my own plan': '내 계획 만들기',
@@ -185,7 +185,7 @@ export default {
'Exercise progress': '운동별 진행 상황',
'Top speed per workout': '운동별 최고 속도',
'Best set weight per workout': '운동별 최고 세트 무게',
'Finish your first workout to see progress curves here. 📈': '첫 운동을 마치면 여기에 진행 그래프가 표시됩니다. 📈',
'Finish your first workout to see progress curves here.': '첫 운동을 마치면 여기에 진행 그래프가 표시됩니다.',
'Recent workouts': '최근 운동',
'Less time': '적음',
'More time': '많음',
@@ -198,7 +198,7 @@ export default {
'Load starter plan (Push / Pull / Legs)': '스타터 계획 불러오기 (푸시 / 풀 / 레그)',
'Superset with exercise above': '위 운동과 슈퍼세트',
'No exercises yet — add your first one.': '아직 운동이 없어요 — 첫 운동을 추가하세요.',
'Tip: tap 🔗 on an exercise to superset it with the one above — you’ll do them back-to-back.': '팁: 운동의 🔗를 탭하면 위 운동과 슈퍼세트가 됩니다 — 연달아 수행하게 돼요.',
'Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.': '운동의 연결 버튼을 탭하면 위 운동과 슈퍼세트가 됩니다 — 연달아 수행하게 돼요.',
'Delete routine?': '루틴을 삭제할까요?',
'“{0}” and its exercises will be removed.': '"{0}"과(와) 그 운동들이 삭제됩니다.',
'Delete routine': '루틴 삭제',
@@ -207,13 +207,13 @@ export default {
'No workouts yet.': '아직 운동 기록이 없어요.',
'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': '스타터 계획 불러옴 — 월 푸시 · 수 풀 · 금 레그',
'Enter a name': '이름을 입력하세요',
'Profile created — data from this device moved into it ✓': '프로필 생성됨 — 이 기기의 데이터가 이동됨 ✓',
'Profile created — data moved into it ✓': '프로필 생성됨 — 데이터 이동됨 ✓',
'Welcome, {0} 💪': '환영합니다, {0} 💪',
'Welcome back, {0} 💪': '다시 오셨네요, {0} 💪',
'Profile created — data from this device moved into it': '프로필 생성됨 — 이 기기의 데이터가 이동됨',
'Profile created — data moved into it': '프로필 생성됨 — 데이터 이동됨',
'Welcome, {0}': '환영합니다, {0}',
'Welcome back, {0}': '다시 오셨네요, {0}',
'Registration failed': '등록 실패',
'Sign-in failed': '로그인 실패',
'Create your profile ✨': '프로필 만들기 ✨',
'Create your profile': '프로필 만들기',
'Pick a name, then confirm with {0}. The passkey is saved in your device — no password needed.': '이름을 정한 뒤 {0}(으)로 확인하세요. 패스키는 기기에 저장됩니다 — 비밀번호가 필요 없어요.',
'Pick a name, then confirm with your device.': '이름을 정한 뒤 기기로 확인하세요.',
'Your name': '이름',
@@ -254,10 +254,10 @@ export default {
'Deletes your plan, workouts and body weight on this device. This cannot be undone.': '이 기기의 계획, 운동, 체중을 삭제합니다. 되돌릴 수 없어요.',
'Delete everything': '전부 삭제',
'All data reset': '모든 데이터 초기화됨',
'Backup exported ✓': '백업 내보냄 ✓',
'Backup exported': '백업 내보냄',
'Import backup?': '백업을 가져올까요?',
'This replaces all current data with the backup file.': '현재 모든 데이터가 백업 파일로 대체됩니다.',
'Backup imported ✓': '백업 가져옴 ✓',
'Backup imported': '백업 가져옴',
'Import failed: {0}': '가져오기 실패: {0}',
'Tip': '팁',
'In Chrome: ⋮ menu → Add to Home screen': 'Chrome에서: ⋮ 메뉴 → 홈 화면에 추가',
@@ -278,13 +278,21 @@ export default {
'Test sent — should arrive any second': '테스트 전송됨 — 곧 도착합니다',
'Test failed': '테스트 실패',
'Notifications off': '알림 꺼짐',
'Notifications on 🔔': '알림 켜짐 🔔',
'Notifications on': '알림 켜짐',
'Could not change notification settings': '알림 설정을 변경할 수 없었어요',
'tap to pause': '탭하여 일시정지',
'tap to play': '탭하여 재생',
'back': '등', 'cardio': '유산소', 'chest': '가슴', 'lower arms': '전완',
'lower legs': '종아리', 'neck': '목', 'shoulders': '어깨',
'upper arms': '팔', 'upper legs': '허벅지', 'waist': '복부',
'Details': '상세',
'Finish': '마치기',
'Start {0}': '{0} 시작',
'Guest mode — data lives only in this browser.': '게스트 모드 — 데이터는 이 브라우저에만 저장됩니다.',
'Keeps your data safe and separate per person.': '데이터를 안전하게, 사람별로 분리해 보관합니다.',
'Strength': '근력',
'Equipment': '장비',
'Recovery': '회복',
'Any equipment': '모든 장비',
'assisted': '보조', 'band': '밴드', 'barbell': '바벨', 'body weight': '맨몸',
'bosu ball': '보수볼', 'cable': '케이블', 'dumbbell': '덤벨',
@@ -321,11 +329,11 @@ export default {
'Give it a name': '이름을 입력하세요',
'Pick a body part': '부위를 선택하세요',
'“{0}” already exists': '“{0}”은(는) 이미 있습니다',
'“{0}” created ✓': '“{0}” 생성됨 ✓',
'“{0}” created': '“{0}” 생성됨',
'Cardio exercises log time + speed instead of weight × reps.': '유산소 운동은 무게 × 횟수 대신 시간 + 속도를 기록합니다.',
'custom': '커스텀',
'Edit': '편집',
'Saved ✓': '저장됨 ✓',
'Saved': '저장됨',
'Delete “{0}”?': '“{0}” 삭제할까요?',
'It will be removed from your routines. Already-logged workouts keep their sets.': '루틴에서 제거됩니다. 이미 기록된 운동은 세트를 유지합니다.',
'Exercise deleted': '운동 삭제됨',
+42 -34
View File
@@ -43,16 +43,16 @@ export default {
'January': 'Styczeń', 'February': 'Luty', 'March': 'Marzec', 'April': 'Kwiecień',
'June': 'Czerwiec', 'July': 'Lipiec', 'August': 'Sierpień', 'September': 'Wrzesień',
'October': 'Październik', 'November': 'Listopad', 'December': 'Grudzień',
'Quick check-in ⚖️': 'Szybkie ważenie ⚖️',
'Quick check-in': 'Szybkie ważenie',
'Log body weight': 'Zapisz masę ciała',
'Slide or tap to set your weight — tracked before every workout so your curve stays honest.': 'Przesuń lub dotknij, aby ustawić wagę — zapisywana przed każdym treningiem, żeby krzywa była uczciwa.',
'Save & start workout': 'Zapisz i zacznij trening',
'Skip today': 'Pomiń dziś',
'↺ Choose a different workout': '↺ Wybierz inny trening',
'Choose a different workout': 'Wybierz inny trening',
'Recent weigh-ins': 'Ostatnie ważenia',
'Enter a valid weight': 'Podaj prawidłową wagę',
'Weight saved ✓': 'Waga zapisana ✓',
'Target weight 🎯': 'Waga docelowa 🎯',
'Weight saved': 'Waga zapisana',
'Target weight': 'Waga docelowa',
'Your goal is drawn as a line through the weight charts, and gains/losses are colored by whether they move toward it.': 'Twój cel jest rysowany jako linia na wykresach wagi, a zmiany są kolorowane zależnie od tego, czy się do niego zbliżają.',
'Save goal': 'Zapisz cel',
'Goal set: {0}': 'Cel ustawiony: {0}',
@@ -60,17 +60,17 @@ export default {
'Goal removed': 'Cel usunięty',
'Remove goal': 'Usuń cel',
'Body weight': 'Masa ciała',
'reached! 🎉': 'osiągnięty! 🎉',
'reached!': 'osiągnięty!',
'{0} to gain': '{0} do przybrania',
'{0} to lose': '{0} do zrzucenia',
"No entries yet — log your weight to start the curve. It's also asked before every workout.": 'Brak wpisów — zapisz wagę, aby zacząć krzywą. Pytamy o nią też przed każdym treningiem.',
'Best:': 'Rekord:',
'+ Add to my plan': '+ Dodaj do mojego planu',
'Add to my plan': 'Dodaj do mojego planu',
'How to': 'Wykonanie',
'instructions in English': 'instrukcje po angielsku',
'New routine': 'Nowy plan treningowy',
'Add “{0}”': 'Dodaj „{0}”',
'“{0}” added to {1} ✓': '„{0}” dodano do {1} ✓',
'“{0}” added to {1}': '„{0}” dodano do {1}',
'Pick a routine — sets, reps & weight come next.': 'Wybierz plan — serie, powtórzenia i ciężar będą dalej.',
'{0} exercises': '{0} ćwiczeń',
'already in': 'już jest',
@@ -79,7 +79,7 @@ export default {
'Search {0} exercises…': 'Szukaj wśród {0} ćwiczeń…',
'Chosen': 'Wybrane',
'Nothing chosen yet — add exercises and they’ll show up here.': 'Nic nie wybrano — dodaj ćwiczenia, a pojawią się tutaj.',
'No match 🤷': 'Brak wyników 🤷',
'No match': 'Brak wyników',
'Show more': 'Pokaż więcej',
'Intervals': 'Interwały',
'Minutes': 'Minuty',
@@ -89,10 +89,10 @@ export default {
'Weight ({0})': 'Ciężar ({0})',
'Add to routine': 'Dodaj do planu',
'Remove exercise': 'Usuń ćwiczenie',
'Pick an emoji': 'Wybierz emoji',
'Pick an icon': 'Wybierz ikonę',
'Back to weekly plan': 'Wróć do planu tygodnia',
'{0} set to rest': '{0} ustawiono jako odpoczynek',
'{0} planned for {1} ✓': '{0} zaplanowano na {1} ✓',
'{0} planned for {1}': '{0} zaplanowano na {1}',
'Weekly plan:': 'Plan tygodnia:',
'changed for this day': 'zmieniono na ten dzień',
'Sick, missed a day or want a different session? Pick what to train instead.': 'Choroba, opuszczony dzień albo ochota na coś innego? Wybierz, co trenować zamiast tego.',
@@ -115,23 +115,23 @@ export default {
'Confirm the weight you worked with — your highest becomes the default next time.': 'Potwierdź ciężar, z którym pracowałeś — najwyższy będzie domyślny następnym razem.',
'Then finish the superset partner.': 'Potem dokończ drugie ćwiczenie superserii.',
'Previous best:': 'Poprzedni rekord:',
'new record! 🏆': 'nowy rekord! 🏆',
'Save ✓': 'Zapisz ✓',
'Save & next exercise ›': 'Zapisz i następne ćwiczenie ›',
'new record!': 'nowy rekord!',
'Save': 'Zapisz',
'Save & next exercise': 'Zapisz i następne ćwiczenie',
'Just close': 'Tylko zamknij',
'Save weight': 'Zapisz ciężar',
'Tracked — next time starts at {0} 📈': 'Zapisano — następnym razem zaczynasz od {0} 📈',
'Tracked — next time starts at {0}': 'Zapisano — następnym razem zaczynasz od {0}',
"That's the whole workout!": 'To cały trening!',
'Every exercise done — great work. Finish up, or keep going and add another exercise.': 'Wszystkie ćwiczenia zrobione — świetna robota! Zakończ albo kontynuuj i dodaj kolejne ćwiczenie.',
'Finish workout 🏁': 'Zakończ trening 🏁',
'Finish workout': 'Zakończ trening',
'Continue workout': 'Kontynuuj trening',
'Keep going 💪 — tap “+ Add exercise” below': 'Tak trzymaj 💪 — dotknij „+ Dodaj ćwiczenie” poniżej',
'Keep going — tap “+ Add exercise” below': 'Tak trzymaj — dotknij „+ Dodaj ćwiczenie” poniżej',
'Workout complete!': 'Trening ukończony!',
'Duration': 'Czas',
'Volume': 'Objętość',
'PRs': 'Rekordy',
'New PR:': 'Nowy rekord:',
'Nice! 💪': 'Świetnie! 💪',
'Nice!': 'Świetnie!',
'Nothing logged yet': 'Nic nie zapisano',
'You haven’t checked off any sets. Finish the workout anyway?': 'Nie odhaczyłeś żadnej serii. Mimo to zakończyć trening?',
'Finish anyway': 'Zakończ mimo to',
@@ -151,10 +151,10 @@ export default {
'Duration (min)': 'Czas (min)',
'Last time': 'Ostatnio',
'Last time you hit all reps — try {0}': 'Ostatnio zrobiłeś wszystkie powtórzenia — spróbuj {0}',
'Weights bumped to {0} 💪': 'Ciężary podniesione do {0} 💪',
'Weights bumped to {0}': 'Ciężary podniesione do {0}',
'Remove set': 'Usuń serię',
'Add set': 'Dodaj serię',
'Cardio logged 🏃': 'Cardio zapisane 🏃',
'Cardio logged': 'Cardio zapisane',
'Discard workout?': 'Odrzucić trening?',
'The sets you logged in this session will be lost.': 'Serie zapisane w tej sesji zostaną utracone.',
'Superset {0} / {1}': 'Superseria {0} / {1}',
@@ -162,12 +162,12 @@ export default {
'Superset · do these back-to-back, rest after both': 'Superseria · rób jedno po drugim, odpocznij po obu',
'Freestyle workout — add your first exercise.': 'Trening dowolny — dodaj pierwsze ćwiczenie.',
'Finish workout early · {0} exercises': 'Zakończ wcześniej · {0} ćwiczeń',
'Rest over — next set! 💪': 'Koniec przerwy — następna seria! 💪',
'Hi {0} 💪': 'Cześć {0} 💪',
'Rest over — next set!': 'Koniec przerwy — następna seria!',
'Hi {0}': 'Cześć {0}',
'This week': 'Ten tydzień',
'{0} — in progress': '{0} — w trakcie',
'Resume ▶': 'Wznów ▶',
'Welcome! 👋': 'Witaj! 👋',
'Welcome!': 'Witaj!',
'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Ustaw swój tygodniowy plan — albo wczytaj gotowy plan Push / Pull / Nogi.',
'Load starter plan (PPL)': 'Wczytaj plan startowy (PPL)',
'Build my own plan': 'Utwórz własny plan',
@@ -185,7 +185,7 @@ export default {
'Exercise progress': 'Postępy w ćwiczeniach',
'Top speed per workout': 'Najwyższa prędkość na trening',
'Best set weight per workout': 'Najlepszy ciężar na trening',
'Finish your first workout to see progress curves here. 📈': 'Ukończ pierwszy trening, aby zobaczyć tu krzywe postępów. 📈',
'Finish your first workout to see progress curves here.': 'Ukończ pierwszy trening, aby zobaczyć tu krzywe postępów.',
'Recent workouts': 'Ostatnie treningi',
'Less time': 'Mniej',
'More time': 'Więcej',
@@ -198,7 +198,7 @@ export default {
'Load starter plan (Push / Pull / Legs)': 'Wczytaj plan startowy (Push / Pull / Nogi)',
'Superset with exercise above': 'Superseria z ćwiczeniem powyżej',
'No exercises yet — add your first one.': 'Brak ćwiczeń — dodaj pierwsze.',
'Tip: tap 🔗 on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Wskazówka: dotknij 🔗 przy ćwiczeniu, aby połączyć je w superserię z tym powyżej — zrobisz je jedno po drugim.',
'Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Dotknij przycisku łączenia przy ćwiczeniu, aby połączyć je w superserię z tym powyżej — zrobisz je jedno po drugim.',
'Delete routine?': 'Usunąć plan?',
'“{0}” and its exercises will be removed.': '„{0}” i jego ćwiczenia zostaną usunięte.',
'Delete routine': 'Usuń plan',
@@ -207,13 +207,13 @@ export default {
'No workouts yet.': 'Brak treningów.',
'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Plan startowy wczytany — Pn Push · Śr Pull · Pt Nogi',
'Enter a name': 'Podaj imię',
'Profile created — data from this device moved into it ✓': 'Profil utworzony — dane z tego urządzenia zostały przeniesione ✓',
'Profile created — data moved into it ✓': 'Profil utworzony — dane przeniesione ✓',
'Welcome, {0} 💪': 'Witaj, {0} 💪',
'Welcome back, {0} 💪': 'Witaj ponownie, {0} 💪',
'Profile created — data from this device moved into it': 'Profil utworzony — dane z tego urządzenia zostały przeniesione',
'Profile created — data moved into it': 'Profil utworzony — dane przeniesione',
'Welcome, {0}': 'Witaj, {0}',
'Welcome back, {0}': 'Witaj ponownie, {0}',
'Registration failed': 'Rejestracja nie powiodła się',
'Sign-in failed': 'Logowanie nie powiodło się',
'Create your profile ✨': 'Utwórz swój profil ✨',
'Create your profile': 'Utwórz swój profil',
'Pick a name, then confirm with {0}. The passkey is saved in your device — no password needed.': 'Wybierz imię i potwierdź przez {0}. Klucz passkey zapisze się na urządzeniu — bez hasła.',
'Pick a name, then confirm with your device.': 'Wybierz imię i potwierdź na urządzeniu.',
'Your name': 'Twoje imię',
@@ -254,10 +254,10 @@ export default {
'Deletes your plan, workouts and body weight on this device. This cannot be undone.': 'Usuwa plan, treningi i masę ciała na tym urządzeniu. Nie można tego cofnąć.',
'Delete everything': 'Usuń wszystko',
'All data reset': 'Wszystkie dane zresetowane',
'Backup exported ✓': 'Kopia wyeksportowana ✓',
'Backup exported': 'Kopia wyeksportowana',
'Import backup?': 'Importować kopię?',
'This replaces all current data with the backup file.': 'To zastąpi wszystkie obecne dane plikiem kopii.',
'Backup imported ✓': 'Kopia zaimportowana ✓',
'Backup imported': 'Kopia zaimportowana',
'Import failed: {0}': 'Import nie powiódł się: {0}',
'Tip': 'Wskazówka',
'In Chrome: ⋮ menu → Add to Home screen': 'W Chrome: menu ⋮ → Dodaj do ekranu głównego',
@@ -278,13 +278,21 @@ export default {
'Test sent — should arrive any second': 'Test wysłany — powinien dotrzeć lada moment',
'Test failed': 'Test nie powiódł się',
'Notifications off': 'Powiadomienia wyłączone',
'Notifications on 🔔': 'Powiadomienia włączone 🔔',
'Notifications on': 'Powiadomienia włączone',
'Could not change notification settings': 'Nie udało się zmienić ustawień powiadomień',
'tap to pause': 'dotknij, aby wstrzymać',
'tap to play': 'dotknij, aby odtworzyć',
'back': 'plecy', 'cardio': 'cardio', 'chest': 'klatka', 'lower arms': 'przedramiona',
'lower legs': 'łydki', 'neck': 'kark', 'shoulders': 'barki',
'upper arms': 'ramiona', 'upper legs': 'uda', 'waist': 'brzuch',
'Details': 'Szczegóły',
'Finish': 'Zakończ',
'Start {0}': 'Zacznij {0}',
'Guest mode — data lives only in this browser.': 'Tryb gościa — dane pozostają tylko w tej przeglądarce.',
'Keeps your data safe and separate per person.': 'Trzyma Twoje dane bezpiecznie i osobno dla każdej osoby.',
'Strength': 'Siła',
'Equipment': 'Sprzęt',
'Recovery': 'Regeneracja',
'Any equipment': 'Dowolny sprzęt',
'assisted': 'z asystą', 'band': 'guma', 'barbell': 'sztanga', 'body weight': 'masa ciała',
'bosu ball': 'bosu', 'cable': 'wyciąg', 'dumbbell': 'hantla',
@@ -321,11 +329,11 @@ export default {
'Give it a name': 'Nadaj mu nazwę',
'Pick a body part': 'Wybierz partię ciała',
'“{0}” already exists': '„{0}” już istnieje',
'“{0}” created ✓': '„{0}” utworzono ✓',
'“{0}” created': '„{0}” utworzono',
'Cardio exercises log time + speed instead of weight × reps.': 'Ćwiczenia cardio zapisują czas + prędkość zamiast ciężaru × powt.',
'custom': 'własne',
'Edit': 'Edytuj',
'Saved ✓': 'Zapisano ✓',
'Saved': 'Zapisano',
'Delete “{0}”?': 'Usunąć „{0}”?',
'It will be removed from your routines. Already-logged workouts keep their sets.': 'Zostanie usunięte z twoich planów. Zapisane treningi zachowają swoje serie.',
'Exercise deleted': 'Ćwiczenie usunięte',
+42 -34
View File
@@ -43,16 +43,16 @@ export default {
'January': 'Janeiro', 'February': 'Fevereiro', 'March': 'Março', 'April': 'Abril',
'June': 'Junho', 'July': 'Julho', 'August': 'Agosto', 'September': 'Setembro',
'October': 'Outubro', 'November': 'Novembro', 'December': 'Dezembro',
'Quick check-in ⚖️': 'Check-in rápido ⚖️',
'Quick check-in': 'Check-in rápido',
'Log body weight': 'Registar peso corporal',
'Slide or tap to set your weight — tracked before every workout so your curve stays honest.': 'Desliza ou toca para definir o teu peso — registado antes de cada treino para a tua curva ser honesta.',
'Save & start workout': 'Guardar e começar treino',
'Skip today': 'Saltar hoje',
'↺ Choose a different workout': '↺ Escolher outro treino',
'Choose a different workout': 'Escolher outro treino',
'Recent weigh-ins': 'Pesagens recentes',
'Enter a valid weight': 'Introduz um peso válido',
'Weight saved ✓': 'Peso guardado ✓',
'Target weight 🎯': 'Peso alvo 🎯',
'Weight saved': 'Peso guardado',
'Target weight': 'Peso alvo',
'Your goal is drawn as a line through the weight charts, and gains/losses are colored by whether they move toward it.': 'A tua meta aparece como uma linha nos gráficos de peso, e ganhos/perdas são coloridos consoante se aproximam dela.',
'Save goal': 'Guardar meta',
'Goal set: {0}': 'Meta definida: {0}',
@@ -60,17 +60,17 @@ export default {
'Goal removed': 'Meta removida',
'Remove goal': 'Remover meta',
'Body weight': 'Peso corporal',
'reached! 🎉': 'alcançado! 🎉',
'reached!': 'alcançado!',
'{0} to gain': '{0} por ganhar',
'{0} to lose': '{0} por perder',
"No entries yet — log your weight to start the curve. It's also asked before every workout.": 'Ainda sem registos — regista o teu peso para começar a curva. Também é pedido antes de cada treino.',
'Best:': 'Melhor:',
'+ Add to my plan': '+ Adicionar ao meu plano',
'Add to my plan': 'Adicionar ao meu plano',
'How to': 'Como fazer',
'instructions in English': 'instruções em inglês',
'New routine': 'Nova rotina',
'Add “{0}”': 'Adicionar «{0}»',
'“{0}” added to {1} ✓': '«{0}» adicionado a {1} ✓',
'“{0}” added to {1}': '«{0}» adicionado a {1}',
'Pick a routine — sets, reps & weight come next.': 'Escolhe uma rotina — séries, repetições e peso vêm a seguir.',
'{0} exercises': '{0} exercícios',
'already in': 'já incluído',
@@ -79,7 +79,7 @@ export default {
'Search {0} exercises…': 'Pesquisar {0} exercícios…',
'Chosen': 'Escolhidos',
'Nothing chosen yet — add exercises and they’ll show up here.': 'Ainda nada escolhido — adiciona exercícios e eles aparecem aqui.',
'No match 🤷': 'Sem resultados 🤷',
'No match': 'Sem resultados',
'Show more': 'Mostrar mais',
'Intervals': 'Intervalos',
'Minutes': 'Minutos',
@@ -89,10 +89,10 @@ export default {
'Weight ({0})': 'Peso ({0})',
'Add to routine': 'Adicionar à rotina',
'Remove exercise': 'Remover exercício',
'Pick an emoji': 'Escolhe um emoji',
'Pick an icon': 'Escolhe um ícone',
'Back to weekly plan': 'Voltar ao plano semanal',
'{0} set to rest': '{0} marcado como descanso',
'{0} planned for {1} ✓': '{0} planeado para {1} ✓',
'{0} planned for {1}': '{0} planeado para {1}',
'Weekly plan:': 'Plano semanal:',
'changed for this day': 'alterado para este dia',
'Sick, missed a day or want a different session? Pick what to train instead.': 'Doente, falhaste um dia ou queres outra sessão? Escolhe o que treinar em vez disso.',
@@ -115,23 +115,23 @@ export default {
'Confirm the weight you worked with — your highest becomes the default next time.': 'Confirma o peso com que trabalhaste — o mais alto fica predefinido na próxima vez.',
'Then finish the superset partner.': 'Depois termina o par da supersérie.',
'Previous best:': 'Melhor anterior:',
'new record! 🏆': 'novo recorde! 🏆',
'Save ✓': 'Guardar ✓',
'Save & next exercise ›': 'Guardar e próximo exercício ›',
'new record!': 'novo recorde!',
'Save': 'Guardar',
'Save & next exercise': 'Guardar e próximo exercício',
'Just close': 'Apenas fechar',
'Save weight': 'Guardar peso',
'Tracked — next time starts at {0} 📈': 'Registado — da próxima vez começas em {0} 📈',
'Tracked — next time starts at {0}': 'Registado — da próxima vez começas em {0}',
"That's the whole workout!": 'Era o treino todo!',
'Every exercise done — great work. Finish up, or keep going and add another exercise.': 'Todos os exercícios feitos — bom trabalho! Termina, ou continua e adiciona outro exercício.',
'Finish workout 🏁': 'Terminar treino 🏁',
'Finish workout': 'Terminar treino',
'Continue workout': 'Continuar treino',
'Keep going 💪 — tap “+ Add exercise” below': 'Continua 💪 — toca em «+ Adicionar exercício» em baixo',
'Keep going — tap “+ Add exercise” below': 'Continua — toca em «+ Adicionar exercício» em baixo',
'Workout complete!': 'Treino concluído!',
'Duration': 'Duração',
'Volume': 'Volume',
'PRs': 'Recordes',
'New PR:': 'Novo recorde:',
'Nice! 💪': 'Boa! 💪',
'Nice!': 'Boa!',
'Nothing logged yet': 'Ainda nada registado',
'You haven’t checked off any sets. Finish the workout anyway?': 'Não marcaste nenhuma série. Terminar o treino mesmo assim?',
'Finish anyway': 'Terminar mesmo assim',
@@ -151,10 +151,10 @@ export default {
'Duration (min)': 'Duração (min)',
'Last time': 'Da última vez',
'Last time you hit all reps — try {0}': 'Da última vez completaste todas as reps — tenta {0}',
'Weights bumped to {0} 💪': 'Pesos aumentados para {0} 💪',
'Weights bumped to {0}': 'Pesos aumentados para {0}',
'Remove set': 'Remover série',
'Add set': 'Adicionar série',
'Cardio logged 🏃': 'Cardio registado 🏃',
'Cardio logged': 'Cardio registado',
'Discard workout?': 'Descartar treino?',
'The sets you logged in this session will be lost.': 'As séries registadas nesta sessão vão perder-se.',
'Superset {0} / {1}': 'Supersérie {0} / {1}',
@@ -162,12 +162,12 @@ export default {
'Superset · do these back-to-back, rest after both': 'Supersérie · faz seguidos, descansa depois de ambos',
'Freestyle workout — add your first exercise.': 'Treino livre — adiciona o teu primeiro exercício.',
'Finish workout early · {0} exercises': 'Terminar mais cedo · {0} exercícios',
'Rest over — next set! 💪': 'Descanso terminado — próxima série! 💪',
'Hi {0} 💪': 'Olá {0} 💪',
'Rest over — next set!': 'Descanso terminado — próxima série!',
'Hi {0}': 'Olá {0}',
'This week': 'Esta semana',
'{0} — in progress': '{0} — em curso',
'Resume ▶': 'Retomar ▶',
'Welcome! 👋': 'Bem-vindo! 👋',
'Welcome!': 'Bem-vindo!',
'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Configura a tua rotina semanal — ou carrega um plano Push / Pull / Pernas já feito.',
'Load starter plan (PPL)': 'Carregar plano inicial (PPL)',
'Build my own plan': 'Criar o meu próprio plano',
@@ -185,7 +185,7 @@ export default {
'Exercise progress': 'Progresso por exercício',
'Top speed per workout': 'Velocidade máxima por treino',
'Best set weight per workout': 'Melhor peso por treino',
'Finish your first workout to see progress curves here. 📈': 'Termina o teu primeiro treino para veres aqui as curvas de progresso. 📈',
'Finish your first workout to see progress curves here.': 'Termina o teu primeiro treino para veres aqui as curvas de progresso.',
'Recent workouts': 'Treinos recentes',
'Less time': 'Menos',
'More time': 'Mais',
@@ -198,7 +198,7 @@ export default {
'Load starter plan (Push / Pull / Legs)': 'Carregar plano inicial (Push / Pull / Pernas)',
'Superset with exercise above': 'Supersérie com o exercício acima',
'No exercises yet — add your first one.': 'Ainda sem exercícios — adiciona o primeiro.',
'Tip: tap 🔗 on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Dica: toca em 🔗 num exercício para o juntar em supersérie com o de cima — fazes os dois seguidos.',
'Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Toca no botão de ligação num exercício para o juntar em supersérie com o de cima — vais fazê-los seguidos.',
'Delete routine?': 'Eliminar rotina?',
'“{0}” and its exercises will be removed.': '«{0}» e os seus exercícios serão removidos.',
'Delete routine': 'Eliminar rotina',
@@ -207,13 +207,13 @@ export default {
'No workouts yet.': 'Ainda sem treinos.',
'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Plano inicial carregado — Seg Push · Qua Pull · Sex Pernas',
'Enter a name': 'Introduz um nome',
'Profile created — data from this device moved into it ✓': 'Perfil criado — os dados deste dispositivo foram movidos para ele ✓',
'Profile created — data moved into it ✓': 'Perfil criado — dados movidos ✓',
'Welcome, {0} 💪': 'Bem-vindo, {0} 💪',
'Welcome back, {0} 💪': 'Bem-vindo de volta, {0} 💪',
'Profile created — data from this device moved into it': 'Perfil criado — os dados deste dispositivo foram movidos para ele',
'Profile created — data moved into it': 'Perfil criado — dados movidos',
'Welcome, {0}': 'Bem-vindo, {0}',
'Welcome back, {0}': 'Bem-vindo de volta, {0}',
'Registration failed': 'Registo falhou',
'Sign-in failed': 'Início de sessão falhou',
'Create your profile ✨': 'Cria o teu perfil ✨',
'Create your profile': 'Cria o teu perfil',
'Pick a name, then confirm with {0}. The passkey is saved in your device — no password needed.': 'Escolhe um nome e confirma com {0}. A passkey fica guardada no teu dispositivo — sem palavras-passe.',
'Pick a name, then confirm with your device.': 'Escolhe um nome e confirma com o teu dispositivo.',
'Your name': 'O teu nome',
@@ -254,10 +254,10 @@ export default {
'Deletes your plan, workouts and body weight on this device. This cannot be undone.': 'Elimina o teu plano, treinos e peso corporal neste dispositivo. Não pode ser anulado.',
'Delete everything': 'Eliminar tudo',
'All data reset': 'Todos os dados repostos',
'Backup exported ✓': 'Cópia exportada ✓',
'Backup exported': 'Cópia exportada',
'Import backup?': 'Importar cópia?',
'This replaces all current data with the backup file.': 'Isto substitui todos os dados atuais pelo ficheiro de cópia.',
'Backup imported ✓': 'Cópia importada ✓',
'Backup imported': 'Cópia importada',
'Import failed: {0}': 'Importação falhou: {0}',
'Tip': 'Dica',
'In Chrome: ⋮ menu → Add to Home screen': 'No Chrome: menu ⋮ → Adicionar ao ecrã principal',
@@ -278,13 +278,21 @@ export default {
'Test sent — should arrive any second': 'Teste enviado — deve chegar a qualquer segundo',
'Test failed': 'Teste falhou',
'Notifications off': 'Notificações desativadas',
'Notifications on 🔔': 'Notificações ativadas 🔔',
'Notifications on': 'Notificações ativadas',
'Could not change notification settings': 'Não foi possível alterar as definições de notificações',
'tap to pause': 'toca para pausar',
'tap to play': 'toca para reproduzir',
'back': 'costas', 'cardio': 'cardio', 'chest': 'peito', 'lower arms': 'antebraços',
'lower legs': 'gémeos', 'neck': 'pescoço', 'shoulders': 'ombros',
'upper arms': 'braços', 'upper legs': 'pernas', 'waist': 'abdómen',
'Details': 'Detalhes',
'Finish': 'Terminar',
'Start {0}': 'Começar {0}',
'Guest mode — data lives only in this browser.': 'Modo convidado — os dados vivem apenas neste navegador.',
'Keeps your data safe and separate per person.': 'Mantém os teus dados seguros e separados por pessoa.',
'Strength': 'Força',
'Equipment': 'Equipamento',
'Recovery': 'Recuperação',
'Any equipment': 'Qualquer equipamento',
'assisted': 'assistido', 'band': 'banda', 'barbell': 'barra', 'body weight': 'peso corporal',
'bosu ball': 'bosu', 'cable': 'cabo', 'dumbbell': 'haltere',
@@ -321,11 +329,11 @@ export default {
'Give it a name': 'Dá-lhe um nome',
'Pick a body part': 'Escolhe uma parte do corpo',
'“{0}” already exists': '«{0}» já existe',
'“{0}” created ✓': '«{0}» criado ✓',
'“{0}” created': '«{0}» criado',
'Cardio exercises log time + speed instead of weight × reps.': 'Exercícios de cardio registam tempo + velocidade em vez de peso × reps.',
'custom': 'próprio',
'Edit': 'Editar',
'Saved ✓': 'Guardado ✓',
'Saved': 'Guardado',
'Delete “{0}”?': 'Eliminar «{0}»?',
'It will be removed from your routines. Already-logged workouts keep their sets.': 'Será removido das tuas rotinas. Os treinos já registados mantêm as suas séries.',
'Exercise deleted': 'Exercício eliminado',
+42 -34
View File
@@ -43,16 +43,16 @@ export default {
'January': 'Январь', 'February': 'Февраль', 'March': 'Март', 'April': 'Апрель',
'June': 'Июнь', 'July': 'Июль', 'August': 'Август', 'September': 'Сентябрь',
'October': 'Октябрь', 'November': 'Ноябрь', 'December': 'Декабрь',
'Quick check-in ⚖️': 'Быстрое взвешивание ⚖️',
'Quick check-in': 'Быстрое взвешивание',
'Log body weight': 'Записать вес тела',
'Slide or tap to set your weight — tracked before every workout so your curve stays honest.': 'Сдвинь или коснись, чтобы указать вес — он записывается перед каждой тренировкой, чтобы кривая была честной.',
'Save & start workout': 'Сохранить и начать тренировку',
'Skip today': 'Пропустить сегодня',
'↺ Choose a different workout': '↺ Выбрать другую тренировку',
'Choose a different workout': 'Выбрать другую тренировку',
'Recent weigh-ins': 'Последние взвешивания',
'Enter a valid weight': 'Введите корректный вес',
'Weight saved ✓': 'Вес сохранён ✓',
'Target weight 🎯': 'Целевой вес 🎯',
'Weight saved': 'Вес сохранён',
'Target weight': 'Целевой вес',
'Your goal is drawn as a line through the weight charts, and gains/losses are colored by whether they move toward it.': 'Цель показана линией на графиках веса, а изменения окрашиваются в зависимости от того, приближают ли они к ней.',
'Save goal': 'Сохранить цель',
'Goal set: {0}': 'Цель установлена: {0}',
@@ -60,17 +60,17 @@ export default {
'Goal removed': 'Цель удалена',
'Remove goal': 'Удалить цель',
'Body weight': 'Вес тела',
'reached! 🎉': 'достигнута! 🎉',
'reached!': 'достигнута!',
'{0} to gain': 'набрать {0}',
'{0} to lose': 'сбросить {0}',
"No entries yet — log your weight to start the curve. It's also asked before every workout.": 'Записей пока нет — внеси вес, чтобы начать кривую. Он также запрашивается перед каждой тренировкой.',
'Best:': 'Рекорд:',
'+ Add to my plan': '+ Добавить в мой план',
'Add to my plan': 'Добавить в мой план',
'How to': 'Техника выполнения',
'instructions in English': 'инструкции на английском',
'New routine': 'Новая программа',
'Add “{0}”': 'Добавить «{0}»',
'“{0}” added to {1} ✓': '«{0}» добавлено в {1} ✓',
'“{0}” added to {1}': '«{0}» добавлено в {1}',
'Pick a routine — sets, reps & weight come next.': 'Выбери программу — подходы, повторения и вес будут дальше.',
'{0} exercises': 'Упражнений: {0}',
'already in': 'уже есть',
@@ -79,7 +79,7 @@ export default {
'Search {0} exercises…': 'Поиск среди {0} упражнений…',
'Chosen': 'Избранные',
'Nothing chosen yet — add exercises and they’ll show up here.': 'Пока ничего нет — добавляй упражнения, и они появятся здесь.',
'No match 🤷': 'Ничего не найдено 🤷',
'No match': 'Ничего не найдено',
'Show more': 'Показать ещё',
'Intervals': 'Интервалы',
'Minutes': 'Минуты',
@@ -89,10 +89,10 @@ export default {
'Weight ({0})': 'Вес ({0})',
'Add to routine': 'Добавить в программу',
'Remove exercise': 'Убрать упражнение',
'Pick an emoji': 'Выбери эмодзи',
'Pick an icon': 'Выбери иконку',
'Back to weekly plan': 'Вернуться к недельному плану',
'{0} set to rest': '{0} — теперь день отдыха',
'{0} planned for {1} ✓': '{0} запланировано на {1} ✓',
'{0} planned for {1}': '{0} запланировано на {1}',
'Weekly plan:': 'Недельный план:',
'changed for this day': 'изменено для этого дня',
'Sick, missed a day or want a different session? Pick what to train instead.': 'Заболел, пропустил день или хочешь другую тренировку? Выбери, что делать вместо этого.',
@@ -115,23 +115,23 @@ export default {
'Confirm the weight you worked with — your highest becomes the default next time.': 'Подтверди рабочий вес — наибольший станет значением по умолчанию в следующий раз.',
'Then finish the superset partner.': 'Затем доделай второе упражнение суперсета.',
'Previous best:': 'Прежний рекорд:',
'new record! 🏆': 'новый рекорд! 🏆',
'Save ✓': 'Сохранить ✓',
'Save & next exercise ›': 'Сохранить и к следующему ›',
'new record!': 'новый рекорд!',
'Save': 'Сохранить',
'Save & next exercise': 'Сохранить и к следующему',
'Just close': 'Просто закрыть',
'Save weight': 'Сохранить вес',
'Tracked — next time starts at {0} 📈': 'Записано — в следующий раз начнёшь с {0} 📈',
'Tracked — next time starts at {0}': 'Записано — в следующий раз начнёшь с {0}',
"That's the whole workout!": 'Это была вся тренировка!',
'Every exercise done — great work. Finish up, or keep going and add another exercise.': 'Все упражнения выполнены — отличная работа! Завершай или продолжай и добавь ещё упражнение.',
'Finish workout 🏁': 'Завершить тренировку 🏁',
'Finish workout': 'Завершить тренировку',
'Continue workout': 'Продолжить тренировку',
'Keep going 💪 — tap “+ Add exercise” below': 'Продолжай 💪 — нажми «+ Добавить упражнение» ниже',
'Keep going — tap “+ Add exercise” below': 'Продолжай — нажми «+ Добавить упражнение» ниже',
'Workout complete!': 'Тренировка завершена!',
'Duration': 'Время',
'Volume': 'Объём',
'PRs': 'Рекорды',
'New PR:': 'Новый рекорд:',
'Nice! 💪': 'Отлично! 💪',
'Nice!': 'Отлично!',
'Nothing logged yet': 'Пока ничего не записано',
'You haven’t checked off any sets. Finish the workout anyway?': 'Ни один подход не отмечен. Всё равно завершить тренировку?',
'Finish anyway': 'Всё равно завершить',
@@ -151,10 +151,10 @@ export default {
'Duration (min)': 'Время (мин)',
'Last time': 'В прошлый раз',
'Last time you hit all reps — try {0}': 'В прошлый раз все повторения сделаны — попробуй {0}',
'Weights bumped to {0} 💪': 'Веса подняты до {0} 💪',
'Weights bumped to {0}': 'Веса подняты до {0}',
'Remove set': 'Убрать подход',
'Add set': 'Добавить подход',
'Cardio logged 🏃': 'Кардио записано 🏃',
'Cardio logged': 'Кардио записано',
'Discard workout?': 'Отменить тренировку?',
'The sets you logged in this session will be lost.': 'Подходы, записанные в этой сессии, будут потеряны.',
'Superset {0} / {1}': 'Суперсет {0} / {1}',
@@ -162,12 +162,12 @@ export default {
'Superset · do these back-to-back, rest after both': 'Суперсет · выполняй подряд, отдых после обоих',
'Freestyle workout — add your first exercise.': 'Свободная тренировка — добавь первое упражнение.',
'Finish workout early · {0} exercises': 'Завершить раньше · упражнений: {0}',
'Rest over — next set! 💪': 'Отдых окончен — следующий подход! 💪',
'Hi {0} 💪': 'Привет, {0} 💪',
'Rest over — next set!': 'Отдых окончен — следующий подход!',
'Hi {0}': 'Привет, {0}',
'This week': 'Эта неделя',
'{0} — in progress': '{0} — идёт',
'Resume ▶': 'Продолжить ▶',
'Welcome! 👋': 'Добро пожаловать! 👋',
'Welcome!': 'Добро пожаловать!',
'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Настрой свой недельный план — или загрузи готовый план Push / Pull / Ноги.',
'Load starter plan (PPL)': 'Загрузить стартовый план (PPL)',
'Build my own plan': 'Создать свой план',
@@ -185,7 +185,7 @@ export default {
'Exercise progress': 'Прогресс упражнений',
'Top speed per workout': 'Максимальная скорость за тренировку',
'Best set weight per workout': 'Лучший вес за тренировку',
'Finish your first workout to see progress curves here. 📈': 'Заверши первую тренировку, чтобы увидеть здесь кривые прогресса. 📈',
'Finish your first workout to see progress curves here.': 'Заверши первую тренировку, чтобы увидеть здесь кривые прогресса.',
'Recent workouts': 'Недавние тренировки',
'Less time': 'Меньше',
'More time': 'Больше',
@@ -198,7 +198,7 @@ export default {
'Load starter plan (Push / Pull / Legs)': 'Загрузить стартовый план (Push / Pull / Ноги)',
'Superset with exercise above': 'Суперсет с упражнением выше',
'No exercises yet — add your first one.': 'Упражнений пока нет — добавь первое.',
'Tip: tap 🔗 on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Совет: нажми 🔗 у упражнения, чтобы объединить его в суперсет с тем, что выше — будешь делать их подряд.',
'Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Нажми кнопку связи у упражнения, чтобы объединить его в суперсет с тем, что выше — сделаешь их подряд.',
'Delete routine?': 'Удалить программу?',
'“{0}” and its exercises will be removed.': '«{0}» и её упражнения будут удалены.',
'Delete routine': 'Удалить программу',
@@ -207,13 +207,13 @@ export default {
'No workouts yet.': 'Тренировок пока нет.',
'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Стартовый план загружен — Пн Push · Ср Pull · Пт Ноги',
'Enter a name': 'Введите имя',
'Profile created — data from this device moved into it ✓': 'Профиль создан — данные с этого устройства перенесены в него ✓',
'Profile created — data moved into it ✓': 'Профиль создан — данные перенесены ✓',
'Welcome, {0} 💪': 'Добро пожаловать, {0} 💪',
'Welcome back, {0} 💪': 'С возвращением, {0} 💪',
'Profile created — data from this device moved into it': 'Профиль создан — данные с этого устройства перенесены в него',
'Profile created — data moved into it': 'Профиль создан — данные перенесены',
'Welcome, {0}': 'Добро пожаловать, {0}',
'Welcome back, {0}': 'С возвращением, {0}',
'Registration failed': 'Регистрация не удалась',
'Sign-in failed': 'Вход не удался',
'Create your profile ✨': 'Создай свой профиль ✨',
'Create your profile': 'Создай свой профиль',
'Pick a name, then confirm with {0}. The passkey is saved in your device — no password needed.': 'Выбери имя и подтверди через {0}. Ключ доступа сохраняется на устройстве — пароль не нужен.',
'Pick a name, then confirm with your device.': 'Выбери имя и подтверди на устройстве.',
'Your name': 'Твоё имя',
@@ -254,10 +254,10 @@ export default {
'Deletes your plan, workouts and body weight on this device. This cannot be undone.': 'Удаляет план, тренировки и вес тела на этом устройстве. Отменить нельзя.',
'Delete everything': 'Удалить всё',
'All data reset': 'Все данные сброшены',
'Backup exported ✓': 'Копия экспортирована ✓',
'Backup exported': 'Копия экспортирована',
'Import backup?': 'Импортировать копию?',
'This replaces all current data with the backup file.': 'Все текущие данные будут заменены файлом резервной копии.',
'Backup imported ✓': 'Копия импортирована ✓',
'Backup imported': 'Копия импортирована',
'Import failed: {0}': 'Импорт не удался: {0}',
'Tip': 'Совет',
'In Chrome: ⋮ menu → Add to Home screen': 'В Chrome: меню ⋮ → Добавить на главный экран',
@@ -278,13 +278,21 @@ export default {
'Test sent — should arrive any second': 'Тест отправлен — придёт с секунды на секунду',
'Test failed': 'Тест не удался',
'Notifications off': 'Уведомления выключены',
'Notifications on 🔔': 'Уведомления включены 🔔',
'Notifications on': 'Уведомления включены',
'Could not change notification settings': 'Не удалось изменить настройки уведомлений',
'tap to pause': 'нажми для паузы',
'tap to play': 'нажми для запуска',
'back': 'спина', 'cardio': 'кардио', 'chest': 'грудь', 'lower arms': 'предплечья',
'lower legs': 'голени', 'neck': 'шея', 'shoulders': 'плечи',
'upper arms': 'руки', 'upper legs': 'бёдра', 'waist': 'пресс',
'Details': 'Детали',
'Finish': 'Завершить',
'Start {0}': 'Начать {0}',
'Guest mode — data lives only in this browser.': 'Гостевой режим — данные хранятся только в этом браузере.',
'Keeps your data safe and separate per person.': 'Хранит твои данные безопасно и отдельно для каждого.',
'Strength': 'Сила',
'Equipment': 'Инвентарь',
'Recovery': 'Восстановление',
'Any equipment': 'Любой инвентарь',
'assisted': 'с поддержкой', 'band': 'лента', 'barbell': 'штанга', 'body weight': 'свой вес',
'bosu ball': 'босу', 'cable': 'блок', 'dumbbell': 'гантель',
@@ -321,11 +329,11 @@ export default {
'Give it a name': 'Задайте название',
'Pick a body part': 'Выберите часть тела',
'“{0}” already exists': '«{0}» уже существует',
'“{0}” created ✓': '«{0}» создано ✓',
'“{0}” created': '«{0}» создано',
'Cardio exercises log time + speed instead of weight × reps.': 'Кардио-упражнения записывают время + скорость вместо веса × повторов.',
'custom': 'своё',
'Edit': 'Изменить',
'Saved ✓': 'Сохранено ✓',
'Saved': 'Сохранено',
'Delete “{0}”?': 'Удалить «{0}»?',
'It will be removed from your routines. Already-logged workouts keep their sets.': 'Оно будет убрано из ваших программ. Записанные тренировки сохранят свои подходы.',
'Exercise deleted': 'Упражнение удалено',
+42 -34
View File
@@ -43,16 +43,16 @@ export default {
'January': 'Ocak', 'February': 'Şubat', 'March': 'Mart', 'April': 'Nisan',
'June': 'Haziran', 'July': 'Temmuz', 'August': 'Ağustos', 'September': 'Eylül',
'October': 'Ekim', 'November': 'Kasım', 'December': 'Aralık',
'Quick check-in ⚖️': 'Hızlı tartı ⚖️',
'Quick check-in': 'Hızlı tartı',
'Log body weight': 'Vücut ağırlığını kaydet',
'Slide or tap to set your weight — tracked before every workout so your curve stays honest.': 'Kilonu ayarlamak için kaydır veya dokun — eğrin dürüst kalsın diye her antrenmandan önce kaydedilir.',
'Save & start workout': 'Kaydet ve antrenmana başla',
'Skip today': 'Bugün atla',
'↺ Choose a different workout': '↺ Farklı bir antrenman seç',
'Choose a different workout': 'Farklı bir antrenman seç',
'Recent weigh-ins': 'Son tartılar',
'Enter a valid weight': 'Geçerli bir ağırlık gir',
'Weight saved ✓': 'Ağırlık kaydedildi ✓',
'Target weight 🎯': 'Hedef kilo 🎯',
'Weight saved': 'Ağırlık kaydedildi',
'Target weight': 'Hedef kilo',
'Your goal is drawn as a line through the weight charts, and gains/losses are colored by whether they move toward it.': 'Hedefin kilo grafiklerinde bir çizgi olarak gösterilir; artış/azalışlar hedefe yaklaşıp yaklaşmadığına göre renklendirilir.',
'Save goal': 'Hedefi kaydet',
'Goal set: {0}': 'Hedef belirlendi: {0}',
@@ -60,17 +60,17 @@ export default {
'Goal removed': 'Hedef kaldırıldı',
'Remove goal': 'Hedefi kaldır',
'Body weight': 'Vücut ağırlığı',
'reached! 🎉': 'ulaşıldı! 🎉',
'reached!': 'ulaşıldı!',
'{0} to gain': 'alınacak {0}',
'{0} to lose': 'verilecek {0}',
"No entries yet — log your weight to start the curve. It's also asked before every workout.": 'Henüz kayıt yok — eğriyi başlatmak için kilonu gir. Her antrenmandan önce de sorulur.',
'Best:': 'Rekor:',
'+ Add to my plan': '+ Planıma ekle',
'Add to my plan': 'Planıma ekle',
'How to': 'Nasıl yapılır',
'instructions in English': 'talimatlar İngilizce',
'New routine': 'Yeni rutin',
'Add “{0}”': '“{0}” ekle',
'“{0}” added to {1} ✓': '“{0}”, {1} planına eklendi ✓',
'“{0}” added to {1}': '“{0}”, {1} planına eklendi',
'Pick a routine — sets, reps & weight come next.': 'Bir rutin seç — set, tekrar ve ağırlık sonra gelir.',
'{0} exercises': '{0} egzersiz',
'already in': 'zaten var',
@@ -79,7 +79,7 @@ export default {
'Search {0} exercises…': '{0} egzersiz içinde ara…',
'Chosen': 'Seçilenler',
'Nothing chosen yet — add exercises and they’ll show up here.': 'Henüz seçim yok — egzersiz ekledikçe burada görünecekler.',
'No match 🤷': 'Sonuç yok 🤷',
'No match': 'Sonuç yok',
'Show more': 'Daha fazla göster',
'Intervals': 'Aralıklar',
'Minutes': 'Dakika',
@@ -89,10 +89,10 @@ export default {
'Weight ({0})': 'Ağırlık ({0})',
'Add to routine': 'Rutine ekle',
'Remove exercise': 'Egzersizi kaldır',
'Pick an emoji': 'Bir emoji seç',
'Pick an icon': 'Bir simge seç',
'Back to weekly plan': 'Haftalık plana dön',
'{0} set to rest': '{0} dinlenme olarak ayarlandı',
'{0} planned for {1} ✓': '{0}, {1} için planlandı ✓',
'{0} planned for {1}': '{0}, {1} için planlandı',
'Weekly plan:': 'Haftalık plan:',
'changed for this day': 'bu gün için değiştirildi',
'Sick, missed a day or want a different session? Pick what to train instead.': 'Hasta mısın, gün mü kaçırdın ya da farklı bir seans mı istiyorsun? Yerine ne çalışacağını seç.',
@@ -115,23 +115,23 @@ export default {
'Confirm the weight you worked with — your highest becomes the default next time.': 'Çalıştığın ağırlığı onayla — en yükseği bir dahaki sefer varsayılan olur.',
'Then finish the superset partner.': 'Sonra süpersetin diğer egzersizini bitir.',
'Previous best:': 'Önceki rekor:',
'new record! 🏆': 'yeni rekor! 🏆',
'Save ✓': 'Kaydet ✓',
'Save & next exercise ›': 'Kaydet ve sonraki egzersiz ›',
'new record!': 'yeni rekor!',
'Save': 'Kaydet',
'Save & next exercise': 'Kaydet ve sonraki egzersiz',
'Just close': 'Sadece kapat',
'Save weight': 'Ağırlığı kaydet',
'Tracked — next time starts at {0} 📈': 'Kaydedildi — bir dahaki sefer {0} ile başlarsın 📈',
'Tracked — next time starts at {0}': 'Kaydedildi — bir dahaki sefer {0} ile başlarsın',
"That's the whole workout!": 'Antrenmanın tamamı buydu!',
'Every exercise done — great work. Finish up, or keep going and add another exercise.': 'Tüm egzersizler bitti — harika iş! Bitir ya da devam edip yeni bir egzersiz ekle.',
'Finish workout 🏁': 'Antrenmanı bitir 🏁',
'Finish workout': 'Antrenmanı bitir',
'Continue workout': 'Antrenmana devam et',
'Keep going 💪 — tap “+ Add exercise” below': 'Devam 💪 — aşağıdaki “+ Egzersiz ekle”ye dokun',
'Keep going — tap “+ Add exercise” below': 'Devam — aşağıdaki “+ Egzersiz ekle”ye dokun',
'Workout complete!': 'Antrenman tamamlandı!',
'Duration': 'Süre',
'Volume': 'Hacim',
'PRs': 'Rekorlar',
'New PR:': 'Yeni rekor:',
'Nice! 💪': 'Süper! 💪',
'Nice!': 'Süper!',
'Nothing logged yet': 'Henüz kayıt yok',
'You haven’t checked off any sets. Finish the workout anyway?': 'Hiç set işaretlemedin. Yine de antrenman bitsin mi?',
'Finish anyway': 'Yine de bitir',
@@ -151,10 +151,10 @@ export default {
'Duration (min)': 'Süre (dk)',
'Last time': 'Geçen sefer',
'Last time you hit all reps — try {0}': 'Geçen sefer tüm tekrarları yaptın — {0} dene',
'Weights bumped to {0} 💪': 'Ağırlıklar {0} değerine çıkarıldı 💪',
'Weights bumped to {0}': 'Ağırlıklar {0} değerine çıkarıldı',
'Remove set': 'Set kaldır',
'Add set': 'Set ekle',
'Cardio logged 🏃': 'Kardiyo kaydedildi 🏃',
'Cardio logged': 'Kardiyo kaydedildi',
'Discard workout?': 'Antrenman iptal edilsin mi?',
'The sets you logged in this session will be lost.': 'Bu oturumda kaydettiğin setler kaybolacak.',
'Superset {0} / {1}': 'Süperset {0} / {1}',
@@ -162,12 +162,12 @@ export default {
'Superset · do these back-to-back, rest after both': 'Süperset · art arda yap, ikisinden sonra dinlen',
'Freestyle workout — add your first exercise.': 'Serbest antrenman — ilk egzersizini ekle.',
'Finish workout early · {0} exercises': 'Erken bitir · {0} egzersiz',
'Rest over — next set! 💪': 'Dinlenme bitti — sıradaki set! 💪',
'Hi {0} 💪': 'Selam {0} 💪',
'Rest over — next set!': 'Dinlenme bitti — sıradaki set!',
'Hi {0}': 'Selam {0}',
'This week': 'Bu hafta',
'{0} — in progress': '{0} — devam ediyor',
'Resume ▶': 'Devam et ▶',
'Welcome! 👋': 'Hoş geldin! 👋',
'Welcome!': 'Hoş geldin!',
'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Başlamak için haftalık rutinini kur — ya da hazır bir Push / Pull / Bacak planı yükle.',
'Load starter plan (PPL)': 'Başlangıç planını yükle (PPL)',
'Build my own plan': 'Kendi planımı oluştur',
@@ -185,7 +185,7 @@ export default {
'Exercise progress': 'Egzersiz ilerlemesi',
'Top speed per workout': 'Antrenman başına en yüksek hız',
'Best set weight per workout': 'Antrenman başına en iyi set ağırlığı',
'Finish your first workout to see progress curves here. 📈': 'İlerleme eğrilerini görmek için ilk antrenmanını bitir. 📈',
'Finish your first workout to see progress curves here.': 'İlerleme eğrilerini görmek için ilk antrenmanını bitir.',
'Recent workouts': 'Son antrenmanlar',
'Less time': 'Az',
'More time': 'Çok',
@@ -198,7 +198,7 @@ export default {
'Load starter plan (Push / Pull / Legs)': 'Başlangıç planını yükle (Push / Pull / Bacak)',
'Superset with exercise above': 'Üstteki egzersizle süperset',
'No exercises yet — add your first one.': 'Henüz egzersiz yok — ilkini ekle.',
'Tip: tap 🔗 on an exercise to superset it with the one above — you’ll do them back-to-back.': 'İpucu: bir egzersizde 🔗 simgesine dokunarak üsttekiyle süperset yap — art arda yaparsın.',
'Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Bir egzersizde bağlama düğmesine dokunarak üsttekiyle süperset yap — arka arkaya yaparsın.',
'Delete routine?': 'Rutin silinsin mi?',
'“{0}” and its exercises will be removed.': '“{0}” ve egzersizleri kaldırılacak.',
'Delete routine': 'Rutini sil',
@@ -207,13 +207,13 @@ export default {
'No workouts yet.': 'Henüz antrenman yok.',
'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Başlangıç planı yüklendi — Pzt Push · Çar Pull · Cum Bacak',
'Enter a name': 'Bir isim gir',
'Profile created — data from this device moved into it ✓': 'Profil oluşturuldu — bu cihazdaki veriler profile taşındı ✓',
'Profile created — data moved into it ✓': 'Profil oluşturuldu — veriler taşındı ✓',
'Welcome, {0} 💪': 'Hoş geldin, {0} 💪',
'Welcome back, {0} 💪': 'Tekrar hoş geldin, {0} 💪',
'Profile created — data from this device moved into it': 'Profil oluşturuldu — bu cihazdaki veriler profile taşındı',
'Profile created — data moved into it': 'Profil oluşturuldu — veriler taşındı',
'Welcome, {0}': 'Hoş geldin, {0}',
'Welcome back, {0}': 'Tekrar hoş geldin, {0}',
'Registration failed': 'Kayıt başarısız',
'Sign-in failed': 'Giriş başarısız',
'Create your profile ✨': 'Profilini oluştur ✨',
'Create your profile': 'Profilini oluştur',
'Pick a name, then confirm with {0}. The passkey is saved in your device — no password needed.': 'Bir isim seç, sonra {0} ile onayla. Geçiş anahtarı cihazına kaydedilir — şifre gerekmez.',
'Pick a name, then confirm with your device.': 'Bir isim seç, sonra cihazınla onayla.',
'Your name': 'İsmin',
@@ -254,10 +254,10 @@ export default {
'Deletes your plan, workouts and body weight on this device. This cannot be undone.': 'Bu cihazdaki planını, antrenmanlarını ve vücut ağırlığını siler. Geri alınamaz.',
'Delete everything': 'Her şeyi sil',
'All data reset': 'Tüm veriler sıfırlandı',
'Backup exported ✓': 'Yedek dışa aktarıldı ✓',
'Backup exported': 'Yedek dışa aktarıldı',
'Import backup?': 'Yedek içe aktarılsın mı?',
'This replaces all current data with the backup file.': 'Bu, mevcut tüm verileri yedek dosyasıyla değiştirir.',
'Backup imported ✓': 'Yedek içe aktarıldı ✓',
'Backup imported': 'Yedek içe aktarıldı',
'Import failed: {0}': 'İçe aktarma başarısız: {0}',
'Tip': 'İpucu',
'In Chrome: ⋮ menu → Add to Home screen': 'Chrome’da: ⋮ menü → Ana ekrana ekle',
@@ -278,13 +278,21 @@ export default {
'Test sent — should arrive any second': 'Test gönderildi — her an gelebilir',
'Test failed': 'Test başarısız',
'Notifications off': 'Bildirimler kapalı',
'Notifications on 🔔': 'Bildirimler açık 🔔',
'Notifications on': 'Bildirimler açık',
'Could not change notification settings': 'Bildirim ayarları değiştirilemedi',
'tap to pause': 'duraklatmak için dokun',
'tap to play': 'oynatmak için dokun',
'back': 'sırt', 'cardio': 'kardiyo', 'chest': 'göğüs', 'lower arms': 'ön kollar',
'lower legs': 'baldırlar', 'neck': 'boyun', 'shoulders': 'omuzlar',
'upper arms': 'üst kollar', 'upper legs': 'bacaklar', 'waist': 'karın',
'Details': 'Ayrıntılar',
'Finish': 'Bitir',
'Start {0}': '{0} başlat',
'Guest mode — data lives only in this browser.': 'Misafir modu — veriler yalnızca bu tarayıcıda kalır.',
'Keeps your data safe and separate per person.': 'Verilerini güvende ve kişi başına ayrı tutar.',
'Strength': 'Kuvvet',
'Equipment': 'Ekipman',
'Recovery': 'Toparlanma',
'Any equipment': 'Tüm ekipmanlar',
'assisted': 'destekli', 'band': 'bant', 'barbell': 'halter', 'body weight': 'vücut ağırlığı',
'bosu ball': 'bosu topu', 'cable': 'kablo', 'dumbbell': 'dambıl',
@@ -321,11 +329,11 @@ export default {
'Give it a name': 'Bir ad ver',
'Pick a body part': 'Bir vücut bölgesi seç',
'“{0}” already exists': '“{0}” zaten var',
'“{0}” created ✓': '“{0}” oluşturuldu ✓',
'“{0}” created': '“{0}” oluşturuldu',
'Cardio exercises log time + speed instead of weight × reps.': 'Kardiyo egzersizleri ağırlık × tekrar yerine süre + hız kaydeder.',
'custom': 'özel',
'Edit': 'Düzenle',
'Saved ✓': 'Kaydedildi ✓',
'Saved': 'Kaydedildi',
'Delete “{0}”?': '“{0}” silinsin mi?',
'It will be removed from your routines. Already-logged workouts keep their sets.': 'Rutinlerinden kaldırılacak. Kayıtlı antrenmanlar setlerini korur.',
'Exercise deleted': 'Egzersiz silindi',
+42 -34
View File
@@ -43,16 +43,16 @@ export default {
'January': '一月', 'February': '二月', 'March': '三月', 'April': '四月',
'June': '六月', 'July': '七月', 'August': '八月', 'September': '九月',
'October': '十月', 'November': '十一月', 'December': '十二月',
'Quick check-in ⚖️': '快速称重 ⚖️',
'Quick check-in': '快速称重',
'Log body weight': '记录体重',
'Slide or tap to set your weight — tracked before every workout so your curve stays honest.': '滑动或点按设置体重——每次训练前记录,让你的曲线保持真实。',
'Save & start workout': '保存并开始训练',
'Skip today': '今天跳过',
'↺ Choose a different workout': '↺ 选择其他训练',
'Choose a different workout': '选择其他训练',
'Recent weigh-ins': '最近称重',
'Enter a valid weight': '请输入有效的重量',
'Weight saved ✓': '体重已保存 ✓',
'Target weight 🎯': '目标体重 🎯',
'Weight saved': '体重已保存',
'Target weight': '目标体重',
'Your goal is drawn as a line through the weight charts, and gains/losses are colored by whether they move toward it.': '目标会以一条线显示在体重图表中,增减会根据是否朝目标靠近来着色。',
'Save goal': '保存目标',
'Goal set: {0}': '目标已设置:{0}',
@@ -60,17 +60,17 @@ export default {
'Goal removed': '目标已移除',
'Remove goal': '移除目标',
'Body weight': '体重',
'reached! 🎉': '已达成!🎉',
'reached!': '已达成!',
'{0} to gain': '还需增重 {0}',
'{0} to lose': '还需减重 {0}',
"No entries yet — log your weight to start the curve. It's also asked before every workout.": '还没有记录——记录体重以开始曲线。每次训练前也会询问。',
'Best:': '最佳:',
'+ Add to my plan': '+ 加入我的计划',
'Add to my plan': '加入我的计划',
'How to': '动作要领',
'instructions in English': '说明为英文',
'New routine': '新训练日',
'Add “{0}”': '添加“{0}”',
'“{0}” added to {1} ✓': '“{0}”已加入 {1} ✓',
'“{0}” added to {1}': '“{0}”已加入 {1}',
'Pick a routine — sets, reps & weight come next.': '选择一个训练日——组数、次数和重量随后设置。',
'{0} exercises': '{0} 个动作',
'already in': '已包含',
@@ -79,7 +79,7 @@ export default {
'Search {0} exercises…': '搜索 {0} 个动作…',
'Chosen': '常用',
'Nothing chosen yet — add exercises and they’ll show up here.': '还没有常用动作——添加后会显示在这里。',
'No match 🤷': '没有匹配 🤷',
'No match': '没有匹配',
'Show more': '显示更多',
'Intervals': '间歇数',
'Minutes': '分钟',
@@ -89,10 +89,10 @@ export default {
'Weight ({0})': '重量({0})',
'Add to routine': '加入训练日',
'Remove exercise': '移除动作',
'Pick an emoji': '选择表情',
'Pick an icon': '选择图标',
'Back to weekly plan': '恢复每周计划',
'{0} set to rest': '{0} 已设为休息',
'{0} planned for {1} ✓': '{0} 已安排在 {1} ✓',
'{0} planned for {1}': '{0} 已安排在 {1}',
'Weekly plan:': '每周计划:',
'changed for this day': '此日已更改',
'Sick, missed a day or want a different session? Pick what to train instead.': '生病、错过一天或想换个训练?选择改练什么。',
@@ -115,23 +115,23 @@ export default {
'Confirm the weight you worked with — your highest becomes the default next time.': '确认你使用的重量——最高值将成为下次的默认值。',
'Then finish the superset partner.': '然后完成超级组的另一个动作。',
'Previous best:': '之前最佳:',
'new record! 🏆': '新纪录!🏆',
'Save ✓': '保存 ✓',
'Save & next exercise ›': '保存并下一个动作 ›',
'new record!': '新纪录!',
'Save': '保存',
'Save & next exercise': '保存并下一个动作',
'Just close': '仅关闭',
'Save weight': '保存重量',
'Tracked — next time starts at {0} 📈': '已记录——下次从 {0} 开始 📈',
'Tracked — next time starts at {0}': '已记录——下次从 {0} 开始',
"That's the whole workout!": '训练全部完成!',
'Every exercise done — great work. Finish up, or keep going and add another exercise.': '所有动作都完成了——干得漂亮!结束训练,或继续添加新动作。',
'Finish workout 🏁': '结束训练 🏁',
'Finish workout': '结束训练',
'Continue workout': '继续训练',
'Keep going 💪 — tap “+ Add exercise” below': '继续加油 💪——点按下方“+ 添加动作”',
'Keep going — tap “+ Add exercise” below': '继续加油 ——点按下方“+ 添加动作”',
'Workout complete!': '训练完成!',
'Duration': '时长',
'Volume': '总量',
'PRs': '纪录',
'New PR:': '新纪录:',
'Nice! 💪': '太棒了!💪',
'Nice!': '太棒了!',
'Nothing logged yet': '还没有记录',
'You haven’t checked off any sets. Finish the workout anyway?': '你还没有勾选任何组。仍要结束训练吗?',
'Finish anyway': '仍然结束',
@@ -151,10 +151,10 @@ export default {
'Duration (min)': '时长(分钟)',
'Last time': '上次',
'Last time you hit all reps — try {0}': '上次完成了所有次数——试试 {0}',
'Weights bumped to {0} 💪': '重量已提升到 {0} 💪',
'Weights bumped to {0}': '重量已提升到 {0}',
'Remove set': '减一组',
'Add set': '加一组',
'Cardio logged 🏃': '有氧已记录 🏃',
'Cardio logged': '有氧已记录',
'Discard workout?': '放弃训练?',
'The sets you logged in this session will be lost.': '本次记录的组数将丢失。',
'Superset {0} / {1}': '超级组 {0} / {1}',
@@ -162,12 +162,12 @@ export default {
'Superset · do these back-to-back, rest after both': '超级组 · 连续完成,两个都做完再休息',
'Freestyle workout — add your first exercise.': '自由训练——添加你的第一个动作。',
'Finish workout early · {0} exercises': '提前结束 · {0} 个动作',
'Rest over — next set! 💪': '休息结束——下一组!💪',
'Hi {0} 💪': '你好,{0} 💪',
'Rest over — next set!': '休息结束——下一组!',
'Hi {0}': '你好,{0}',
'This week': '本周',
'{0} — in progress': '{0}——进行中',
'Resume ▶': '继续 ▶',
'Welcome! 👋': '欢迎!👋',
'Welcome!': '欢迎!',
'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': '设置每周计划开始训练——或加载现成的推 / 拉 / 腿计划。',
'Load starter plan (PPL)': '加载入门计划(PPL)',
'Build my own plan': '创建自己的计划',
@@ -185,7 +185,7 @@ export default {
'Exercise progress': '动作进度',
'Top speed per workout': '每次训练最高速度',
'Best set weight per workout': '每次训练最佳组重量',
'Finish your first workout to see progress curves here. 📈': '完成第一次训练后,这里会显示进度曲线。📈',
'Finish your first workout to see progress curves here.': '完成第一次训练后,这里会显示进度曲线。',
'Recent workouts': '最近训练',
'Less time': '少',
'More time': '多',
@@ -198,7 +198,7 @@ export default {
'Load starter plan (Push / Pull / Legs)': '加载入门计划(推 / 拉 / 腿)',
'Superset with exercise above': '与上面的动作组成超级组',
'No exercises yet — add your first one.': '还没有动作——添加第一个吧。',
'Tip: tap 🔗 on an exercise to superset it with the one above — you’ll do them back-to-back.': '提示:点按动作上的 🔗 可与上面的动作组成超级组——你将连续完成它们。',
'Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.': '点击动作上的链接按钮,可与上面的动作组成超级组——你将连续完成它们。',
'Delete routine?': '删除训练日?',
'“{0}” and its exercises will be removed.': '“{0}”及其动作将被移除。',
'Delete routine': '删除训练日',
@@ -207,13 +207,13 @@ export default {
'No workouts yet.': '还没有训练。',
'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': '入门计划已加载——周一推 · 周三拉 · 周五腿',
'Enter a name': '请输入名字',
'Profile created — data from this device moved into it ✓': '档案已创建——本设备数据已转入 ✓',
'Profile created — data moved into it ✓': '档案已创建——数据已转入 ✓',
'Welcome, {0} 💪': '欢迎,{0} 💪',
'Welcome back, {0} 💪': '欢迎回来,{0} 💪',
'Profile created — data from this device moved into it': '档案已创建——本设备数据已转入',
'Profile created — data moved into it': '档案已创建——数据已转入',
'Welcome, {0}': '欢迎,{0}',
'Welcome back, {0}': '欢迎回来,{0}',
'Registration failed': '注册失败',
'Sign-in failed': '登录失败',
'Create your profile ✨': '创建你的档案 ✨',
'Create your profile': '创建你的档案',
'Pick a name, then confirm with {0}. The passkey is saved in your device — no password needed.': '取个名字,然后用{0}确认。通行密钥保存在你的设备上——无需密码。',
'Pick a name, then confirm with your device.': '取个名字,然后用设备确认。',
'Your name': '你的名字',
@@ -254,10 +254,10 @@ export default {
'Deletes your plan, workouts and body weight on this device. This cannot be undone.': '删除本设备上的计划、训练和体重。无法撤销。',
'Delete everything': '全部删除',
'All data reset': '所有数据已重置',
'Backup exported ✓': '备份已导出 ✓',
'Backup exported': '备份已导出',
'Import backup?': '导入备份?',
'This replaces all current data with the backup file.': '这将用备份文件替换当前所有数据。',
'Backup imported ✓': '备份已导入 ✓',
'Backup imported': '备份已导入',
'Import failed: {0}': '导入失败:{0}',
'Tip': '提示',
'In Chrome: ⋮ menu → Add to Home screen': '在 Chrome 中:⋮ 菜单 → 添加到主屏幕',
@@ -278,13 +278,21 @@ export default {
'Test sent — should arrive any second': '测试已发送——马上就到',
'Test failed': '测试失败',
'Notifications off': '通知已关闭',
'Notifications on 🔔': '通知已开启 🔔',
'Notifications on': '通知已开启',
'Could not change notification settings': '无法更改通知设置',
'tap to pause': '点按暂停',
'tap to play': '点按播放',
'back': '背部', 'cardio': '有氧', 'chest': '胸部', 'lower arms': '前臂',
'lower legs': '小腿', 'neck': '颈部', 'shoulders': '肩部',
'upper arms': '上臂', 'upper legs': '大腿', 'waist': '腰腹',
'Details': '详情',
'Finish': '结束',
'Start {0}': '开始 {0}',
'Guest mode — data lives only in this browser.': '访客模式——数据仅保存在此浏览器中。',
'Keeps your data safe and separate per person.': '让你的数据安全,并按人分开保存。',
'Strength': '力量',
'Equipment': '器械',
'Recovery': '恢复',
'Any equipment': '所有器械',
'assisted': '辅助', 'band': '弹力带', 'barbell': '杠铃', 'body weight': '自重',
'bosu ball': '波速球', 'cable': '绳索', 'dumbbell': '哑铃',
@@ -321,11 +329,11 @@ export default {
'Give it a name': '请输入名称',
'Pick a body part': '请选择身体部位',
'“{0}” already exists': '「{0}」已存在',
'“{0}” created ✓': '「{0}」已创建 ✓',
'“{0}” created': '「{0}」已创建',
'Cardio exercises log time + speed instead of weight × reps.': '有氧动作记录时间 + 速度,而不是重量 × 次数。',
'custom': '自定义',
'Edit': '编辑',
'Saved ✓': '已保存 ✓',
'Saved': '已保存',
'Delete “{0}”?': '删除「{0}」?',
'It will be removed from your routines. Already-logged workouts keep their sets.': '将从你的计划中移除。已记录的训练会保留其组数。',
'Exercise deleted': '动作已删除',
+104 -87
View File
@@ -9,6 +9,9 @@ import { t, instrFor, getLang, INSTR_LANGS } from './lib/i18n.js'
import { nav } from './lib/nav.js'
import Media, { Thumb } from './components/Media.jsx'
import Stepper from './components/Stepper.jsx'
import Icon from './components/Icon.jsx'
import { Button, Slider } from './components/ui.jsx'
import { glyphOf, GLYPH_GROUPS, DEFAULT_GLYPH } from './lib/glyphs.js'
const S = () => useStore.getState().S
const update = (...a) => useStore.getState().update(...a)
@@ -23,7 +26,7 @@ function ConfirmDialog({ title, message, confirmText, cancelText, danger, onConf
<div className="muted" style={{ marginBottom: 18, lineHeight: 1.5 }}>{message}</div>
<button className={'btn ' + (danger ? 'danger' : 'primary')} onClick={() => { close(); onConfirm && onConfirm() }}>{confirmText || t('Confirm')}</button>
<div style={{ height: 8 }} />
<button className="btn ghost dim" onClick={close}>{cancelText || t('Cancel')}</button>
<Button variant="ghost" className="dim" onClick={close}>{cancelText || t('Cancel')}</Button>
</div>
}
// Themed replacement for window.confirm — callback-based (no blocking).
@@ -35,9 +38,9 @@ export function confirmSheet(opts) {
export function loadStarterPlan() {
const mk = (name, emoji, list) => ({ id: uid(), name, emoji, ex: list.map(([id, sets, reps]) => ({ id, sets, reps, weight: 0 })) })
update(st => {
const push = mk('Push Day', '🫸', [['0025', 4, 8], ['0047', 3, 10], ['0426', 3, 10], ['0334', 3, 12], ['0241', 3, 12], ['0251', 3, 10]])
const pull = mk('Pull Day', '🫷', [['2330', 4, 10], ['0027', 4, 8], ['1323', 3, 10], ['0031', 3, 10], ['0313', 3, 12]])
const legs = mk('Leg Day', '🦵', [['0043', 4, 8], ['0085', 3, 10], ['0739', 3, 12], ['0585', 3, 12], ['0586', 3, 12], ['0605', 4, 15]])
const push = mk('Push Day', 'barbell', [['0025', 4, 8], ['0047', 3, 10], ['0426', 3, 10], ['0334', 3, 12], ['0241', 3, 12], ['0251', 3, 10]])
const pull = mk('Pull Day', 'pullup', [['2330', 4, 10], ['0027', 4, 8], ['1323', 3, 10], ['0031', 3, 10], ['0313', 3, 12]])
const legs = mk('Leg Day', 'legs', [['0043', 4, 8], ['0085', 3, 10], ['0739', 3, 12], ['0585', 3, 12], ['0586', 3, 12], ['0605', 4, 15]])
st.routines.push(push, pull, legs)
st.week[1] = push.id; st.week[3] = pull.id; st.week[5] = legs.id
})
@@ -53,13 +56,12 @@ const W_LO = 1, W_HI = 300
function WeightInput({ value, setValue, unit }) {
const clamp = x => Math.max(W_LO, Math.min(W_HI, Math.round((x || 0) * 10) / 10))
const sv = Math.max(W_LO, Math.min(W_HI, value))
const pct = ((sv - W_LO) / (W_HI - W_LO)) * 100
const onSlide = v => setValue(clamp(v))
return <>
<div className="bwstep">
<button className="bw-pm" onClick={() => onSlide(value - 0.1)} aria-label="minus 0.1">−</button>
<button className="bw-pm" onClick={() => onSlide(value - 0.1)} aria-label="minus 0.1"><Icon name="minus" /></button>
<div className="bw-read">{fmtNum(value)}<span className="u"> {unit}</span></div>
<button className="bw-pm" onClick={() => onSlide(value + 0.1)} aria-label="plus 0.1">+</button>
<button className="bw-pm" onClick={() => onSlide(value + 0.1)} aria-label="plus 0.1"><Icon name="plus" /></button>
</div>
<div className="chips" style={{ justifyContent: 'center', margin: '8px 0' }}>
<button className="chip" onClick={() => onSlide(value - 1)}>−1</button>
@@ -67,9 +69,7 @@ function WeightInput({ value, setValue, unit }) {
<button className="chip" onClick={() => onSlide(value + 0.5)}>+0.5</button>
<button className="chip" onClick={() => onSlide(value + 1)}>+1</button>
</div>
<input className="bw-slider" type="range" min={W_LO} max={W_HI} step="0.5" value={sv}
onChange={e => onSlide(parseFloat(e.target.value))}
style={{ '--track': `linear-gradient(90deg, var(--acc) ${pct}%, var(--bg2) ${pct}%)` }} />
<Slider value={sv} min={W_LO} max={W_HI} step={0.5} onChange={onSlide} />
</>
}
@@ -89,27 +89,27 @@ function BwSheet({ required, onDone, close }) {
s.bodyweight.sort((a, b) => (a.d < b.d ? -1 : 1))
})
close()
if (onDone) onDone(n); else toast(t('Weight saved ✓'))
if (onDone) onDone(n); else toast(t('Weight saved'))
}
const recent = [...st.bodyweight].reverse().slice(0, 3)
const delEntry = d => update(s => { s.bodyweight = s.bodyweight.filter(b => b.d !== d) })
return <>
<h3>{required ? t('Quick check-in ⚖️') : t('Log body weight')}</h3>
<h3>{required ? t('Quick check-in') : t('Log body weight')}</h3>
<div className="muted small">{required ? t('Slide or tap to set your weight — tracked before every workout so your curve stays honest.') : t('Today') + ', ' + fmtDate(todayISO(), true)}</div>
<WeightInput value={v} setValue={setV} unit={unit} />
<div style={{ height: 14 }} />
<button className="btn primary" onClick={save}>{required ? t('Save & start workout') : t('Save')}</button>
<Button variant="primary" onClick={save}>{required ? t('Save & start workout') : t('Save')}</Button>
{required && <>
<div style={{ height: 8 }} /><button className="btn ghost dim" onClick={() => { close(); onDone && onDone(null) }}>{t('Skip today')}</button>
<div style={{ height: 2 }} /><button className="btn ghost dim" onClick={() => { close(); nav('/workout') }}>{t('↺ Choose a different workout')}</button>
<div style={{ height: 8 }} /><Button variant="ghost" className="dim" onClick={() => { close(); onDone && onDone(null) }}>{t('Skip today')}</Button>
<div style={{ height: 2 }} /><Button variant="ghost" className="dim" icon="reset" onClick={() => { close(); nav('/workout') }}>{t('Choose a different workout')}</Button>
</>}
{!required && recent.length > 0 && <>
<h4 className="sec">{t('Recent weigh-ins')}</h4>
<div className="list" style={{ gap: 0 }}>
{recent.map(b => <div key={b.d} className="row between" style={{ padding: '9px 2px', borderBottom: '1px solid var(--bg2)' }}>
{recent.map(b => <div key={b.d} className="row between" style={{ padding: '9px 2px', borderBottom: '1px solid var(--sep)' }}>
<span className="small muted">{fmtDate(b.d, true)}</span>
<span className="row" style={{ gap: 12 }}><b>{fmtNum(b.w)} {unit}</b>
<button className="iconbtn" style={{ width: 34, height: 30, fontSize: '.9rem' }} onClick={() => delEntry(b.d)} aria-label="delete">🗑</button></span>
<button className="iconbtn" style={{ width: 32, height: 30, borderRadius: 8, fontSize: 15, color: 'var(--red)' }} onClick={() => delEntry(b.d)} aria-label="delete"><Icon name="trash" /></button></span>
</div>)}
</div>
</>}
@@ -122,8 +122,8 @@ export function bwSheet(opts = {}) {
/* ============================ target weight ============================ */
export function bwDeltaColor(delta, currentW) {
if (!delta) return 'var(--mut)'
if (!S().targetW) return 'var(--txt)'
if (!delta) return 'var(--label-2)'
if (!S().targetW) return 'var(--label)'
const up = S().targetW > currentW
return (delta > 0) === up ? 'var(--acc)' : 'var(--red)'
}
@@ -132,17 +132,17 @@ function GoalSheet({ close }) {
const bw = lastBW(st)
const [v, setV] = useState(st.targetW || (bw ? bw.w : 70))
return <>
<h3>{t('Target weight 🎯')}</h3>
<h3>{t('Target weight')}</h3>
<div className="muted small">{t('Your goal is drawn as a line through the weight charts, and gains/losses are colored by whether they move toward it.')}</div>
<WeightInput value={v} setValue={setV} unit={st.unit} />
<div style={{ height: 14 }} />
<button className="btn primary" onClick={() => {
<Button variant="primary" onClick={() => {
const n = Math.round((v || 0) * 10) / 10
if (!n || n <= 0) { toast(t('Enter a valid weight')); return }
update(s => { s.targetW = n }); close()
const b = lastBW(S()); toast(t('Goal set: {0}', fmtNum(n) + ' ' + st.unit) + (b ? ' (' + t('{0} to go', fmtNum(Math.abs(n - b.w))) + ')' : ''))
}}>{t('Save goal')}</button>
{st.targetW && <><div style={{ height: 8 }} /><button className="btn danger" onClick={() => { update(s => { s.targetW = null }); close(); toast(t('Goal removed')) }}>{t('Remove goal')}</button></>}
}}>{t('Save goal')}</Button>
{st.targetW && <><div style={{ height: 8 }} /><Button variant="danger" onClick={() => { update(s => { s.targetW = null }); close(); toast(t('Goal removed')) }}>{t('Remove goal')}</Button></>}
</>
}
export const goalSheet = () => ui().openSheet(close => <GoalSheet close={close} />)
@@ -157,16 +157,16 @@ function ExerciseDetail({ ex, close }) {
<Media ex={ex} />
<div className="row" style={{ gap: 6, flexWrap: 'wrap', margin: '10px 0' }}>
<span className="tag acc">{t(ex.bp)}</span>
{ex.tg && <span className="tag">🎯 {t(ex.tg)}</span>}
<span className="tag">🛠 {t(ex.eq)}</span>
{ex.tg && <span className="tag"><Icon name="target" />{t(ex.tg)}</span>}
<span className="tag"><Icon name="dumbbell" />{t(ex.eq)}</span>
{(ex.sm || []).slice(0, 3).map((s, i) => <span key={i} className="tag">{t(s)}</span>)}
</div>
{ex.desc && <div className="exnote">{ex.desc}</div>}
{best > 0 && <div className="small" style={{ marginBottom: 6 }}>🏆 {t('Best:')} <b className="accent">{fmtNum(best)} {st.unit}</b>{last ? ` · ${t('last')} ${fmtDate(last.d)}: ${last.sets.map(s => setLabel(ex.id, s)).join(', ')}` : ''}</div>}
<button className="btn primary" style={{ margin: '10px 0 4px' }} onClick={() => addToRoutineSheet(ex)}>{t('+ Add to my plan')}</button>
{best > 0 && <div className="small row" style={{ marginBottom: 6, gap: 5 }}><Icon name="trophy" style={{ fontSize: 14, color: 'var(--yellow)' }} />{t('Best:')} <b className="accent">{fmtNum(best)} {st.unit}</b>{last ? ` · ${t('last')} ${fmtDate(last.d)}: ${last.sets.map(s => setLabel(ex.id, s)).join(', ')}` : ''}</div>}
<Button variant="primary" icon="plus" style={{ margin: '10px 0 4px' }} onClick={() => addToRoutineSheet(ex)}>{t('Add to my plan')}</Button>
{ex.custom && <div className="row" style={{ gap: 8, marginTop: 8 }}>
<button className="btn" style={{ flex: 1 }} onClick={() => { close(); customExSheet(ex) }}>✏️ {t('Edit')}</button>
<button className="btn danger" style={{ flex: 1 }} onClick={() => deleteCustomEx(ex, close)}>🗑 {t('Delete')}</button>
<Button icon="pencil" style={{ flex: 1 }} onClick={() => { close(); customExSheet(ex) }}>{t('Edit')}</Button>
<Button variant="danger" icon="trash" style={{ flex: 1 }} onClick={() => deleteCustomEx(ex, close)}>{t('Delete')}</Button>
</div>}
{instrFor(ex).length > 0 && <><h4 className="sec">{t('How to')}{!INSTR_LANGS.includes(getLang()) && <span className="dim" style={{ textTransform: 'none', letterSpacing: 0 }}> · {t('instructions in English')}</span>}</h4><ol className="steps-list">{instrFor(ex).map((s, i) => <li key={i}>{s}</li>)}</ol></>}
</>
@@ -181,12 +181,12 @@ function AddToRoutine({ ex, close }) {
const isNew = rid === '_new'
exConfigSheet(ex, null, cfg => {
update(s => {
let r = isNew ? { id: uid(), name: t('New routine'), emoji: '💪', ex: [] } : s.routines.find(x => x.id === rid)
let r = isNew ? { id: uid(), name: t('New routine'), emoji: DEFAULT_GLYPH, ex: [] } : s.routines.find(x => x.id === rid)
if (isNew) s.routines.push(r)
if (r) r.ex.push({ id: ex.id, ...cfg })
})
const r = isNew ? S().routines[S().routines.length - 1] : st.routines.find(x => x.id === rid)
toast(t('“{0}” added to {1} ✓', ex.n, r ? r.name : t('routine')))
toast(t('“{0}” added to {1}', ex.n, r ? r.name : t('routine')))
if (isNew && r) nav('/plan/r/' + r.id)
})
}
@@ -195,12 +195,12 @@ function AddToRoutine({ ex, close }) {
<div className="muted small" style={{ marginBottom: 12 }}>{t('Pick a routine — sets, reps & weight come next.')}</div>
<div className="list">
{st.routines.map(r => <div key={r.id} className="item" onClick={() => pick(r.id)}>
<div style={{ fontSize: '1.3rem', flex: 'none' }}>{r.emoji || '💪'}</div>
<span className="lrow-i"><Icon name={glyphOf(r.emoji)} /></span>
<div className="grow"><div className="tt">{r.name}</div><div className="ss">{t('{0} exercises', r.ex.length)}</div></div>
{r.ex.some(e => e.id === ex.id) && <span className="tag">{t('already in')}</span>}<span className="chev">+</span>
{r.ex.some(e => e.id === ex.id) && <span className="tag">{t('already in')}</span>}<Icon name="plus" className="chev" />
</div>)}
<div className="item" onClick={() => pick('_new')}><div style={{ fontSize: '1.3rem', flex: 'none' }}>✨</div>
<div className="grow"><div className="tt">{t('New routine')}</div><div className="ss">{t('Create one and start with this exercise')}</div></div><span className="chev">+</span></div>
<div className="item" onClick={() => pick('_new')}><span className="lrow-i" style={{ background: 'var(--surface-3)' }}><Icon name="sparkles" /></span>
<div className="grow"><div className="tt">{t('New routine')}</div><div className="ss">{t('Create one and start with this exercise')}</div></div><Icon name="plus" className="chev" /></div>
</div>
</>
}
@@ -227,7 +227,7 @@ function CustomExForm({ existing, prefill, onDone, close }) {
update(s => { (s.customEx = s.customEx || []).push({ id, n: name, bp, desc: d, tg: '', eq: 'custom', custom: true }) })
}
close()
toast(existing ? t('Saved ✓') : t('“{0}” created ✓', name))
toast(existing ? t('Saved') : t('“{0}” created', name))
onDone && onDone(EXIDX[id])
}
return <>
@@ -237,12 +237,12 @@ function CustomExForm({ existing, prefill, onDone, close }) {
<div className="chips" style={{ margin: '12px 0' }}>
{BODYPARTS.map(b => <button key={b} className={'chip' + (bp === b ? ' on' : '')} onClick={() => setBp(b)}>{t(b)}</button>)}
</div>
{bp === 'cardio' && <div className="small dim" style={{ marginBottom: 10 }}>🏃 {t('Cardio exercises log time + speed instead of weight × reps.')}</div>}
{bp === 'cardio' && <div className="small dim row" style={{ marginBottom: 10, gap: 5 }}><Icon name="figureRun" style={{ fontSize: 13 }} />{t('Cardio exercises log time + speed instead of weight × reps.')}</div>}
<textarea className="input" rows={4} maxLength={1000} placeholder={t('Description (optional) — setup, cues, anything you want to remember')}
value={desc} onChange={e => setDesc(e.target.value)} />
<div style={{ height: 14 }} />
<button className="btn primary" onClick={save}>{existing ? t('Save') : t('Create exercise')}</button>
{existing && <><div style={{ height: 8 }} /><button className="btn danger" onClick={() => { close(); deleteCustomEx(existing) }}>🗑 {t('Delete exercise')}</button></>}
<Button variant="primary" onClick={save}>{existing ? t('Save') : t('Create exercise')}</Button>
{existing && <><div style={{ height: 8 }} /><Button variant="danger" icon="trash" onClick={() => { close(); deleteCustomEx(existing) }}>{t('Delete exercise')}</Button></>}
</>
}
export const customExSheet = (existing, onDone, prefill) => ui().openSheet(close => <CustomExForm existing={existing} prefill={prefill} onDone={onDone} close={close} />)
@@ -298,26 +298,26 @@ function ExercisePicker({ onPick, close }) {
<div className="search"><svg viewBox="0 0 24 24"><circle cx="11" cy="11" r="7" /><path d="m21 21-4.3-4.3" /></svg>
<input className="input" placeholder={t('Search {0} exercises…', all.length)} value={q} onChange={e => { setQ(e.target.value); setShown(50) }} /></div>
<div className="chips" style={{ margin: eqOpts.length > 1 ? '10px 0 6px' : '10px 0' }}>
{chosenCount > 0 && <button className={'chip' + (bp === '★' ? ' on' : '')} onClick={() => { setBp('★'); setEq(''); setShown(50) }}>⭐ {t('Chosen')} ({chosenCount})</button>}
<button className={'chip' + (!bp ? ' on' : '')} onClick={() => { setBp(''); setEq(''); setShown(50) }}>{t('All')}</button>
{chosenCount > 0 && <button className={'chip' + (bp === '★' ? ' on' : '')} onClick={() => { setBp('★'); setEq(''); setShown(50) }}><Icon name="starFill" style={{ fontSize: 12, display: 'inline-block', marginRight: 4, verticalAlign: '-1px' }} />{t('Chosen')} ({chosenCount})</button>}
<button className={'chip nocap' + (!bp ? ' on' : '')} onClick={() => { setBp(''); setEq(''); setShown(50) }}>{t('All')}</button>
{BODYPARTS.map(b => <button key={b} className={'chip' + (bp === b ? ' on' : '')} onClick={() => { setBp(b); setEq(''); setShown(50) }}>{t(b)}</button>)}
</div>
{eqOpts.length > 1 && <div className="chips" style={{ marginBottom: 10 }}>
<button className={'chip' + (!eqOn ? ' on' : '')} onClick={() => { setEq(''); setShown(50) }}>{t('Any equipment')}</button>
<button className={'chip nocap' + (!eqOn ? ' on' : '')} onClick={() => { setEq(''); setShown(50) }}>{t('Any equipment')}</button>
{eqOpts.map(x => <button key={x} className={'chip' + (eqOn === x ? ' on' : '')} onClick={() => { setEq(x); setShown(50) }}>{t(x)}</button>)}
</div>}
<div className="list">
{bp !== '★' && <div className="item" onClick={() => customExSheet(null, ex => onPick(ex), q.trim())}>
<div className="thumb thumb-x">✨</div>
<div className="grow"><div className="tt">{t('Create your own exercise')}</div><div className="ss">{t('name + body part, no animation')}</div></div><span className="chev">+</span>
<div className="thumb thumb-x"><Icon name="sparkles" /></div>
<div className="grow"><div className="tt">{t('Create your own exercise')}</div><div className="ss">{t('name + body part, no animation')}</div></div><Icon name="plus" className="chev" />
</div>}
{f.slice(0, shown).map(e => <div key={e.id} className="item" onClick={() => onPick(e)}>
<Thumb ex={e} /><div className="grow"><div className="tt">{e.n}</div><div className="ss">{t(e.tg || e.bp)} · {t(e.eq)}</div></div>
{usage[e.id] && <span className="tag acc">⭐</span>}<span className="chev">+</span>
<Thumb ex={e} /><div className="grow"><div className="tt capitalize">{e.n}</div><div className="ss capitalize">{t(e.tg || e.bp)} · {t(e.eq)}</div></div>
{usage[e.id] && <span className="tag acc"><Icon name="starFill" /></span>}<Icon name="plus" className="chev" />
</div>)}
{f.length === 0 && bp === '★' && <div className="empty">{t('Nothing chosen yet — add exercises and they’ll show up here.')}</div>}
</div>
{f.length > shown && <><div style={{ height: 8 }} /><button className="btn" onClick={() => setShown(s => s + 50)}>{t('Show more')}</button></>}
{f.length > shown && <><div style={{ height: 8 }} /><Button onClick={() => setShown(s => s + 50)}>{t('Show more')}</Button></>}
</>
}
export const exercisePicker = onPick => ui().openSheet(close => <ExercisePicker onPick={onPick} close={close} />)
@@ -336,7 +336,7 @@ function ExConfig({ ex, existing, onSave, onDelete, close }) {
<h3 className="capitalize">{ex.n}</h3>
<Media ex={ex} />
<div className="row" style={{ gap: 6, flexWrap: 'wrap', margin: '10px 0 14px' }}>
{cardio && <span className="tag acc">🏃 {t('Cardio')}</span>}
{cardio && <span className="tag acc"><Icon name="figureRun" />{t('Cardio')}</span>}
<span className="tag">{t(ex.tg || ex.bp)}</span><span className="tag">{t(ex.eq)}</span>
</div>
{ex.desc && <div className="exnote">{ex.desc}</div>}
@@ -351,19 +351,36 @@ function ExConfig({ ex, existing, onSave, onDelete, close }) {
<Stepper label={t('Weight ({0})', st.unit)} value={c.weight} step={2.5} onChange={v => setC(x => ({ ...x, weight: v }))} />
</>}
</div>
<button className="btn primary" onClick={save}>{existing ? t('Save') : t('Add to routine')}</button>
{ex.custom && <><div style={{ height: 8 }} /><button className="btn" onClick={() => { close(); customExSheet(ex) }}>✏️ {t('Edit or delete this exercise')}</button></>}
{onDelete && <><div style={{ height: 8 }} /><button className="btn danger" onClick={() => { close(); onDelete() }}>{t('Remove from routine')}</button></>}
<Button variant="primary" onClick={save}>{existing ? t('Save') : t('Add to routine')}</Button>
{ex.custom && <><div style={{ height: 8 }} /><Button icon="pencil" onClick={() => { close(); customExSheet(ex) }}>{t('Edit or delete this exercise')}</Button></>}
{onDelete && <><div style={{ height: 8 }} /><Button variant="danger" onClick={() => { close(); onDelete() }}>{t('Remove from routine')}</Button></>}
</>
}
export const exConfigSheet = (ex, existing, onSave, onDelete) => ui().openSheet(close => <ExConfig ex={ex} existing={existing} onSave={onSave} onDelete={onDelete} close={close} />)
/* ============================ emoji picker ============================ */
const ROUTINE_EMOJIS = ['💪', '🏋️', '🏋️‍♀️', '🦵', '🦾', '🫸', '🫷', '🔥', '⚡', '💥', '🏃', '🏃‍♀️', '🚴', '🏊', '🤸', '🥊', '🧗', '⛰️', '🏔️', '🚀', '🧘', '🧘‍♀️', '🎯', '🏆', '🥇', '⭐', '🌟', '👑', '🛡️', '⚔️', '🦍', '🐂', '🐻', '🦁', '🐺', '🦈', '😤', '🤖', '🧨', '❤️‍🔥']
export const emojiPicker = (current, onPick) => ui().openSheet(close => <>
<h3>{t('Pick an emoji')}</h3>
<div className="emoji-grid">{ROUTINE_EMOJIS.map(e => <button key={e} className={'emoji-cell' + (e === current ? ' on' : '')} onClick={() => { close(); onPick(e) }}>{e}</button>)}</div>
</>)
/* ============================ glyph picker ============================ */
// Grouped by what the glyph means for a training day, so picking one is a scan
// of four short rows rather than a hunt through twenty loose icons.
export const glyphPicker = (current, onPick) => {
const cur = glyphOf(current)
return ui().openSheet(close => <>
<h3>{t('Pick an icon')}</h3>
{GLYPH_GROUPS.map(g => (
<div key={g.key} style={{ marginBottom: 14 }}>
<div className="sect-t" style={{ padding: '0 2px 7px' }}>{t(g.key)}</div>
<div className="glyph-grid">
{g.items.map(n => (
<button key={n} className={'glyph-cell' + (n === cur ? ' on' : '')}
onClick={() => { close(); onPick(n) }} aria-label={n}>
<Icon name={n} />
</button>
))}
</div>
</div>
))}
<div style={{ height: 4 }} />
</>)
}
/* ============================ day override / assign ============================ */
function DayOverride({ iso, close }) {
@@ -375,18 +392,18 @@ function DayOverride({ iso, close }) {
const set = v => {
update(s => { if (!v) delete s.dayPlan[iso]; else s.dayPlan[iso] = v })
close()
toast(v === '' ? t('Back to weekly plan') : v === 'rest' ? t('{0} set to rest', fmtDate(iso)) : t('{0} planned for {1} ✓', (st.routines.find(r => r.id === v) || {}).name, fmtDate(iso)))
toast(v === '' ? t('Back to weekly plan') : v === 'rest' ? t('{0} set to rest', fmtDate(iso)) : t('{0} planned for {1}', (st.routines.find(r => r.id === v) || {}).name, fmtDate(iso)))
}
return <>
<h3>{fmtDate(iso, true)}</h3>
<div className="muted small" style={{ marginBottom: 12 }}>{t('Weekly plan:')} {weeklyR ? weeklyR.name : t('Rest')}{hasOvr && <span style={{ color: 'var(--orange)' }}> · {t('changed for this day')}</span>}<br />{t('Sick, missed a day or want a different session? Pick what to train instead.')}</div>
<div className="list">
{st.routines.map(r => <div key={r.id} className="item" onClick={() => set(r.id)}>
<div style={{ fontSize: '1.3rem', flex: 'none' }}>{r.emoji || '💪'}</div>
<span className="lrow-i"><Icon name={glyphOf(r.emoji)} /></span>
<div className="grow"><div className="tt">{r.name}</div><div className="ss">{t('{0} exercises', r.ex.length)}</div></div>
{effId === r.id && <span className="accent">✓</span>}</div>)}
<div className="item" onClick={() => set('rest')}><div className="grow"><div className="tt">😌 {t('Rest / skip this day')}</div></div>{effId === null && <span className="accent">✓</span>}</div>
{hasOvr && <div className="item" onClick={() => set('')}><div className="grow"><div className="tt">↺ {t('Back to weekly plan')}</div></div></div>}
{effId === r.id && <Icon name="check" className="accent" />}</div>)}
<div className="item" onClick={() => set('rest')}><span className="lrow-i" style={{ background: 'var(--surface-3)' }}><Icon name="moon" /></span><div className="grow"><div className="tt">{t('Rest / skip this day')}</div></div>{effId === null && <Icon name="check" className="accent" />}</div>
{hasOvr && <div className="item" onClick={() => set('')}><span className="lrow-i" style={{ background: 'var(--surface-3)' }}><Icon name="reset" /></span><div className="grow"><div className="tt">{t('Back to weekly plan')}</div></div></div>}
</div>
</>
}
@@ -398,11 +415,11 @@ function DayAssign({ day, close }) {
return <>
<h3>{t(DAYN[day])}</h3>
<div className="list">
<div className="item" onClick={() => set('')}><div className="grow"><div className="tt">😌 {t('Rest day')}</div></div>{!st.week[day] && <span className="accent">✓</span>}</div>
<div className="item" onClick={() => set('')}><span className="lrow-i" style={{ background: 'var(--surface-3)' }}><Icon name="moon" /></span><div className="grow"><div className="tt">{t('Rest day')}</div></div>{!st.week[day] && <Icon name="check" className="accent" />}</div>
{st.routines.map(r => <div key={r.id} className="item" onClick={() => set(r.id)}>
<div style={{ fontSize: '1.3rem', flex: 'none' }}>{r.emoji || '💪'}</div>
<span className="lrow-i"><Icon name={glyphOf(r.emoji)} /></span>
<div className="grow"><div className="tt">{r.name}</div><div className="ss">{t('{0} exercises', r.ex.length)}</div></div>
{st.week[day] === r.id && <span className="accent">✓</span>}</div>)}
{st.week[day] === r.id && <Icon name="check" className="accent" />}</div>)}
</div>
</>
}
@@ -413,16 +430,16 @@ function WorkoutDetail({ w, close }) {
const st = useStore(s => s.S)
return <>
<h3>{w.name}</h3>
<div className="muted small" style={{ marginBottom: 12 }}>{fmtDate(w.d, true)} · {fmtDur(w.end - w.start)} · {fmtVol(w.vol, st.unit)}{w.bw ? ' · ⚖️ ' + fmtNum(w.bw) + ' ' + st.unit : ''}</div>
<div className="muted small" style={{ marginBottom: 12 }}>{fmtDate(w.d, true)} · {fmtDur(w.end - w.start)} · {fmtVol(w.vol, st.unit)}{w.bw ? ' · ' + fmtNum(w.bw) + ' ' + st.unit : ''}</div>
{w.entries.map((e, i) => {
const ex = EXIDX[e.id]
return <div key={i} className="row" style={{ marginBottom: 12, alignItems: 'flex-start' }}>
{ex && <Thumb ex={ex} />}
<div className="grow"><div className="tt capitalize" style={{ fontWeight: 700 }}>{ex ? ex.n : (e.n || e.id)} {w.prs && w.prs.includes(e.id) && <span className="pr">🏆 PR</span>}</div>
<div className="grow"><div className="tt capitalize" style={{ fontWeight: 600 }}>{ex ? ex.n : (e.n || e.id)} {w.prs && w.prs.includes(e.id) && <span className="pr"><Icon name="trophy" />PR</span>}</div>
<div className="ss">{e.sets.filter(s => s.done).map(s => setLabel(e.id, s)).join(' · ') || t('no sets')}</div></div>
</div>
})}
<button className="btn danger" onClick={() => confirmSheet({ title: t('Delete workout?'), message: t('This removes it from your history for good.'), confirmText: t('Delete'), danger: true, onConfirm: () => { update(s => { s.workouts = s.workouts.filter(x => x.id !== w.id) }); close(); toast(t('Workout deleted')) } })}>{t('Delete workout')}</button>
<Button variant="danger" onClick={() => confirmSheet({ title: t('Delete workout?'), message: t('This removes it from your history for good.'), confirmText: t('Delete'), danger: true, onConfirm: () => { update(s => { s.workouts = s.workouts.filter(x => x.id !== w.id) }); close(); toast(t('Workout deleted')) } })}>{t('Delete workout')}</Button>
</>
}
export const workoutDetailSheet = w => ui().openSheet(close => <WorkoutDetail w={w} close={close} />)
@@ -453,9 +470,9 @@ function Calendar({ start, close }) {
}
return <>
<div className="row between" style={{ marginBottom: 2 }}>
<button className="iconbtn" onClick={() => setCur(new Date(y, mo - 1, 1))}>‹</button>
<button className="iconbtn" onClick={() => setCur(new Date(y, mo - 1, 1))} aria-label="Previous month"><Icon name="chevronLeft" /></button>
<h3 style={{ margin: 0 }}>{t(MONTHS_LONG[mo])} {y}</h3>
<button className="iconbtn" onClick={() => setCur(new Date(y, mo + 1, 1))}>›</button>
<button className="iconbtn" onClick={() => setCur(new Date(y, mo + 1, 1))} aria-label="Next month"><Icon name="chevronRight" /></button>
</div>
<div className="small muted" style={{ textAlign: 'center' }}>{monthWs.length ? `${t(monthWs.length === 1 ? '{0} workout' : '{0} workouts', monthWs.length)} · ${fmtDur(monthMs)} · ${fmtVol(monthVol, st.unit)}` : t('No workouts this month')}</div>
<div className="cal-grid">{['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'].map(l => <div key={l} className="cal-h">{t(l)}</div>)}{cells}</div>
@@ -472,13 +489,13 @@ export const calendarSheet = start => ui().openSheet(close => <Calendar start={s
/* shared small workout row (used in lists) */
export function WorkoutRow({ w, onClick }) {
const st = useStore(s => s.S)
const emoji = (st.routines.find(r => r.id === w.routineId) || {}).emoji || '💪'
const glyph = glyphOf((st.routines.find(r => r.id === w.routineId) || {}).emoji)
return <div className="item" onClick={onClick}>
<div style={{ fontSize: '1.5rem', flex: 'none' }}>{emoji}</div>
<span className="lrow-i" style={{ width: 34, height: 34, borderRadius: 8, fontSize: 19 }}><Icon name={glyph} /></span>
<div className="grow"><div className="tt">{w.name}</div>
<div className="ss">{fmtDate(w.d, true)} · {fmtDur(w.end - w.start)} · {t('{0} sets', setsDone(w))} · {fmtVol(w.vol, st.unit)}</div></div>
{w.prs && w.prs.length > 0 && <span className="pr">🏆 {w.prs.length} PR</span>}
<span className="chev">›</span>
{w.prs && w.prs.length > 0 && <span className="pr"><Icon name="trophy" />{w.prs.length} PR</span>}
<Icon name="chevronRight" className="chev" />
</div>
}
@@ -523,18 +540,18 @@ function TopWeight({ entryIdx, close }) {
if (advance && unitDone) {
if (isLastUnit) workoutCompleteSheet() // whole workout done → finish/continue prompt
else update(s => { s.active.cur = units[unitIdx + 1][0] })
} else toast(t('Tracked — next time starts at {0} 📈', fmtNum(S().exWeights[entry.id].w) + ' ' + st.unit))
} else toast(t('Tracked — next time starts at {0}', fmtNum(S().exWeights[entry.id].w) + ' ' + st.unit))
}
return <>
<h3 className="capitalize">✅ {t('{0} done', ex.n)}</h3>
<h3 className="capitalize row" style={{ gap: 8 }}><Icon name="checkCircle" style={{ color: 'var(--acc)' }} />{t('{0} done', ex.n)}</h3>
<div className="muted small">{t('Confirm the weight you worked with — your highest becomes the default next time.')}{!unitDone && unit.length > 1 ? ' ' + t('Then finish the superset partner.') : ''}</div>
<WeightInput value={v} setValue={setV} unit={st.unit} />
<div style={{ height: 10 }} />
{prevBest > 0 ? <div className="small dim" style={{ textAlign: 'center', marginBottom: 12 }}>{t('Previous best:')} {fmtNum(prevBest)} {st.unit}{maxSet > prevBest && <span style={{ color: 'var(--gold)' }}> — {t('new record! 🏆')}</span>}</div> : <div style={{ height: 4 }} />}
{prevBest > 0 ? <div className="small dim" style={{ textAlign: 'center', marginBottom: 12 }}>{t('Previous best:')} {fmtNum(prevBest)} {st.unit}{maxSet > prevBest && <span style={{ color: 'var(--yellow)' }}> — {t('new record!')}</span>}</div> : <div style={{ height: 4 }} />}
{unitDone ? <>
<button className="btn primary" onClick={() => commit(true)}>{isLastUnit ? t('Save ✓') : t('Save & next exercise ›')}</button>
<div style={{ height: 8 }} /><button className="btn ghost dim" onClick={() => commit(false)}>{t('Just close')}</button>
</> : <button className="btn primary" onClick={() => commit(false)}>{t('Save weight')}</button>}
<Button variant="primary" trailingIcon={isLastUnit ? null : 'chevronRight'} onClick={() => commit(true)}>{isLastUnit ? t('Save') : t('Save & next exercise')}</Button>
<div style={{ height: 8 }} /><Button variant="ghost" className="dim" onClick={() => commit(false)}>{t('Just close')}</Button>
</> : <Button variant="primary" onClick={() => commit(false)}>{t('Save weight')}</Button>}
</>
}
export const topWeightSheet = entryIdx => ui().openSheet(close => <TopWeight entryIdx={entryIdx} close={close} />)
@@ -542,12 +559,12 @@ export const topWeightSheet = entryIdx => ui().openSheet(close => <TopWeight ent
// Shown when the last exercise's last set is checked — finish, or keep going.
function WorkoutComplete({ close }) {
return <div style={{ textAlign: 'center', padding: '8px 0' }}>
<div style={{ fontSize: '3rem' }}>🎉</div>
<div style={{ fontSize: 44, display: 'flex', justifyContent: 'center', color: 'var(--acc)' }}><Icon name="checkCircle" /></div>
<h3 style={{ margin: '8px 0' }}>{t("That's the whole workout!")}</h3>
<div className="muted small" style={{ marginBottom: 16 }}>{t('Every exercise done — great work. Finish up, or keep going and add another exercise.')}</div>
<button className="btn primary" onClick={() => { close(); finishWorkout() }}>{t('Finish workout 🏁')}</button>
<Button variant="primary" icon="flag" onClick={() => { close(); finishWorkout() }}>{t('Finish workout')}</Button>
<div style={{ height: 8 }} />
<button className="btn" onClick={() => { close(); useUI.getState().toast(t('Keep going 💪 — tap “+ Add exercise” below')) }}>{t('Continue workout')}</button>
<Button onClick={() => { close(); useUI.getState().toast(t('Keep going — tap “+ Add exercise” below')) }}>{t('Continue workout')}</Button>
</div>
}
export const workoutCompleteSheet = () => ui().openSheet(close => <WorkoutComplete close={close} />, { kind: 'center' })
@@ -555,16 +572,16 @@ export const workoutCompleteSheet = () => ui().openSheet(close => <WorkoutComple
function FinishSummary({ w, prs, close }) {
const st = useStore(s => s.S)
return <div style={{ textAlign: 'center', padding: '8px 0' }}>
<div style={{ fontSize: '3rem' }}>🎉</div>
<div style={{ fontSize: 44, display: 'flex', justifyContent: 'center', color: 'var(--acc)' }}><Icon name="trophy" /></div>
<h3 style={{ margin: '8px 0' }}>{t('Workout complete!')}</h3>
<div className="tiles" style={{ textAlign: 'left' }}>
<div className="tile"><div className="l">{t('Duration')}</div><div className="v" style={{ fontSize: '1.1rem' }}>{fmtDur(w.end - w.start)}</div></div>
<div className="tile"><div className="l">{t('Volume')}</div><div className="v" style={{ fontSize: '1.1rem' }}>{fmtVol(w.vol, st.unit)}</div></div>
<div className="tile"><div className="l">{t('Sets')}</div><div className="v" style={{ fontSize: '1.1rem' }}>{setsDone(w)}</div></div>
<div className="tile"><div className="l">{t('PRs')}</div><div className="v" style={{ fontSize: '1.1rem' }}>{prs.length ? '🏆 ' + prs.length : '—'}</div></div>
<div className="tile"><div className="l">{t('PRs')}</div><div className="v" style={{ fontSize: 20 }}>{prs.length || '—'}</div></div>
</div>
{prs.length > 0 && <div style={{ textAlign: 'left', marginBottom: 12 }}>{prs.map(id => <div key={id} className="small accent capitalize">🏆 {t('New PR:')} {(EXIDX[id] || {}).n || id}</div>)}</div>}
<button className="btn primary" onClick={() => { close(); nav('/home') }}>{t('Nice! 💪')}</button>
{prs.length > 0 && <div style={{ textAlign: 'left', marginBottom: 12 }}>{prs.map(id => <div key={id} className="small accent capitalize row" style={{ gap: 5 }}><Icon name="trophy" style={{ fontSize: 13 }} />{t('New PR:')} {(EXIDX[id] || {}).n || id}</div>)}</div>}
<Button variant="primary" onClick={() => { close(); nav('/home') }}>{t('Nice!')}</Button>
</div>
}
export function finishWorkout() {
+1 -1
View File
@@ -47,7 +47,7 @@ export const useUI = create((set, get) => ({
const snd = useStore.getState().S.sound
if (left <= 0) {
beep(snd, 880, 0.15); beep(snd, 880, 0.15, 0.25); beep(snd, 1320, 0.4, 0.5)
vibrate([200, 100, 200]); get().toast(t('Rest over — next set! 💪')); get().stopRest(); return
vibrate([200, 100, 200]); get().toast(t('Rest over — next set!')); get().stopRest(); return
}
if (left <= 3) beep(snd, 660, 0.1)
set({ timer: { ...tm, left } })
+15 -13
View File
@@ -6,6 +6,8 @@ import { api } from '../lib/api.js'
import { fmtDate, fmtNum, fmtVol, fmtDur } from '../lib/format.js'
import { workoutVolume, setsDone } from '../lib/history.js'
import { confirmSheet } from '../sheets.jsx'
import Icon from '../components/Icon.jsx'
import { Button } from '../components/ui.jsx'
// Admin-only operator dashboard (owner passkey + admin flag; guarded again server-side).
// Deliberately English-only — it isn't part of the translated end-user surface, so it stays
@@ -52,9 +54,9 @@ function UserDetail({ id, onChanged, close }) {
{u.disabled ? 'Enable account' : 'Disable account'}</button>}
<h4 className="sec">Workout history</h4>
{d.workouts.length ? <div className="list" style={{ gap: 0 }}>
{d.workouts.slice(0, 60).map(w => <div key={w.id} className="row between" style={{ padding: '9px 2px', borderBottom: '1px solid var(--bg2)' }}>
<div><div className="small" style={{ fontWeight: 700 }}>{w.name}</div>
<div className="dim" style={{ fontSize: '.72rem' }}>{fmtDate(w.d, true)} · {fmtDur((w.end || w.start) - w.start)} · {setsDone(w)} sets{w.prs?.length ? ' · 🏆 ' + w.prs.length : ''}</div></div>
{d.workouts.slice(0, 60).map(w => <div key={w.id} className="row between" style={{ padding: '9px 2px', borderBottom: '1px solid var(--sep)' }}>
<div><div className="small" style={{ fontWeight: 600 }}>{w.name}</div>
<div className="dim" style={{ fontSize: '.72rem' }}>{fmtDate(w.d, true)} · {fmtDur((w.end || w.start) - w.start)} · {setsDone(w)} sets{w.prs?.length ? ' · ' + w.prs.length + ' PR' : ''}</div></div>
<span className="small muted">{fmtVol(w.vol ?? workoutVolume(w), d.unit)}</span>
</div>)}
</div> : <div className="empty small">No workouts logged.</div>}
@@ -72,12 +74,12 @@ function InvitesCard({ invites, reload }) {
const used = (invites || []).filter(i => i.usedBy)
return <div className="card">
<div className="row between"><h2 style={{ margin: 0 }}>Invite codes</h2>
<button className="btn sm primary" onClick={gen}>+ Generate</button></div>
<Button variant="primary" size="sm" onClick={gen} icon="plus">Generate</Button></div>
<div className="small muted" style={{ margin: '6px 0 10px' }}>{open.length} unused · {used.length} redeemed</div>
{open.map(i => <div key={i.code} className="row between" style={{ padding: '7px 2px', borderBottom: '1px solid var(--bg2)' }}>
<span style={{ fontFamily: 'monospace', fontWeight: 700, letterSpacing: '.06em' }}
{open.map(i => <div key={i.code} className="row between" style={{ padding: '7px 2px', borderBottom: '1px solid var(--sep)' }}>
<span style={{ fontFamily: 'ui-monospace,SFMono-Regular,Menlo,monospace', fontWeight: 500, letterSpacing: '.06em' }}
onClick={() => { navigator.clipboard?.writeText(i.code).catch(() => {}); toast('Copied ' + i.code) }}>{i.code}</span>
<button className="iconbtn" style={{ width: 34, height: 30, fontSize: '.9rem' }} onClick={() => revoke(i.code)} aria-label="revoke">🗑</button>
<button className="iconbtn" style={{ width: 32, height: 30, borderRadius: 8, fontSize: 15, color: 'var(--red)' }} onClick={() => revoke(i.code)} aria-label="revoke"><Icon name="trash" /></button>
</div>)}
{used.map(i => <div key={i.code} className="row between dim" style={{ padding: '7px 2px', fontSize: '.8rem' }}>
<span style={{ fontFamily: 'monospace' }}>{i.code}</span><span>→ {i.usedByName || 'used'}</span>
@@ -108,7 +110,7 @@ export default function Admin() {
return <div className="narrow">
<div className="hdr">
<button className="iconbtn" onClick={() => nav('/settings')}>‹</button>
<button className="iconbtn" onClick={() => nav('/settings')} aria-label="Back"><Icon name="chevronLeft" /></button>
<div style={{ flex: 1, marginLeft: 8 }}><h1 style={{ margin: 0 }}>Admin</h1>
<div className="sub">{users ? users.length + ' users · ' + activeCount + ' active this week' : 'Loading…'}</div></div>
<button className="iconbtn" onClick={() => { loadUsers(); loadInvites() }} aria-label="refresh">↻</button>
@@ -122,9 +124,9 @@ export default function Admin() {
</div>
{liveUsers.length > 0 && <div className="card" style={{ borderColor: 'var(--acc)' }}>
<h2 style={{ margin: '0 0 8px' }}>🟢 Training now</h2>
{liveUsers.map(u => <div key={u.id} className="row between" style={{ padding: '8px 2px', borderBottom: '1px solid var(--bg2)' }} onClick={() => openUser(u.id)}>
<div><div className="small" style={{ fontWeight: 700 }}>{u.name}</div>
<h2 className="row" style={{ margin: '0 0 8px', gap: 6 }}><Icon name="dot" style={{ fontSize: 10, color: 'var(--green)' }} />Training now</h2>
{liveUsers.map(u => <div key={u.id} className="row between" style={{ padding: '8px 2px', borderBottom: '1px solid var(--sep)' }} onClick={() => openUser(u.id)}>
<div><div className="small" style={{ fontWeight: 600 }}>{u.name}</div>
<div className="dim" style={{ fontSize: '.72rem' }}>{u.live.name} · ex {u.live.exIdx}/{u.live.exTotal} · {u.live.setsDone}/{u.live.setsTotal} sets</div></div>
<span className="tag acc">{dur(Date.now() - u.live.startedAt)}</span>
</div>)}
@@ -135,9 +137,9 @@ export default function Admin() {
<h4 className="sec">Users</h4>
<div className="list">
{(users || []).map(u => <div key={u.id} className="item" onClick={() => openUser(u.id)} style={u.disabled ? { opacity: .55 } : null}>
<div className="grow"><div className="tt">{u.live && '🟢 '}{u.name} {u.admin && <span className="tag acc" style={{ marginLeft: 4 }}>admin</span>}{u.disabled && <span className="tag" style={{ marginLeft: 4, color: 'var(--red)' }}>off</span>}</div>
<div className="grow"><div className="tt">{u.live && <Icon name="dot" style={{ fontSize: 9, color: 'var(--green)', display: 'inline-block', marginRight: 5 }} />}{u.name} {u.admin && <span className="tag acc" style={{ marginLeft: 4 }}>admin</span>}{u.disabled && <span className="tag" style={{ marginLeft: 4, color: 'var(--red)' }}>off</span>}</div>
<div className="ss">{u.live ? 'training now · ' + u.live.name : u.workouts + ' workouts' + (u.lastWorkout ? ' · last ' + fmtDate(u.lastWorkout) : '') + ' · synced ' + rel(u.lastSync)}</div></div>
{u.hasPush && <span title="push enabled">🔔</span>}<span className="chev">›</span>
{u.hasPush && <Icon name="bell" title="push enabled" style={{ fontSize: 15, color: 'var(--label-3)' }} />}<Icon name="chevronRight" className="chev" />
</div>)}
{users && !users.length && <div className="empty">No users yet.</div>}
</div>
+3 -2
View File
@@ -2,14 +2,15 @@ import { useNavigate } from 'react-router-dom'
import { useStore } from '../store/useStore.js'
import { t } from '../lib/i18n.js'
import { WorkoutRow, workoutDetailSheet } from '../sheets.jsx'
import Icon from '../components/Icon.jsx'
export default function History() {
const nav = useNavigate()
const S = useStore(s => s.S)
return <>
<div className="hdr"><button className="iconbtn" onClick={() => nav('/stats')}>‹</button>
<div className="hdr"><button className="iconbtn" onClick={() => nav('/stats')} aria-label={t('Stats')}><Icon name="chevronLeft" /></button>
<div style={{ flex: 1, marginLeft: 12 }}><h1>{t('History')}</h1><div className="sub">{t('{0} workouts', S.workouts.length)}</div></div></div>
{S.workouts.length ? <div className="list">{[...S.workouts].reverse().map(w => <WorkoutRow key={w.id} w={w} onClick={() => workoutDetailSheet(w)} />)}</div>
: <div className="empty"><div className="ico">🗂</div>{t('No workouts yet.')}</div>}
: <div className="empty"><div className="ico"><Icon name="history" /></div>{t('No workouts yet.')}</div>}
</>
}
+39 -18
View File
@@ -6,6 +6,9 @@ import { fmtNum, fmtDate, todayISO, isoOf, weekKey, DAYS } from '../lib/format.j
import { t, dateLocale } from '../lib/i18n.js'
import { bwSheet, goalSheet, dayOverrideSheet, calendarSheet, startFlow, loadStarterPlan, bwDeltaColor } from '../sheets.jsx'
import LineChart from '../components/LineChart.jsx'
import Icon from '../components/Icon.jsx'
import { Button } from '../components/ui.jsx'
import { glyphOf } from '../lib/glyphs.js'
// Home = what to do now + a quick glance. Deep charts & history live in Stats.
export default function Home() {
@@ -44,37 +47,42 @@ export default function Home() {
return <div className="narrow">
<div className="hdr">
<div><h1>{user ? t('Hi {0} 💪', user.name) : 'openGym 🏋️'}</h1><div className="sub">{today.toLocaleDateString(dateLocale(), { weekday: 'long', day: 'numeric', month: 'long' })}</div></div>
<button className="iconbtn" onClick={() => nav('/settings')}>⚙️</button>
<div><h1>{user ? t('Hi {0}', user.name) : 'openGym'}</h1><div className="sub">{today.toLocaleDateString(dateLocale(), { weekday: 'long', day: 'numeric', month: 'long' })}</div></div>
<button className="iconbtn" onClick={() => nav('/settings')} aria-label={t('Settings')}><Icon name="gear" /></button>
</div>
<div className="card">
<div className="row between" style={{ marginBottom: 8 }}>
<button className="iconbtn" style={{ width: 32, height: 32 }} onClick={() => setWeekOffset(w => w - 1)}>‹</button>
<div className="small muted" style={{ fontWeight: 600 }}>{wkLabel}</div>
<button className="iconbtn" style={{ width: 32, height: 32 }} onClick={() => setWeekOffset(w => w + 1)}>›</button>
<button className="iconbtn" style={{ width: 30, height: 30, fontSize: 15 }} onClick={() => setWeekOffset(w => w - 1)} aria-label="Previous week"><Icon name="chevronLeft" /></button>
<div className="small muted" style={{ fontWeight: 500 }}>{wkLabel}</div>
<button className="iconbtn" style={{ width: 30, height: 30, fontSize: 15 }} onClick={() => setWeekOffset(w => w + 1)} aria-label="Next week"><Icon name="chevronRight" /></button>
</div>
<div className="week">{strip}</div>
<div className="today-row" onClick={onToday}>
<div className="row" style={{ gap: 9, minWidth: 0 }}>
<span style={{ fontSize: '1.35rem', flex: 'none' }}>{S.active ? '⏱️' : routine ? (routine.emoji || '💪') : '😌'}</span>
<span className="lrow-i" style={{ background: S.active ? 'var(--orange)' : routine ? 'var(--acc)' : 'var(--surface-3)' }}>
<Icon name={S.active ? 'timer' : routine ? glyphOf(routine.emoji) : 'moon'} />
</span>
<div style={{ minWidth: 0 }}>
<div className="lbl2">{t('Today')}</div>
<div className="ttl">{S.active ? t('{0} — in progress', S.active.name) : routine ? routine.name : t('Rest day')}{todayOvr && routine ? ' · ' + t('rescheduled') : ''}</div>
</div>
</div>
{S.active ? <span className="tag" style={{ color: 'var(--orange)', borderColor: 'var(--orange)' }}>{t('Resume ▶')}</span>
: routine ? <span className="tag acc">{t('Start ▶')}</span>
: <span className="chev">+</span>}
{S.active ? <span className="tag" style={{ color: 'var(--orange)', background: 'color-mix(in srgb,var(--orange) 16%,transparent)' }}>{t('Resume')}</span>
: routine ? <span className="tag acc">{t('Start')}</span>
: <Icon name="plus" className="chev" />}
</div>
</div>
{!S.routines.length && !S.active && (
<div className="card">
<div className="big" style={{ marginBottom: 4 }}>{t('Welcome! 👋')}</div>
<div className="row" style={{ gap: 10, marginBottom: 6 }}>
<span className="lrow-i"><Icon name="sparkles" /></span>
<div className="big" style={{ fontSize: 22 }}>{t('Welcome!')}</div>
</div>
<div className="muted small" style={{ marginBottom: 12 }}>{t('Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.')}</div>
<button className="btn primary" onClick={loadStarterPlan}>{t('Load starter plan (PPL)')}</button>
<div style={{ height: 8 }} /><button className="btn" onClick={() => nav('/plan')}>{t('Build my own plan')}</button>
<Button variant="primary" icon="sparkles" onClick={loadStarterPlan}>{t('Load starter plan (PPL)')}</Button>
<div style={{ height: 8 }} /><Button onClick={() => nav('/plan')}>{t('Build my own plan')}</Button>
</div>
)}
@@ -82,17 +90,27 @@ export default function Home() {
<div className="row between" style={{ marginBottom: 6 }}>
<h2 style={{ margin: 0 }}>{t('Body weight')}</h2>
<div className="row" style={{ gap: 8 }}>
<button className="btn sm" style={S.targetW ? { color: 'var(--gold)' } : undefined} onClick={goalSheet}>🎯 {S.targetW ? fmtNum(S.targetW) : t('Goal')}</button>
<button className="btn sm" onClick={() => bwSheet()}>+ {t('Log')}</button>
<Button size="sm" icon="target" style={S.targetW ? { color: 'var(--yellow)' } : undefined} onClick={goalSheet}>{S.targetW ? fmtNum(S.targetW) : t('Goal')}</Button>
<Button size="sm" icon="plus" onClick={() => bwSheet()}>{t('Log')}</Button>
</div>
</div>
{bw ? <>
<div className="row" style={{ gap: 8, alignItems: 'baseline' }}>
<div className="big">{fmtNum(bw.w)} <span className="muted" style={{ fontSize: '1rem' }}>{S.unit}</span></div>
{delta !== null && <span className="small" style={{ fontWeight: 700, color: bwDeltaColor(delta, bw.w) }}>{delta > 0 ? '▲' : delta < 0 ? '▼' : '•'} {fmtNum(Math.abs(delta))}</span>}
{delta !== null && (
<span className="small row" style={{ gap: 2, fontWeight: 500, color: bwDeltaColor(delta, bw.w) }}>
<Icon name={delta > 0 ? 'arrowUp' : delta < 0 ? 'arrowDown' : 'minus'} style={{ fontSize: 12 }} />
{fmtNum(Math.abs(delta))}
</span>
)}
<span className="dim small" style={{ marginLeft: 'auto' }}>{fmtDate(bw.d, true)}</span>
</div>
{S.targetW && <div className="small" style={{ color: 'var(--gold)', marginTop: 2 }}>🎯 {t('Goal')} {fmtNum(S.targetW)} {S.unit} · {Math.abs(S.targetW - bw.w) < 0.05 ? t('reached! 🎉') : t(S.targetW > bw.w ? '{0} to gain' : '{0} to lose', fmtNum(Math.abs(S.targetW - bw.w)) + ' ' + S.unit)}</div>}
{S.targetW && (
<div className="small row" style={{ color: 'var(--yellow)', marginTop: 4, gap: 5 }}>
<Icon name="target" style={{ fontSize: 13 }} />
<span>{t('Goal')} {fmtNum(S.targetW)} {S.unit} · {Math.abs(S.targetW - bw.w) < 0.05 ? t('reached!') : t(S.targetW > bw.w ? '{0} to gain' : '{0} to lose', fmtNum(Math.abs(S.targetW - bw.w)) + ' ' + S.unit)}</span>
</div>
)}
<div className="chart" style={{ marginTop: 8 }}><LineChart points={bwPoints} h={130} unit={S.unit} goal={S.targetW} /></div>
</> : <div className="muted small">{t("No entries yet — log your weight to start the curve. It's also asked before every workout.")}</div>}
</div>
@@ -100,10 +118,13 @@ export default function Home() {
<div className="card tappable" style={{ cursor: 'pointer' }} onClick={() => calendarSheet()}>
<div className="row between">
<div>
<div style={{ fontSize: '1.35rem', fontWeight: 800 }}>🔥 {t('{0} week streak', streakWeeks(S))}</div>
<div className="row" style={{ gap: 7, fontSize: 22, fontWeight: 600, letterSpacing: '-.021em' }}>
<Icon name="flame" style={{ color: 'var(--orange)' }} />
{t('{0} week streak', streakWeeks(S))}
</div>
<div className="muted small" style={{ marginTop: 2 }}>{wThisWeek}{plannedPerWeek ? ' / ' + plannedPerWeek : ''} {t('this week')} · {t(S.workouts.length === 1 ? '{0} workout total' : '{0} workouts total', S.workouts.length)}</div>
</div>
<span className="chev" style={{ fontSize: '1.4rem' }}>📅</span>
<Icon name="calendar" className="chev" style={{ fontSize: 20 }} />
</div>
</div>
</div>
+10 -8
View File
@@ -6,6 +6,8 @@ import { fmtNum } from '../lib/format.js'
import { t } from '../lib/i18n.js'
import { Thumb } from '../components/Media.jsx'
import { exerciseDetailSheet, addToRoutineSheet, customExSheet } from '../sheets.jsx'
import Icon from '../components/Icon.jsx'
import { Button } from '../components/ui.jsx'
export default function Library() {
const S = useStore(s => s.S)
@@ -25,29 +27,29 @@ export default function Library() {
<div className="search" style={{ marginBottom: 10 }}><svg viewBox="0 0 24 24"><circle cx="11" cy="11" r="7" /><path d="m21 21-4.3-4.3" /></svg>
<input className="input" placeholder={t('Search…')} value={q} onChange={e => { setQ(e.target.value); setShown(40) }} /></div>
<div className="chips" style={{ marginBottom: eqOpts.length > 1 ? 8 : 12 }}>
<button className={'chip' + (!bp ? ' on' : '')} onClick={() => { setBp(''); setEq(''); setShown(40) }}>{t('All')}</button>
<button className={'chip nocap' + (!bp ? ' on' : '')} onClick={() => { setBp(''); setEq(''); setShown(40) }}>{t('All')}</button>
{BODYPARTS.map(b => <button key={b} className={'chip' + (bp === b ? ' on' : '')} onClick={() => { setBp(b); setEq(''); setShown(40) }}>{t(b)}</button>)}
</div>
{eqOpts.length > 1 && <div className="chips" style={{ marginBottom: 12 }}>
<button className={'chip' + (!eqOn ? ' on' : '')} onClick={() => { setEq(''); setShown(40) }}>{t('Any equipment')}</button>
<button className={'chip nocap' + (!eqOn ? ' on' : '')} onClick={() => { setEq(''); setShown(40) }}>{t('Any equipment')}</button>
{eqOpts.map(x => <button key={x} className={'chip' + (eqOn === x ? ' on' : '')} onClick={() => { setEq(x); setShown(40) }}>{t(x)}</button>)}
</div>}
<div className="list">
<div className="item" onClick={() => customExSheet(null, ex => exerciseDetailSheet(ex), q.trim())}>
<div className="thumb thumb-x">✨</div>
<div className="grow"><div className="tt">{t('Create your own exercise')}</div><div className="ss">{t('name + body part, no animation')}</div></div><span className="chev">+</span>
<div className="thumb thumb-x"><Icon name="sparkles" /></div>
<div className="grow"><div className="tt">{t('Create your own exercise')}</div><div className="ss">{t('name + body part, no animation')}</div></div><Icon name="plus" className="chev" />
</div>
{f.slice(0, shown).map(e => {
const best = bestWeightFor(S, e.id)
return <div key={e.id} className="item" onClick={() => exerciseDetailSheet(e)}>
<Thumb ex={e} />
<div className="grow"><div className="tt">{e.n}</div><div className="ss">{t(e.tg || e.bp)} · {t(e.eq)}</div></div>
<div className="grow"><div className="tt capitalize">{e.n}</div><div className="ss capitalize">{t(e.tg || e.bp)} · {t(e.eq)}</div></div>
{best > 0 && <span className="tag acc">{fmtNum(best)}</span>}
<button className="btn sm primary" onClick={ev => { ev.stopPropagation(); addToRoutineSheet(e) }}>+ {t('Plan')}</button>
<Button size="sm" variant="tinted" icon="plus" onClick={ev => { ev.stopPropagation(); addToRoutineSheet(e) }}>{t('Plan')}</Button>
</div>
})}
{f.length === 0 && <div className="empty">{t('No match 🤷')}</div>}
{f.length === 0 && <div className="empty"><div className="ico"><Icon name="magnifier" /></div>{t('No match')}</div>}
</div>
{f.length > shown && <><div style={{ height: 10 }} /><button className="btn" onClick={() => setShown(s => s + 40)}>{t('Show more')}</button></>}
{f.length > shown && <><div style={{ height: 10 }} /><Button onClick={() => setShown(s => s + 40)}>{t('Show more')}</Button></>}
</>
}
+13 -11
View File
@@ -4,6 +4,8 @@ import { webauthnOK, passkeyLogin, passkeyRegister, api, BIO } from '../lib/api.
import { hasData } from '../store/useStore.js'
import { t } from '../lib/i18n.js'
import { useState, useRef, useEffect } from 'react'
import Icon from '../components/Icon.jsx'
import { Button } from '../components/ui.jsx'
function RegisterSheet({ close }) {
const { setUser, pushState, pullState } = useStore()
@@ -20,43 +22,43 @@ function RegisterSheet({ close }) {
try {
const u = await passkeyRegister(n, code.trim())
setUser(u); close()
if (hasData(useStore.getState().S)) { await pushState(); useUI.getState().toast(t('Profile created — data from this device moved into it ✓')) }
else { await pullState(); useUI.getState().toast(t('Welcome, {0} 💪', u.name)) }
if (hasData(useStore.getState().S)) { await pushState(); useUI.getState().toast(t('Profile created — data from this device moved into it')) }
else { await pullState(); useUI.getState().toast(t('Welcome, {0}', u.name)) }
} catch (e) { if (e.name !== 'NotAllowedError' && e.name !== 'AbortError') useUI.getState().toast(e.message || t('Registration failed')) }
}
return <>
<h3>{t('Create your profile ✨')}</h3>
<h3>{t('Create your profile')}</h3>
<div className="muted small" style={{ marginBottom: 14 }}>{t('Pick a name, then confirm with {0}. The passkey is saved in your device — no password needed.', BIO)}</div>
<input ref={ref} className="input" placeholder={t('Your name')} maxLength={40} value={name} onChange={e => setName(e.target.value)} />
{inviteOnly && <>
<div style={{ height: 10 }} />
<input className="input" placeholder={t('Invite code')} maxLength={40} value={code}
onChange={e => setCode(e.target.value.toUpperCase())} style={{ letterSpacing: '.08em', fontWeight: 700 }} />
onChange={e => setCode(e.target.value.toUpperCase())} style={{ letterSpacing: '.14em', fontWeight: 600, textAlign: 'center' }} />
<div className="dim small" style={{ marginTop: 6 }}>{t('This app is invite-only — enter the code you were given.')}</div>
</>}
<div style={{ height: 12 }} />
<button className="btn primary" onClick={go}>{t('Create passkey')}</button>
<Button variant="primary" onClick={go}>{t('Create passkey')}</Button>
</>
}
export default function Login() {
const { setUser, pullState, setGuest } = useStore()
const signIn = async () => {
try { const u = await passkeyLogin(); setUser(u); await pullState(); useUI.getState().toast(t('Welcome back, {0} 💪', u.name)) }
try { const u = await passkeyLogin(); setUser(u); await pullState(); useUI.getState().toast(t('Welcome back, {0}', u.name)) }
catch (e) { if (e.name !== 'NotAllowedError' && e.name !== 'AbortError') useUI.getState().toast(e.message || t('Sign-in failed')) }
}
return (
<div className="narrow" style={{ display: 'flex', flexDirection: 'column', justifyContent: 'center', minHeight: '78vh', textAlign: 'center' }}>
<div style={{ fontSize: '4rem' }}>🏋️</div>
<h1 style={{ fontSize: '2.2rem', fontWeight: 800, letterSpacing: '-.02em', margin: '8px 0 4px' }}>openGym</h1>
<div style={{ fontSize: 54, display: 'flex', justifyContent: 'center', color: 'var(--acc)' }}><Icon name="dumbbell" /></div>
<h1 style={{ fontSize: 34, fontWeight: 700, letterSpacing: '-.028em', margin: '10px 0 4px' }}>openGym</h1>
<div className="muted" style={{ marginBottom: 34 }}>{t('Your workouts. Your weights. Your profile.')}</div>
{webauthnOK() ? <>
<button className="btn primary" onClick={signIn}>👤 {t('Sign in with passkey')}</button>
<Button variant="primary" icon="person" onClick={signIn}>{t('Sign in with passkey')}</Button>
<div style={{ height: 10 }} />
<button className="btn" onClick={() => useUI.getState().openSheet(close => <RegisterSheet close={close} />)}>✨ {t('Create new profile')}</button>
<Button icon="sparkles" onClick={() => useUI.getState().openSheet(close => <RegisterSheet close={close} />)}>{t('Create new profile')}</Button>
<div style={{ height: 10 }} />
</> : <div className="card small muted" style={{ textAlign: 'left' }}>{t("This browser doesn't support passkeys — you can still use openGym locally on this device.")}</div>}
<button className="btn ghost dim" onClick={() => setGuest(true)}>{t('Continue without account')}</button>
<Button variant="ghost" className="dim" onClick={() => setGuest(true)}>{t('Continue without account')}</Button>
<div className="dim small" style={{ marginTop: 26, lineHeight: 1.5 }}>{t('Passkeys use {0} — no passwords.', BIO)}<br />{t('Each profile keeps its own plan, workouts & body weight.')}</div>
</div>
)
+11 -8
View File
@@ -3,6 +3,9 @@ import { useStore } from '../store/useStore.js'
import { DAYN, uid } from '../lib/format.js'
import { t } from '../lib/i18n.js'
import { dayAssignSheet, loadStarterPlan } from '../sheets.jsx'
import Icon from '../components/Icon.jsx'
import { Button } from '../components/ui.jsx'
import { glyphOf, DEFAULT_GLYPH } from '../lib/glyphs.js'
export default function Plan() {
const nav = useNavigate()
@@ -10,7 +13,7 @@ export default function Plan() {
const update = useStore(s => s.update)
const addRoutine = () => {
const r = { id: uid(), name: t('New routine'), emoji: '💪', ex: [] }
const r = { id: uid(), name: t('New routine'), emoji: DEFAULT_GLYPH, ex: [] }
update(s => { s.routines.push(r) })
nav('/plan/r/' + r.id)
}
@@ -24,21 +27,21 @@ export default function Plan() {
const r = S.routines.find(x => x.id === S.week[d])
return <div key={d} className="item" onClick={() => dayAssignSheet(d)}>
<div className="grow"><div className="tt">{t(DAYN[d])}</div></div>
{r ? <span className="tag acc">{(r.emoji || '') + ' ' + r.name}</span> : <span className="tag">{t('Rest')}</span>}
<span className="chev">›</span></div>
{r ? <span className="tag acc"><Icon name={glyphOf(r.emoji)} />{r.name}</span> : <span className="tag">{t('Rest')}</span>}
<Icon name="chevronRight" className="chev" /></div>
})}
</div>
</div><div>
<div className="row between" style={{ marginTop: 22, marginBottom: 10 }}>
<h4 className="sec" style={{ margin: 0 }}>{t('Routines')}</h4>
<button className="btn sm primary" onClick={addRoutine}>+ {t('New')}</button>
<Button size="sm" variant="tinted" icon="plus" onClick={addRoutine}>{t('New')}</Button>
</div>
{S.routines.length ? <div className="list">{S.routines.map(r => <div key={r.id} className="item" onClick={() => nav('/plan/r/' + r.id)}>
<div style={{ fontSize: '1.5rem', flex: 'none' }}>{r.emoji || '💪'}</div>
<span className="lrow-i"><Icon name={glyphOf(r.emoji)} /></span>
<div className="grow"><div className="tt">{r.name}</div><div className="ss">{t('{0} exercises', r.ex.length)}</div></div>
<span className="chev">›</span></div>)}</div> : <>
<div className="empty"><div className="ico">📋</div>{t('No routines yet.')}<br />{t('Create one or load the starter plan.')}</div>
<button className="btn" onClick={loadStarterPlan}>{t('Load starter plan (Push / Pull / Legs)')}</button>
<Icon name="chevronRight" className="chev" /></div>)}</div> : <>
<div className="empty"><div className="ico"><Icon name="clipboard" /></div>{t('No routines yet.')}<br />{t('Create one or load the starter plan.')}</div>
<Button icon="sparkles" onClick={loadStarterPlan}>{t('Load starter plan (Push / Pull / Legs)')}</Button>
</>}
</div></div>
</>
+17 -14
View File
@@ -6,7 +6,10 @@ import { fmtNum, uid } from '../lib/format.js'
import { t } from '../lib/i18n.js'
import { supersetUnits, cleanupSg } from '../lib/history.js'
import { Thumb } from '../components/Media.jsx'
import { emojiPicker, exercisePicker, exConfigSheet, confirmSheet } from '../sheets.jsx'
import { glyphPicker, exercisePicker, exConfigSheet, confirmSheet } from '../sheets.jsx'
import Icon from '../components/Icon.jsx'
import { glyphOf } from '../lib/glyphs.js'
import { Button } from '../components/ui.jsx'
export default function RoutineEdit() {
const nav = useNavigate()
@@ -33,39 +36,39 @@ export default function RoutineEdit() {
return <div className="narrow">
<div className="hdr">
<button className="iconbtn" onClick={() => nav('/plan')}>‹</button>
<button className="iconbtn" onClick={() => nav('/plan')} aria-label={t('Plan')}><Icon name="chevronLeft" /></button>
<div style={{ flex: 1, margin: '0 12px' }}>
<input className="input" defaultValue={r.name} style={{ fontWeight: 800, fontSize: '1.1rem' }}
<input className="input" defaultValue={r.name} style={{ fontWeight: 600, fontSize: 20, letterSpacing: '-.021em' }}
onChange={e => update(s => { s.routines.find(x => x.id === id).name = e.target.value.trim() || t('Routine') })} />
</div>
<button className="iconbtn" onClick={() => emojiPicker(r.emoji, emo => update(s => { s.routines.find(x => x.id === id).emoji = emo }))}>{r.emoji || '💪'}</button>
<button className="iconbtn" aria-label={t('Pick an icon')} onClick={() => glyphPicker(r.emoji, g => update(s => { s.routines.find(x => x.id === id).emoji = g }))}><Icon name={glyphOf(r.emoji)} /></button>
</div>
{r.ex.length ? <div className="list">{r.ex.map((e, i) => {
const ex = EXIDX[e.id]; if (!ex) return null
const linkedPrev = i > 0 && e.sg && r.ex[i - 1].sg === e.sg
return <div key={i}>
{unitFirst.has(i) && <div className="ss-label">🔗 {t('Superset')}</div>}
{unitFirst.has(i) && <div className="ss-label"><Icon name="link" />{t('Superset')}</div>}
<div className={'item' + (inSS.has(i) ? ' in-ss' : '')} onClick={() => {
exConfigSheet(ex, e, cfg => edit(x => { Object.assign(x[i], cfg) }), () => edit(x => { x.splice(i, 1); cleanupSg(x) }))
}}>
<Thumb ex={ex} />
<div className="grow"><div className="tt">{ex.n}</div><div className="ss">{isCardio(e.id) ? `${e.sets} × ${e.min || 20} min @ ${fmtNum(e.speed || 8)} km/h` : `${e.sets} × ${e.reps}${e.weight ? ' · ' + fmtNum(e.weight) + ' ' + S.unit : ''}`}</div></div>
<div className="grow"><div className="tt capitalize">{ex.n}</div><div className="ss">{isCardio(e.id) ? `${e.sets} × ${e.min || 20} min @ ${fmtNum(e.speed || 8)} km/h` : `${e.sets} × ${e.reps}${e.weight ? ' · ' + fmtNum(e.weight) + ' ' + S.unit : ''}`}</div></div>
<div style={{ display: 'flex', flexDirection: 'column', gap: 2, flex: 'none', alignItems: 'center' }}>
{i > 0 && <button className={'iconbtn' + (linkedPrev ? ' on-ss' : '')} title={t('Superset with exercise above')} style={{ width: 34, height: 28, fontSize: '.85rem' }} onClick={ev => { ev.stopPropagation(); toggleLink(i) }}>🔗</button>}
{i > 0 && <button className={'iconbtn' + (linkedPrev ? ' on-ss' : '')} title={t('Superset with exercise above')} style={{ width: 32, height: 28, borderRadius: 8, fontSize: 15 }} onClick={ev => { ev.stopPropagation(); toggleLink(i) }}><Icon name="link" /></button>}
<div style={{ display: 'flex', gap: 2 }}>
<button className="iconbtn" style={{ width: 28, height: 26, fontSize: '.7rem' }} onClick={ev => { ev.stopPropagation(); move(i, -1) }}>▲</button>
<button className="iconbtn" style={{ width: 28, height: 26, fontSize: '.7rem' }} onClick={ev => { ev.stopPropagation(); move(i, 1) }}>▼</button>
<button className="iconbtn" aria-label="Move up" style={{ width: 28, height: 24, borderRadius: 7, fontSize: 12 }} onClick={ev => { ev.stopPropagation(); move(i, -1) }}><Icon name="chevronUp" /></button>
<button className="iconbtn" aria-label="Move down" style={{ width: 28, height: 24, borderRadius: 7, fontSize: 12 }} onClick={ev => { ev.stopPropagation(); move(i, 1) }}><Icon name="chevronDown" /></button>
</div>
</div>
</div>
</div>
})}</div> : <div className="empty"><div className="ico">🏋️</div>{t('No exercises yet — add your first one.')}</div>}
})}</div> : <div className="empty"><div className="ico"><Icon name="dumbbell" /></div>{t('No exercises yet — add your first one.')}</div>}
<div className="small dim" style={{ margin: '10px 2px' }}>{t('Tip: tap 🔗 on an exercise to superset it with the one above — you’ll do them back-to-back.')}</div>
<button className="btn primary" onClick={() => exercisePicker(ex => exConfigSheet(ex, null, cfg => edit(x => { x.push({ id: ex.id, ...cfg }) })))}>+ {t('Add exercise')}</button>
<div className="small dim row" style={{ margin: '10px 2px', gap: 5 }}><Icon name="link" style={{ fontSize: 13 }} />{t('Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.')}</div>
<Button variant="primary" onClick={() => exercisePicker(ex => exConfigSheet(ex, null, cfg => edit(x => { x.push({ id: ex.id, ...cfg }) })))} icon="plus">{t('Add exercise')}</Button>
<div style={{ height: 10 }} />
<button className="btn danger" onClick={() => confirmSheet({
<Button variant="danger" onClick={() => confirmSheet({
title: t('Delete routine?'), message: t('“{0}” and its exercises will be removed.', r.name), confirmText: t('Delete'), danger: true,
onConfirm: () => {
update(s => {
@@ -75,6 +78,6 @@ export default function RoutineEdit() {
})
nav('/plan')
}
})}>{t('Delete routine')}</button>
})}>{t('Delete routine')}</Button>
</div>
}
+115 -93
View File
@@ -7,6 +7,8 @@ import { webauthnOK, passkeyLogin, passkeyRegister, IS_ANDROID } from '../lib/ap
import { pushSupported, enablePush, disablePush, sendTestPush } from '../lib/push.js'
import { t, LANGS, INSTR_LANGS } from '../lib/i18n.js'
import { loadStarterPlan, confirmSheet } from '../sheets.jsx'
import Icon from '../components/Icon.jsx'
import { Section, Row, SelectRow, Switch, Segmented, Button, TextField } from '../components/ui.jsx'
export default function Settings() {
const nav = useNavigate()
@@ -19,7 +21,7 @@ export default function Settings() {
const doExport = () => {
const blob = new Blob([JSON.stringify(S, null, 2)], { type: 'application/json' })
const a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = 'opengym-backup-' + todayISO() + '.json'; a.click(); URL.revokeObjectURL(a.href)
toast(t('Backup exported ✓'))
toast(t('Backup exported'))
}
const doImport = ev => {
const f = ev.target.files[0]; if (!f) return
@@ -28,86 +30,100 @@ export default function Settings() {
try {
const data = JSON.parse(rd.result)
if (!data.workouts || !data.routines) throw new Error('not an openGym backup')
confirmSheet({ title: t('Import backup?'), message: t('This replaces all current data with the backup file.'), confirmText: t('Import'), danger: true, onConfirm: () => { replaceState(Object.assign(JSON.parse(JSON.stringify(DEF)), data), true); toast(t('Backup imported ✓')) } })
confirmSheet({ title: t('Import backup?'), message: t('This replaces all current data with the backup file.'), confirmText: t('Import'), danger: true, onConfirm: () => { replaceState(Object.assign(JSON.parse(JSON.stringify(DEF)), data), true); toast(t('Backup imported')) } })
} catch (e) { toast(t('Import failed: {0}', e.message)) }
}
rd.readAsText(f)
}
const signInHere = async () => {
try { const u = await passkeyLogin(); setUser(u); await pullState(); toast(t('Welcome back, {0} 💪', u.name)) }
try { const u = await passkeyLogin(); setUser(u); await pullState(); toast(t('Welcome back, {0}', u.name)) }
catch (e) { if (e.name !== 'NotAllowedError' && e.name !== 'AbortError') toast(e.message || t('Sign-in failed')) }
}
const registerHere = () => useUI.getState().openSheet(close => <RegisterInline close={close} setUser={setUser} pushState={pushState} pullState={pullState} toast={toast} />)
return <div className="narrow">
<div className="hdr"><button className="iconbtn" onClick={() => nav('/home')}>‹</button><div style={{ flex: 1, marginLeft: 12 }}><h1>{t('Settings')}</h1></div></div>
<div className="hdr">
<button className="iconbtn" onClick={() => nav('/home')} aria-label={t('Home')}><Icon name="chevronLeft" /></button>
<div style={{ flex: 1, marginLeft: 10 }}><h1>{t('Settings')}</h1></div>
</div>
<div className="card">
<h2>{t('Account')}</h2>
{/* ---------- account ---------- */}
<Section title={t('Account')}>
{user ? <>
<div className="row between">
<div><b>{user.name}</b><div className="small muted">{t('Signed in with passkey — data syncs to this profile.')}</div></div>
<button className="btn sm danger" onClick={() => confirmSheet({ title: t('Sign out?'), message: t('Your data is synced to your profile first, then cleared from this device.'), confirmText: t('Sign out'), danger: true, onConfirm: () => { signOut(); nav('/home') } })}>{t('Sign out')}</button>
</div>
{user.admin && <><div style={{ height: 10 }} /><button className="btn sm" onClick={() => nav('/admin')}>🛠️ {t('Admin dashboard')}</button></>}
</> : <>
<div className="small muted" style={{ marginBottom: 10 }}>{t('Guest mode — data lives only in this browser. Create a passkey profile to keep it safe and separate per person.')}</div>
{webauthnOK() ? <>
<button className="btn primary" onClick={registerHere}>✨ {t('Create passkey profile')}</button>
<div style={{ height: 8 }} /><button className="btn" onClick={signInHere}>👤 {t('Sign in with passkey')}</button>
</> : <div className="small dim">{t('Passkeys not supported in this browser.')}</div>}
</>}
</div>
<Row icon="personCircle" iconTint="var(--grey)" title={user.name} subtitle={t('Signed in with passkey — data syncs to this profile.')} />
{user.admin && <Row icon="wrench" iconTint="var(--indigo)" title={t('Admin dashboard')} accessory="chevron" onClick={() => nav('/admin')} />}
<Row icon="signOut" iconTint="var(--red)" title={t('Sign out')} danger onClick={() => confirmSheet({ title: t('Sign out?'), message: t('Your data is synced to your profile first, then cleared from this device.'), confirmText: t('Sign out'), danger: true, onConfirm: () => { signOut(); nav('/home') } })} />
</> : webauthnOK() ? <>
<Row icon="sparkles" iconTint="var(--acc)" title={t('Create passkey profile')} subtitle={t('Keeps your data safe and separate per person.')} accessory="chevron" onClick={registerHere} />
<Row icon="person" iconTint="var(--blue)" title={t('Sign in with passkey')} accessory="chevron" onClick={signInHere} />
</> : (
<Row icon="lock" iconTint="var(--grey)" title={t('Passkeys not supported in this browser.')} />
)}
</Section>
{!user && <p className="sect-f" style={{ marginTop: -18, marginBottom: 22 }}>{t('Guest mode — data lives only in this browser.')}</p>}
<div className="card">
<h2>{t('Appearance')} <span className="dim" style={{ textTransform: 'none', letterSpacing: 0 }}>· {t('synced with your profile')}</span></h2>
<div className="row between" style={{ padding: '8px 0' }}>
<span>{t('Language')}</span>
<select className="input" style={{ width: 150 }} value={S.lang || 'en'} onChange={e => update(s => { s.lang = e.target.value })}>
{Object.entries(LANGS).map(([k, name]) => <option key={k} value={k}>{name}</option>)}
</select>
</div>
{!INSTR_LANGS.includes(S.lang || 'en') && <div className="small dim" style={{ marginBottom: 6 }}>{t("Exercise instructions aren't available in this language yet — they stay in English.")}</div>}
<div className="row between" style={{ padding: '8px 0' }}>
<span>{t('Theme')}</span>
<div className="chips">
<button className={'chip' + (S.theme !== 'light' ? ' on' : '')} onClick={() => update(s => { s.theme = 'dark' })}>🌙 {t('Dark')}</button>
<button className={'chip' + (S.theme === 'light' ? ' on' : '')} onClick={() => update(s => { s.theme = 'light' })}>☀️ {t('Light')}</button>
{/* ---------- appearance ---------- */}
<Section title={t('Appearance')} footer={t('synced with your profile')}>
<SelectRow
icon="globe" iconTint="var(--blue)" title={t('Language')}
value={S.lang || 'en'} onChange={v => update(s => { s.lang = v })}
options={Object.entries(LANGS).map(([k, name]) => ({
value: k, label: name,
subtitle: INSTR_LANGS.includes(k) ? null : t("Exercise instructions aren't available in this language yet — they stay in English."),
}))}
/>
<Row icon="moon" iconTint="var(--indigo)" title={t('Theme')}>
<Segmented
className="seg-inline"
options={[{ value: 'dark', icon: 'moon', label: t('Dark') }, { value: 'light', icon: 'sun', label: t('Light') }]}
value={S.theme === 'light' ? 'light' : 'dark'}
onChange={v => update(s => { s.theme = v })}
/>
</Row>
<div className="lrow" style={{ flexDirection: 'column', alignItems: 'stretch', gap: 12, paddingTop: 13, paddingBottom: 14 }}>
<span className="lrow-t">{t('Accent color')}</span>
<div className="swatches">
{Object.entries(ACCENTS).map(([k, c]) => (
<button key={k} className={'swatch' + ((S.accent || 'lime') === k ? ' on' : '')}
style={{ background: c }} onClick={() => update(s => { s.accent = k })} aria-label={k} />
))}
</div>
</div>
<div style={{ padding: '8px 0' }}>
<div style={{ marginBottom: 10 }}>{t('Accent color')}</div>
<div className="swatches">{Object.entries(ACCENTS).map(([k, c]) => <button key={k} className={'swatch' + ((S.accent || 'lime') === k ? ' on' : '')} style={{ background: c }} onClick={() => update(s => { s.accent = k })} />)}</div>
</div>
</div>
</Section>
<div className="card">
<h2>{t('Units & timer')}</h2>
<div className="row between" style={{ padding: '8px 0' }}><span>{t('Weight unit')}</span>
<div className="chips"><button className={'chip' + (S.unit === 'kg' ? ' on' : '')} onClick={() => update(s => { s.unit = 'kg' })}>kg</button>
<button className={'chip' + (S.unit === 'lb' ? ' on' : '')} onClick={() => update(s => { s.unit = 'lb' })}>lb</button></div></div>
<div className="row between" style={{ padding: '8px 0' }}><span>{t('Rest timer')}</span>
<select className="input" style={{ width: 120 }} value={S.restSec} onChange={e => update(s => { s.restSec = +e.target.value })}>
{[60, 90, 120, 150, 180].map(v => <option key={v} value={v}>{v}s</option>)}</select></div>
<div className="row between" style={{ padding: '8px 0' }}><span>{t('Sounds')}</span>
<button className={'chip' + (S.sound ? ' on' : '')} onClick={() => update(s => { s.sound = !s.sound })}>{S.sound ? t('On 🔔') : t('Off 🔕')}</button></div>
<div className="small dim" style={{ marginTop: 6 }}>{t('Note: switching units only changes the label — logged numbers are not converted.')}</div>
</div>
{/* ---------- units & timer ---------- */}
<Section title={t('Units & timer')} footer={t('Note: switching units only changes the label — logged numbers are not converted.')}>
<Row icon="scale" iconTint="var(--teal)" title={t('Weight unit')}>
<Segmented className="seg-inline"
options={[{ value: 'kg', label: 'kg' }, { value: 'lb', label: 'lb' }]}
value={S.unit} onChange={v => update(s => { s.unit = v })} />
</Row>
<SelectRow icon="timer" iconTint="var(--orange)" title={t('Rest timer')}
value={S.restSec} onChange={v => update(s => { s.restSec = v })}
options={[60, 90, 120, 150, 180].map(v => ({ value: v, label: v + 's' }))} />
<Row icon="bell" iconTint="var(--pink)" title={t('Sounds')}>
<Switch checked={!!S.sound} onChange={v => update(s => { s.sound = v })} />
</Row>
</Section>
{user && <NotificationsCard S={S} update={update} toast={toast} />}
<div className="card">
<h2>{t('Data')}</h2>
<button className="btn" onClick={doExport}>⬇️ {t('Export backup (JSON)')}</button>
<div style={{ height: 8 }} /><button className="btn" onClick={() => fileRef.current.click()}>⬆️ {t('Import backup')}</button>
<input ref={fileRef} type="file" accept=".json,application/json" style={{ display: 'none' }} onChange={doImport} />
<div style={{ height: 8 }} /><button className="btn" onClick={loadStarterPlan}>{t('Load starter plan (PPL)')}</button>
<div style={{ height: 8 }} /><button className="btn danger" onClick={() => confirmSheet({ title: t('Reset everything?'), message: t('Deletes your plan, workouts and body weight on this device. This cannot be undone.'), confirmText: t('Delete everything'), danger: true, onConfirm: () => { replaceState(JSON.parse(JSON.stringify(DEF)), true); nav('/home'); toast(t('All data reset')) } })}>{t('Reset everything')}</button>
</div>
{/* ---------- data ---------- */}
<Section title={t('Data')}>
<Row icon="download" iconTint="var(--blue)" title={t('Export backup (JSON)')} accessory="chevron" onClick={doExport} />
<Row icon="upload" iconTint="var(--blue)" title={t('Import backup')} accessory="chevron" onClick={() => fileRef.current.click()} />
<Row icon="sparkles" iconTint="var(--acc)" title={t('Load starter plan (PPL)')} accessory="chevron" onClick={loadStarterPlan} />
<Row icon="trash" iconTint="var(--red)" title={t('Reset everything')} danger onClick={() => confirmSheet({ title: t('Reset everything?'), message: t('Deletes your plan, workouts and body weight on this device. This cannot be undone.'), confirmText: t('Delete everything'), danger: true, onConfirm: () => { replaceState(JSON.parse(JSON.stringify(DEF)), true); nav('/home'); toast(t('All data reset')) } })} />
</Section>
<input ref={fileRef} type="file" accept=".json,application/json" style={{ display: 'none' }} onChange={doImport} />
<div className="card"><h2>{t('Tip')}</h2>
<div className="small muted" style={{ lineHeight: 1.5 }}>📱 {IS_ANDROID ? t('In Chrome: ⋮ menu → Add to Home screen') : t('In Safari: Share → Add to Home Screen')} {t('to install openGym as a full-screen app.')} {user ? t('Your data syncs with your profile — sign in anywhere to see it.') : t('Guest data stays on this device — export a backup now and then!')}</div></div>
<div className="dim small" style={{ textAlign: 'center', marginTop: 8, lineHeight: 1.6 }}>
<Section title={t('Tip')}>
<Row icon="lightbulb" iconTint="var(--yellow)"
title={IS_ANDROID ? t('In Chrome: ⋮ menu → Add to Home screen') : t('In Safari: Share → Add to Home Screen')}
subtitle={t('to install openGym as a full-screen app.') + ' ' + (user ? t('Your data syncs with your profile — sign in anywhere to see it.') : t('Guest data stays on this device — export a backup now and then!'))} />
</Section>
<div className="dim small" style={{ textAlign: 'center', marginTop: 4, lineHeight: 1.6 }}>
openGym · {t('free & open source (AGPL v3)')}<br />
<a href="https://github.com/DuarteSantos8/openGym" target="_blank" rel="noopener">source code</a> · exercise data: hasaneyldrm/exercises-dataset (CC)
</div>
@@ -124,11 +140,11 @@ function NotificationsCard({ S, update, toast }) {
navigator.serviceWorker.ready.then(reg => reg.pushManager.getSubscription()).then(sub => setOn(!!sub)).catch(() => {})
}, [supported])
const toggle = async () => {
const toggle = async v => {
setBusy(true)
try {
if (on) { await disablePush(); setOn(false); toast(t('Notifications off')) }
else { await enablePush(); setOn(true); toast(t('Notifications on 🔔')) }
if (!v) { await disablePush(); setOn(false); toast(t('Notifications off')) }
else { await enablePush(); setOn(true); toast(t('Notifications on')) }
} catch (e) { toast(e.message || t('Could not change notification settings')) }
setBusy(false)
}
@@ -137,31 +153,37 @@ function NotificationsCard({ S, update, toast }) {
catch (e) { toast(e.message || t('Test failed')) }
}
return <div className="card">
<h2>{t('Notifications')}</h2>
{!supported ? <div className="small dim">{t('Not supported in this browser.')}</div> : <>
<div className="row between" style={{ padding: '8px 0' }}>
<div><span>{t('Push notifications')}</span><div className="small muted">{t('Rest-timer alerts, even if openGym is closed.')}</div></div>
<button className={'chip' + (on ? ' on' : '')} disabled={busy} onClick={toggle}>{on ? t('On 🔔') : t('Off 🔕')}</button>
</div>
{on && <>
<div className="row between" style={{ padding: '8px 0' }}>
<span>{t('Workout day reminder')}</span>
<button className={'chip' + (S.reminder?.on ? ' on' : '')} onClick={() => update(s => { s.reminder = { ...(s.reminder || DEF.reminder), on: !s.reminder?.on, tz: localTZ() } })}>{S.reminder?.on ? t('On') : t('Off')}</button>
</div>
{S.reminder?.on && <div className="row between" style={{ padding: '8px 0' }}>
<span>{t('Reminder time')}</span>
<input type="time" className="input" style={{ width: 120 }} value={S.reminder?.time || DEF.reminder.time}
if (!supported) return (
<Section title={t('Notifications')}>
<Row icon="bellSlash" iconTint="var(--grey)" title={t('Not supported in this browser.')} />
</Section>
)
return <>
<Section
title={t('Notifications')}
footer={on && S.reminder?.on
? t("Only sent on days you have a routine planned and haven't logged a workout yet.") +
(S.reminder?.tz ? ' ' + t('Timezone: {0} (auto-detected, updates if you travel).', S.reminder.tz) : '')
: null}
>
<Row icon="bell" iconTint="var(--red)" title={t('Push notifications')} subtitle={t('Rest-timer alerts, even if openGym is closed.')}>
<Switch checked={on} disabled={busy} onChange={toggle} />
</Row>
{on && (
<Row icon="calendar" iconTint="var(--orange)" title={t('Workout day reminder')}>
<Switch checked={!!S.reminder?.on} onChange={() => update(s => { s.reminder = { ...(s.reminder || DEF.reminder), on: !s.reminder?.on, tz: localTZ() } })} />
</Row>
)}
{on && S.reminder?.on && (
<Row icon="clock" iconTint="var(--purple)" title={t('Reminder time')}>
<input type="time" className="timef" value={S.reminder?.time || DEF.reminder.time}
onChange={e => update(s => { s.reminder = { ...(s.reminder || DEF.reminder), time: e.target.value, tz: localTZ() } })} />
</div>}
<div className="small dim" style={{ margin: '6px 0' }}>
{t("Only sent on days you have a routine planned and haven't logged a workout yet.")}
{S.reminder?.on && S.reminder?.tz && <> {t('Timezone: {0} (auto-detected, updates if you travel).', S.reminder.tz)}</>}
</div>
<button className="btn sm" onClick={test}>{t('Send test notification')}</button>
</>}
</>}
</div>
</Row>
)}
</Section>
{on && <div style={{ marginTop: -12, marginBottom: 22 }}><Button size="sm" icon="bell" onClick={test}>{t('Send test notification')}</Button></div>}
</>
}
function RegisterInline({ close, setUser, pushState, pullState, toast }) {
@@ -171,14 +193,14 @@ function RegisterInline({ close, setUser, pushState, pullState, toast }) {
if (!n) { toast(t('Enter a name')); return }
try {
const u = await passkeyRegister(n); setUser(u); close()
if (hasData(useStore.getState().S)) { await pushState(); toast(t('Profile created — data moved into it ✓')) }
else { await pullState(); toast(t('Welcome, {0} 💪', u.name)) }
if (hasData(useStore.getState().S)) { await pushState(); toast(t('Profile created — data moved into it')) }
else { await pullState(); toast(t('Welcome, {0}', u.name)) }
} catch (e) { if (e.name !== 'NotAllowedError' && e.name !== 'AbortError') toast(e.message || t('Registration failed')) }
}
return <>
<h3>{t('Create your profile ✨')}</h3>
<h3>{t('Create your profile')}</h3>
<div className="muted small" style={{ marginBottom: 14 }}>{t('Pick a name, then confirm with your device.')}</div>
<input ref={nameRef} className="input" placeholder={t('Your name')} maxLength={40} />
<div style={{ height: 12 }} /><button className="btn primary" onClick={go}>{t('Create passkey')}</button>
<TextField ref={nameRef} placeholder={t('Your name')} maxLength={40} />
<div style={{ height: 12 }} /><Button variant="primary" onClick={go}>{t('Create passkey')}</Button>
</>
}
+18 -16
View File
@@ -8,6 +8,8 @@ import { t } from '../lib/i18n.js'
import { bwSheet, goalSheet, calendarSheet, workoutDetailSheet, WorkoutRow, bwDeltaColor } from '../sheets.jsx'
import LineChart from '../components/LineChart.jsx'
import Heatmap from '../components/Heatmap.jsx'
import Icon from '../components/Icon.jsx'
import { Button, Segmented, SelectRow } from '../components/ui.jsx'
// Stats = the analytics hub: all charts, progress and history live here.
export default function Stats() {
@@ -39,13 +41,13 @@ export default function Stats() {
return <>
<div className="hdr"><div><h1>{t('Stats')}</h1><div className="sub">{t('Progress & history')}</div></div>
<button className="iconbtn" onClick={() => nav('/history')}>🗂</button></div>
<button className="iconbtn" onClick={() => nav('/history')} aria-label={t('History')}><Icon name="history" /></button></div>
<div className="tiles">
<div className="tile"><div className="l">{t('Workouts')}</div><div className="v">{S.workouts.length}</div></div>
<div className="tile"><div className="l">{t('This month')}</div><div className="v">{monthW}</div></div>
<div className="tile"><div className="l">{t('Week streak')}</div><div className="v">{streakWeeks(S)} 🔥</div></div>
<div className="tile"><div className="l">{t('Weight 30d')}</div><div className="v" style={{ fontSize: '1.15rem', color: bwDelta30 === null ? 'inherit' : bwDeltaColor(bwDelta30, (lastBW(S) || {}).w || 0) }}>{bwDelta30 === null ? '—' : (bwDelta30 > 0 ? '+' : '') + fmtNum(bwDelta30) + ' ' + S.unit}</div></div>
<div className="tile"><div className="l"><Icon name="dumbbell" />{t('Workouts')}</div><div className="v">{S.workouts.length}</div></div>
<div className="tile"><div className="l"><Icon name="calendar" />{t('This month')}</div><div className="v">{monthW}</div></div>
<div className="tile"><div className="l"><Icon name="flame" />{t('Week streak')}</div><div className="v">{streakWeeks(S)}</div></div>
<div className="tile"><div className="l"><Icon name="scale" />{t('Weight 30d')}</div><div className="v" style={{ fontSize: 22, color: bwDelta30 === null ? 'inherit' : bwDeltaColor(bwDelta30, (lastBW(S) || {}).w || 0) }}>{bwDelta30 === null ? '—' : (bwDelta30 > 0 ? '+' : '') + fmtNum(bwDelta30) + ' ' + S.unit}</div></div>
</div>
<div className="card">
@@ -58,34 +60,34 @@ export default function Stats() {
<div className="row between" style={{ marginBottom: 8 }}>
<h2 style={{ margin: 0 }}>{t('Body weight')}</h2>
<div className="row" style={{ gap: 8 }}>
<button className="btn sm" style={S.targetW ? { color: 'var(--gold)' } : undefined} onClick={goalSheet}>🎯 {S.targetW ? fmtNum(S.targetW) : t('Goal')}</button>
<button className="btn sm" onClick={() => bwSheet()}>+ {t('Log')}</button>
<Button size="sm" icon="target" style={S.targetW ? { color: 'var(--yellow)' } : undefined} onClick={goalSheet}>{S.targetW ? fmtNum(S.targetW) : t('Goal')}</Button>
<Button size="sm" icon="plus" onClick={() => bwSheet()}>{t('Log')}</Button>
</div>
</div>
<div className="chips" style={{ marginBottom: 8 }}>
{[[30, '1M'], [90, '3M'], [365, '1Y'], [0, t('All')]].map(([d, l]) => <button key={l} className={'chip' + (range === d ? ' on' : '')} onClick={() => setRange(d)}>{l}</button>)}
</div>
<Segmented className="seg-range" value={range} onChange={setRange}
options={[{ value: 30, label: '1M' }, { value: 90, label: '3M' }, { value: 365, label: '1Y' }, { value: 0, label: t('All') }]} />
<div className="chart"><LineChart points={bwPts} h={160} unit={S.unit} goal={S.targetW} /></div>
</div>
<div className="card">
<h2>{t('Exercise progress')}</h2>
{exHist.length ? <>
<select className="input capitalize" style={{ marginBottom: 10 }} value={curEx} onChange={e => setExId(e.target.value)}>
{exHist.map(id => <option key={id} value={id}>{EXIDX[id].n}{isCardio(id) ? ' 🏃' : ''}</option>)}
</select>
<div className="sect-b" style={{ marginBottom: 10 }}>
<SelectRow title={t('Exercise')} sheetTitle={t('Exercise progress')} value={curEx} onChange={setExId}
options={exHist.map(id => ({ value: id, label: EXIDX[id].n }))} />
</div>
<div className="chart"><LineChart points={exPts.map(p => ({ t: p.t, y: p.y, d: p.d }))} h={150} unit={exUnit} color="var(--blue)" /></div>
<div style={{ marginTop: 8 }}>{exList.map((p, i) => <div key={i} className="row between small" style={{ padding: '6px 0', borderBottom: '1px solid var(--bg2)' }}>
<div style={{ marginTop: 8 }}>{exList.map((p, i) => <div key={i} className="row between small" style={{ padding: '6px 0', borderBottom: 'var(--hair) solid var(--sep)' }}>
<span className="muted">{fmtDate(p.d, true)}</span><span>{p.sets.map(s => setLabel(curEx, s)).join(' ')}</span></div>)}</div>
<div className="small dim" style={{ marginTop: 8 }}>{curCardio ? t('Top speed per workout') : t('Best set weight per workout')} · {t('Best:')} <b className="accent">{fmtNum(exBest)} {exUnit}</b></div>
</> : <div className="muted small">{t('Finish your first workout to see progress curves here. 📈')}</div>}
</> : <div className="muted small">{t('Finish your first workout to see progress curves here.')}</div>}
</div>
</div>
{S.workouts.length > 0 && <>
<div className="row between" style={{ marginBottom: 10 }}>
<h4 className="sec" style={{ margin: 0 }}>{t('Recent workouts')}</h4>
<button className="btn sm ghost accent" onClick={() => nav('/history')}>{t('All')} {S.workouts.length} ›</button>
<Button size="sm" variant="ghost" trailingIcon="chevronRight" onClick={() => nav('/history')}>{t('All')} {S.workouts.length}</Button>
</div>
<div className="list">{[...S.workouts].reverse().slice(0, 6).map(w => <WorkoutRow key={w.id} w={w} onClick={() => workoutDetailSheet(w)} />)}</div>
</>}
+33 -29
View File
@@ -9,8 +9,10 @@ import { beep, vibrate } from '../lib/sound.js'
import { t } from '../lib/i18n.js'
import { api } from '../lib/api.js'
import Media from '../components/Media.jsx'
import NumField from '../components/NumField.jsx'
import { startFlow, exercisePicker, exConfigSheet, exerciseDetailSheet, topWeightSheet, finishWorkout, workoutCompleteSheet, confirmSheet } from '../sheets.jsx'
import Icon from '../components/Icon.jsx'
import { Button, Check, NumberField } from '../components/ui.jsx'
import { glyphOf } from '../lib/glyphs.js'
/* ---------- start chooser (no active workout) ---------- */
function StartChooser() {
@@ -25,18 +27,18 @@ function StartChooser() {
<h2 className="accent">{t("Today's plan")}{todayOvr ? ' · ' + t('rescheduled') : ''}</h2>
<div className="row between" style={{ marginBottom: 12 }}>
<div><div className="big">{todayR.name}</div><div className="muted small">{t('{0} exercises', todayR.ex.length)}</div></div>
<div style={{ fontSize: '2rem' }}>{todayR.emoji || '💪'}</div>
<span className="lrow-i" style={{ width: 38, height: 38, borderRadius: 9, fontSize: 22 }}><Icon name={glyphOf(todayR.emoji)} /></span>
</div>
<button className="btn primary" onClick={() => startFlow(todayR.id)}>{t('Start {0} ▶', todayR.name)}</button>
<Button variant="primary" icon="play" onClick={() => startFlow(todayR.id)}>{t('Start {0}', todayR.name)}</Button>
</div>}
{others.length > 0 && <><h4 className="sec">{t('Other routines')}</h4>
<div className="list">{others.map(r => <div key={r.id} className="item" onClick={() => startFlow(r.id)}>
<div style={{ fontSize: '1.5rem', flex: 'none' }}>{r.emoji || '💪'}</div>
<span className="lrow-i"><Icon name={glyphOf(r.emoji)} /></span>
<div className="grow"><div className="tt">{r.name}</div><div className="ss">{t('{0} exercises', r.ex.length)}</div></div>
<span className="tag acc">{t('Start ▶')}</span></div>)}</div></>}
<span className="tag acc">{t('Start')}</span></div>)}</div></>}
<div style={{ height: 14 }} />
<button className="btn" onClick={() => startFlow(null)}>🎯 {t('Freestyle workout (pick as you go)')}</button>
{!S.routines.length && <><div style={{ height: 10 }} /><button className="btn primary" onClick={() => nav('/plan')}>{t('Build a plan first')}</button></>}
<Button icon="shuffle" onClick={() => startFlow(null)}>{t('Freestyle workout (pick as you go)')}</Button>
{!S.routines.length && <><div style={{ height: 10 }} /><Button variant="primary" onClick={() => nav('/plan')}>{t('Build a plan first')}</Button></>}
</div>
}
@@ -62,38 +64,40 @@ function ExerciseBlock({ entryIdx, compact, onToggle, onField, onBumpAll, onAddS
? Math.max(...last.sets.map(s => s.w)) + 2.5 : null
const col1 = cardio ? { f: 'min', step: 1, dec: false, hd: t('Duration (min)') } : { f: 'w', step: 2.5, dec: true, hd: t('Weight ({0})', S.unit) }
const col2 = cardio ? { f: 'speed', step: 0.5, dec: true, hd: t('Speed (km/h)') } : { f: 'r', step: 1, dec: false, hd: t('Reps') }
// Uses the shared stepper markup so a set row picks up the same control styling
// as every other +/- field in the app.
const cell = (s, i, col, cls) => (
<div className={'step ' + cls}>
<button onClick={() => onField(i, col.f, Math.max(0, Math.round(((s[col.f] || 0) - col.step) * 100) / 100))}>−</button>
<NumField decimal={col.dec} value={s[col.f] ?? ''} onChange={v => onField(i, col.f, v)} />
<button onClick={() => onField(i, col.f, Math.max(0, Math.round(((s[col.f] || 0) + col.step) * 100) / 100))}>+</button>
<div className={'stp ' + cls}>
<button aria-label="Decrease" onClick={() => onField(i, col.f, Math.max(0, Math.round(((s[col.f] || 0) - col.step) * 100) / 100))}><Icon name="minus" /></button>
<span className="val"><NumberField decimal={col.dec} value={s[col.f] ?? ''} onChange={v => onField(i, col.f, v)} /></span>
<button aria-label="Increase" onClick={() => onField(i, col.f, Math.max(0, Math.round(((s[col.f] || 0) + col.step) * 100) / 100))}><Icon name="plus" /></button>
</div>
)
return <>
<Media ex={ex} key={entry.id} compact={compact} minimizable />
<div className="row between" style={{ marginBottom: 6 }}>
<div style={{ fontSize: compact ? '1.05rem' : '1.2rem', fontWeight: 800, textTransform: 'capitalize', lineHeight: 1.2 }}>{ex.n}</div>
<button className="iconbtn" onClick={() => exerciseDetailSheet(ex)}>ℹ️</button>
<div style={{ fontSize: compact ? 17 : 20, fontWeight: 600, letterSpacing: '-.02em', textTransform: 'capitalize', lineHeight: 1.2 }}>{ex.n}</div>
<button className="iconbtn" aria-label={t('Details')} onClick={() => exerciseDetailSheet(ex)}><Icon name="info" /></button>
</div>
<div className="row" style={{ gap: 6, flexWrap: 'wrap', marginBottom: 8 }}>
{cardio && <span className="tag acc">🏃 {t('Cardio')}</span>}
{cardio && <span className="tag acc"><Icon name="figureRun" />{t('Cardio')}</span>}
<span className="tag">{t(ex.tg || ex.bp)}</span><span className="tag">{t(ex.eq)}</span>
{best > 0 && <span className="tag">{t('Best:')} {fmtNum(best)} {S.unit}</span>}
</div>
{last && <div className="small dim" style={{ marginBottom: 4 }}>{t('Last time')} ({fmtDate(last.d)}): {last.sets.map(s => setLabel(entry.id, s)).join(', ')}</div>}
{hint && <button className="tag acc" style={{ border: 'none' }} onClick={() => { onBumpAll('w', hint); useUI.getState().toast(t('Weights bumped to {0} 💪', fmtNum(hint) + ' ' + S.unit)) }}>💡 {t('Last time you hit all reps — try {0}', fmtNum(hint) + ' ' + S.unit)}</button>}
{hint && <button className="tag acc" style={{ border: 'none', textAlign: 'left' }} onClick={() => { onBumpAll('w', hint); useUI.getState().toast(t('Weights bumped to {0}', fmtNum(hint) + ' ' + S.unit)) }}><Icon name="lightbulb" />{t('Last time you hit all reps — try {0}', fmtNum(hint) + ' ' + S.unit)}</button>}
<div className="card" style={{ marginTop: 10, marginBottom: 0 }}>
<div className="sethead"><span className="n-sp" /><span className="w-sp">{col1.hd}</span><span className="r-sp">{col2.hd}</span><span className="ck-sp" /></div>
{entry.sets.map((s, i) => <div key={i} className={'setrow' + (s.done ? ' done' : '')}>
<div className="n">{i + 1}</div>
{cell(s, i, col1, 'w')}
{cell(s, i, col2, 'r')}
<button className={'ck' + (s.done ? ' on' : '')} onClick={() => onToggle(i)}><svg viewBox="0 0 24 24"><path d="m4.5 12.5 5 5 10-11" /></svg></button>
<Check checked={s.done} onChange={() => onToggle(i)} />
</div>)}
<div style={{ height: 8 }} />
<div className="row">
<button className="btn sm" disabled={entry.sets.length <= 1} onClick={onRemoveSet}>− {t('Remove set')}</button>
<button className="btn sm" onClick={onAddSet}>+ {t('Add set')}</button>
<Button size="sm" icon="minus" disabled={entry.sets.length <= 1} onClick={onRemoveSet}>{t('Remove set')}</Button>
<Button size="sm" icon="plus" onClick={onAddSet}>{t('Add set')}</Button>
</div>
</div>
</>
@@ -145,7 +149,7 @@ function ActiveWorkout() {
// cardio or already-confirmed: go straight to the prompt.
if (askTop) topWeightSheet(idx)
else if (workoutDone) workoutCompleteSheet()
else if (exJustDone && cardioEntry) useUI.getState().toast(t('Cardio logged 🏃'))
else if (exJustDone && cardioEntry) useUI.getState().toast(t('Cardio logged'))
}
// Live-presence heartbeat so the admin dashboard can show who's training now. Signed-in only —
@@ -177,9 +181,9 @@ function ActiveWorkout() {
return <div className="narrow">
<div className="hdr">
<button className="iconbtn" onClick={() => confirmSheet({ title: t('Discard workout?'), message: t('The sets you logged in this session will be lost.'), confirmText: t('Discard'), danger: true, onConfirm: () => { update(s => { s.active = null }); stopRest(); nav('/home') } })}>✕</button>
<div style={{ textAlign: 'center' }}><div style={{ fontWeight: 800 }}>{A.name}</div><div className="sub"><Elapsed start={A.start} /> · {t('{0} sets', done + '/' + total)}</div></div>
<button className="iconbtn" style={{ color: 'var(--acc)' }} onClick={finishWorkout}>✓</button>
<button className="iconbtn" aria-label={t('Discard')} onClick={() => confirmSheet({ title: t('Discard workout?'), message: t('The sets you logged in this session will be lost.'), confirmText: t('Discard'), danger: true, onConfirm: () => { update(s => { s.active = null }); stopRest(); nav('/home') } })}><Icon name="xmark" /></button>
<div style={{ textAlign: 'center' }}><div style={{ fontWeight: 600 }}>{A.name}</div><div className="sub"><Elapsed start={A.start} /> · {t('{0} sets', done + '/' + total)}</div></div>
<button className="iconbtn" style={{ color: 'var(--acc)' }} aria-label={t('Finish')} onClick={finishWorkout}><Icon name="check" /></button>
</div>
<div className="wprog"><i style={{ width: (total ? done / total * 100 : 0) + '%' }} /></div>
@@ -187,7 +191,7 @@ function ActiveWorkout() {
<div className="muted small" style={{ marginBottom: 6 }}>{isSuperset ? t('Superset {0} / {1}', unitIdx + 1, units.length) : t('Exercise {0} / {1}', unitIdx + 1, units.length)}</div>
{isSuperset ? (
<div className="ss-card">
<div className="ss-hd">🔗 {t('Superset · do these back-to-back, rest after both')}</div>
<div className="ss-hd"><Icon name="link" />{t('Superset · do these back-to-back, rest after both')}</div>
{unit.map((idx, k) => <div key={idx} className="ss-ex">
{k > 0 && <div className="ss-amp">+</div>}
<ExerciseBlock entryIdx={idx} compact
@@ -197,24 +201,24 @@ function ActiveWorkout() {
) : (
<ExerciseBlock entryIdx={cur} onToggle={i => toggle(cur, i)} onField={(i, f, v) => setField(cur, i, f, v)} onBumpAll={(f, v) => bumpAll(cur, f, v)} onAddSet={() => addSet(cur)} onRemoveSet={() => removeSet(cur)} />
)}
</> : <div className="empty"><div className="ico">🎯</div>{t('Freestyle workout — add your first exercise.')}</div>}
</> : <div className="empty"><div className="ico"><Icon name="shuffle" /></div>{t('Freestyle workout — add your first exercise.')}</div>}
<div style={{ height: 12 }} />
<div className="row">
<button className="btn" disabled={unitIdx <= 0} onClick={() => update(s => { s.active.cur = units[unitIdx - 1][0] })}>‹ {t('Prev')}</button>
<button className="btn" disabled={unitIdx < 0 || unitIdx >= units.length - 1} onClick={() => update(s => { s.active.cur = units[unitIdx + 1][0] })}>{t('Next')} ›</button>
<Button icon="chevronLeft" disabled={unitIdx <= 0} onClick={() => update(s => { s.active.cur = units[unitIdx - 1][0] })}>{t('Prev')}</Button>
<Button trailingIcon="chevronRight" disabled={unitIdx < 0 || unitIdx >= units.length - 1} onClick={() => update(s => { s.active.cur = units[unitIdx + 1][0] })}>{t('Next')}</Button>
</div>
<div style={{ height: 10 }} />
<button className="btn" onClick={() => exercisePicker(ex => exConfigSheet(ex, null, cfg => update(s => {
<Button onClick={() => exercisePicker(ex => exConfigSheet(ex, null, cfg => update(s => {
s.active.entries.push({ id: ex.id, target: { ...cfg }, sets: buildSets(s, { ...cfg, id: ex.id }) })
s.active.cur = s.active.entries.length - 1
})))}>+ {t('Add exercise')}</button>
})))} icon="plus">{t('Add exercise')}</Button>
<div style={{ height: 10 }} />
{(() => {
const exDone = A.entries.filter(e => e.sets.length && e.sets.every(s => s.done)).length
const allDone = A.entries.length > 0 && exDone === A.entries.length
return <button className={allDone ? 'btn primary' : 'btn ghost dim'} onClick={finishWorkout}>
{allDone ? t('Finish workout 🏁') : t('Finish workout early · {0} exercises', exDone + '/' + A.entries.length)}
{allDone ? t('Finish workout') : t('Finish workout early · {0} exercises', exDone + '/' + A.entries.length)}
</button>
})()}
<div style={{ height: 40 }} />