+ {exercises.length > shown && <>>}
+ >}
+ >
+}
diff --git a/frontend/src/index.css b/frontend/src/index.css
index 9963d97..cae7c55 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -438,6 +438,7 @@ h4.sec{
}
.chip:active{background:var(--surface-2)}
.chip.on{background:var(--acc);color:var(--on-acc);font-weight:500}
+.chip.on .dim{color:color-mix(in srgb,var(--on-acc) 62%,transparent)}
/* =========================== CONTROLS ==================================== */
diff --git a/frontend/src/lib/pt-br-locale.test.js b/frontend/src/lib/pt-br-locale.test.js
index 2e75329..53a938a 100644
--- a/frontend/src/lib/pt-br-locale.test.js
+++ b/frontend/src/lib/pt-br-locale.test.js
@@ -27,7 +27,7 @@ describe('Brazilian Portuguese locale', () => {
.sort(byCodeUnit)
const fingerprint = createHash('sha256').update(JSON.stringify(inherited)).digest('hex')
- expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(603)
+ expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(610)
expect(inherited).toHaveLength(565)
// If this fails, review the changed keys and wording before accepting a new hash. From
// frontend/: node scripts/pt-br-inheritance-fingerprint.mjs --list
diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.js
index 2874b21..3e8cb9f 100644
--- a/frontend/src/locales/de.js
+++ b/frontend/src/locales/de.js
@@ -24,6 +24,13 @@ export default {
'Resume': 'Weiter',
'Stats': 'Statistik',
'Exercises': 'Übungen',
+ 'By muscle': 'Nach Muskel',
+ 'Explore muscles': 'Muskeln entdecken',
+ 'Choose a muscle to see exercises that train it.': 'Wähle einen Muskel, um Übungen zu sehen, die ihn trainieren.',
+ 'Exercises for {0}': 'Übungen für {0}',
+ 'Clear selection': 'Auswahl aufheben',
+ 'Primary target': 'Hauptmuskel',
+ 'Also trains': 'Trainiert auch',
'History': 'Verlauf',
'Settings': 'Einstellungen',
'Freestyle': 'Freies Training',
diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.js
index 0c4f8f0..16d3352 100644
--- a/frontend/src/locales/es.js
+++ b/frontend/src/locales/es.js
@@ -23,6 +23,13 @@ export default {
'Resume': 'Seguir',
'Stats': 'Progreso',
'Exercises': 'Ejercicios',
+ 'By muscle': 'Por músculo',
+ 'Explore muscles': 'Explorar músculos',
+ 'Choose a muscle to see exercises that train it.': 'Elige un músculo para ver los ejercicios que lo entrenan.',
+ 'Exercises for {0}': 'Ejercicios para {0}',
+ 'Clear selection': 'Borrar selección',
+ 'Primary target': 'Músculo principal',
+ 'Also trains': 'También trabaja',
'History': 'Historial',
'Settings': 'Ajustes',
'Freestyle': 'Libre',
diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.js
index 49dd9db..2e6b4f3 100644
--- a/frontend/src/locales/fr.js
+++ b/frontend/src/locales/fr.js
@@ -23,6 +23,13 @@ export default {
'Resume': 'Reprendre',
'Stats': 'Stats',
'Exercises': 'Exercices',
+ 'By muscle': 'Par muscle',
+ 'Explore muscles': 'Explorer les muscles',
+ 'Choose a muscle to see exercises that train it.': 'Choisissez un muscle pour voir les exercices qui le sollicitent.',
+ 'Exercises for {0}': 'Exercices pour {0}',
+ 'Clear selection': 'Effacer la sélection',
+ 'Primary target': 'Cible principale',
+ 'Also trains': 'Sollicite aussi',
'History': 'Historique',
'Settings': 'Réglages',
'Freestyle': 'Libre',
diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.js
index ea3cc2d..7207eec 100644
--- a/frontend/src/locales/hi.js
+++ b/frontend/src/locales/hi.js
@@ -23,6 +23,13 @@ export default {
'Resume': 'जारी रखें',
'Stats': 'आँकड़े',
'Exercises': 'व्यायाम',
+ 'By muscle': 'मांसपेशी से',
+ 'Explore muscles': 'मांसपेशियाँ खोजें',
+ 'Choose a muscle to see exercises that train it.': 'उस मांसपेशी को प्रशिक्षित करने वाले व्यायाम देखने के लिए एक मांसपेशी चुनें।',
+ 'Exercises for {0}': '{0} के लिए व्यायाम',
+ 'Clear selection': 'चयन साफ़ करें',
+ 'Primary target': 'मुख्य लक्ष्य',
+ 'Also trains': 'यह भी प्रशिक्षित करता है',
'History': 'इतिहास',
'Settings': 'सेटिंग्स',
'Freestyle': 'फ्रीस्टाइल',
diff --git a/frontend/src/locales/hu.js b/frontend/src/locales/hu.js
index 7db3376..ed08bfe 100644
--- a/frontend/src/locales/hu.js
+++ b/frontend/src/locales/hu.js
@@ -25,6 +25,13 @@ export default {
'Resume': 'Folytatás',
'Stats': 'Statisztika',
'Exercises': 'Gyakorlatok',
+ 'By muscle': 'Izom szerint',
+ 'Explore muscles': 'Izmok felfedezése',
+ 'Choose a muscle to see exercises that train it.': 'Válassz izmot, hogy lásd a gyakorlatokat, amelyek edzik.',
+ 'Exercises for {0}': '{0} gyakorlatai',
+ 'Clear selection': 'Kijelölés törlése',
+ 'Primary target': 'Elsődleges célizom',
+ 'Also trains': 'Emellett edzi',
'History': 'Előzmények',
'Settings': 'Beállítások',
'Freestyle': 'Szabad edzés',
diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.js
index ea66bc5..c1f25aa 100644
--- a/frontend/src/locales/it.js
+++ b/frontend/src/locales/it.js
@@ -23,6 +23,13 @@ export default {
'Resume': 'Riprendi',
'Stats': 'Statistiche',
'Exercises': 'Esercizi',
+ 'By muscle': 'Per muscolo',
+ 'Explore muscles': 'Esplora i muscoli',
+ 'Choose a muscle to see exercises that train it.': 'Scegli un muscolo per vedere gli esercizi che lo allenano.',
+ 'Exercises for {0}': 'Esercizi per {0}',
+ 'Clear selection': 'Cancella selezione',
+ 'Primary target': 'Muscolo principale',
+ 'Also trains': 'Allena anche',
'History': 'Cronologia',
'Settings': 'Impostazioni',
'Freestyle': 'Libero',
diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.js
index a1834b0..cdacbea 100644
--- a/frontend/src/locales/ko.js
+++ b/frontend/src/locales/ko.js
@@ -23,6 +23,13 @@ export default {
'Resume': '이어하기',
'Stats': '통계',
'Exercises': '운동',
+ 'By muscle': '근육별',
+ 'Explore muscles': '근육 탐색',
+ 'Choose a muscle to see exercises that train it.': '운동하는 부위를 선택해 해당 근육을 훈련하는 운동을 확인하세요.',
+ 'Exercises for {0}': '{0} 운동',
+ 'Clear selection': '선택 지우기',
+ 'Primary target': '주요 목표',
+ 'Also trains': '함께 훈련',
'History': '기록',
'Settings': '설정',
'Freestyle': '자유 운동',
diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.js
index 1fd55c0..20d0dc7 100644
--- a/frontend/src/locales/pl.js
+++ b/frontend/src/locales/pl.js
@@ -23,6 +23,13 @@ export default {
'Resume': 'Wznów',
'Stats': 'Statystyki',
'Exercises': 'Ćwiczenia',
+ 'By muscle': 'Według mięśnia',
+ 'Explore muscles': 'Poznaj mięśnie',
+ 'Choose a muscle to see exercises that train it.': 'Wybierz mięsień, aby zobaczyć ćwiczenia, które go angażują.',
+ 'Exercises for {0}': 'Ćwiczenia na {0}',
+ 'Clear selection': 'Wyczyść wybór',
+ 'Primary target': 'Główny cel',
+ 'Also trains': 'Angażuje również',
'History': 'Historia',
'Settings': 'Ustawienia',
'Freestyle': 'Dowolny',
diff --git a/frontend/src/locales/pt-BR.js b/frontend/src/locales/pt-BR.js
index a6060bd..84e058f 100644
--- a/frontend/src/locales/pt-BR.js
+++ b/frontend/src/locales/pt-BR.js
@@ -627,6 +627,15 @@ export const PT_BR_OVERRIDES = {
'Point the camera at the QR code': 'Aponte a câmera para o código QR',
'Camera is not available here — import a photo or type the code instead.': 'A câmera não está disponível aqui — importe uma foto ou digite o código.',
'Camera access was denied — allow it in your browser and try again.': 'O acesso à câmera foi negado — permita-o no navegador e tente de novo.',
+
+// --- muscle explorer ---
+ 'By muscle': 'Por músculo',
+ 'Explore muscles': 'Explorar músculos',
+ 'Choose a muscle to see exercises that train it.': 'Escolha um músculo para ver os exercícios que o treinam.',
+ 'Exercises for {0}': 'Exercícios para {0}',
+ 'Clear selection': 'Limpar seleção',
+ 'Primary target': 'Músculo principal',
+ 'Also trains': 'Também trabalha',
}
export default { ...pt, ...PT_BR_OVERRIDES }
diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.js
index 7336910..a63f558 100644
--- a/frontend/src/locales/pt.js
+++ b/frontend/src/locales/pt.js
@@ -23,6 +23,13 @@ export default {
'Resume': 'Retomar',
'Stats': 'Estatísticas',
'Exercises': 'Exercícios',
+ 'By muscle': 'Por músculo',
+ 'Explore muscles': 'Explorar músculos',
+ 'Choose a muscle to see exercises that train it.': 'Escolha um músculo para ver os exercícios que o treinam.',
+ 'Exercises for {0}': 'Exercícios para {0}',
+ 'Clear selection': 'Limpar seleção',
+ 'Primary target': 'Alvo principal',
+ 'Also trains': 'Também trabalha',
'History': 'Histórico',
'Settings': 'Definições',
'Freestyle': 'Livre',
diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.js
index f296cae..aa9de8c 100644
--- a/frontend/src/locales/ru.js
+++ b/frontend/src/locales/ru.js
@@ -23,6 +23,13 @@ export default {
'Resume': 'Продолжить',
'Stats': 'Статистика',
'Exercises': 'Упражнения',
+ 'By muscle': 'По мышцам',
+ 'Explore muscles': 'Изучить мышцы',
+ 'Choose a muscle to see exercises that train it.': 'Выберите мышцу, чтобы увидеть упражнения, которые её тренируют.',
+ 'Exercises for {0}': 'Упражнения для {0}',
+ 'Clear selection': 'Очистить выбор',
+ 'Primary target': 'Основная мышца',
+ 'Also trains': 'Также тренирует',
'History': 'История',
'Settings': 'Настройки',
'Freestyle': 'Свободная',
diff --git a/frontend/src/locales/th.js b/frontend/src/locales/th.js
index 7ad3a61..2ef2469 100644
--- a/frontend/src/locales/th.js
+++ b/frontend/src/locales/th.js
@@ -25,6 +25,13 @@ export default {
'Resume': 'เล่นต่อ',
'Stats': 'สถิติ',
'Exercises': 'ท่าออกกำลังกาย',
+ 'By muscle': 'ตามกล้ามเนื้อ',
+ 'Explore muscles': 'สำรวจกล้ามเนื้อ',
+ 'Choose a muscle to see exercises that train it.': 'เลือกกล้ามเนื้อเพื่อดูท่าออกกำลังกายที่ฝึกกล้ามเนื้อนั้น',
+ 'Exercises for {0}': 'ท่าออกกำลังกายสำหรับ {0}',
+ 'Clear selection': 'ล้างการเลือก',
+ 'Primary target': 'กล้ามเนื้อหลัก',
+ 'Also trains': 'ฝึกกล้ามเนื้อนี้ด้วย',
'History': 'ประวัติ',
'Settings': 'ตั้งค่า',
'Freestyle': 'ฟรีสไตล์',
diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.js
index 225edf1..eb97cfe 100644
--- a/frontend/src/locales/tr.js
+++ b/frontend/src/locales/tr.js
@@ -23,6 +23,13 @@ export default {
'Resume': 'Devam et',
'Stats': 'İstatistik',
'Exercises': 'Egzersizler',
+ 'By muscle': 'Kasa göre',
+ 'Explore muscles': 'Kasları keşfet',
+ 'Choose a muscle to see exercises that train it.': 'Çalıştıran egzersizleri görmek için bir kas seçin.',
+ 'Exercises for {0}': '{0} için egzersizler',
+ 'Clear selection': 'Seçimi temizle',
+ 'Primary target': 'Ana hedef',
+ 'Also trains': 'Ayrıca çalıştırır',
'History': 'Geçmiş',
'Settings': 'Ayarlar',
'Freestyle': 'Serbest',
diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.js
index 4571116..084a7cd 100644
--- a/frontend/src/locales/zh.js
+++ b/frontend/src/locales/zh.js
@@ -23,6 +23,13 @@ export default {
'Resume': '继续',
'Stats': '统计',
'Exercises': '动作库',
+ 'By muscle': '按肌肉',
+ 'Explore muscles': '探索肌肉',
+ 'Choose a muscle to see exercises that train it.': '选择一块肌肉以查看训练它的动作。',
+ 'Exercises for {0}': '{0} 训练动作',
+ 'Clear selection': '清除选择',
+ 'Primary target': '主要目标',
+ 'Also trains': '同时训练',
'History': '历史',
'Settings': '设置',
'Freestyle': '自由训练',
diff --git a/frontend/src/sheets.jsx b/frontend/src/sheets.jsx
index 8ccba30..fa846be 100644
--- a/frontend/src/sheets.jsx
+++ b/frontend/src/sheets.jsx
@@ -16,6 +16,7 @@ import Icon from './components/Icon.jsx'
import { Button, Slider, Switch, Segmented, SelectRow, Row, TextField, MultiSelectRow } from './components/ui.jsx'
import { glyphOf, GLYPH_GROUPS, DEFAULT_GLYPH } from './lib/glyphs.js'
import BodyMap from './components/BodyMap.jsx'
+import MuscleExplorer from './components/MuscleExplorer.jsx'
import { exerciseMuscleSnapshot, loadOfWorkouts, MUSCLES, MUSCLE_NAME, normalizeMuscleGroups, hasExplicitMuscleMetadata } from './lib/muscles.js'
import { parseImport, mergeImport } from './lib/import-csv.js'
import { importHevyData, HevyApiError, HEVY_DEV_SETTINGS, mergeHevyRoutines } from './lib/import-hevy.js'
@@ -712,6 +713,7 @@ function ExercisePicker({ onPick, close }) {
const [eq, setEq] = useState('') // '' = any equipment
const [showAll, setShowAll] = useState(false)
const [shown, setShown] = useState(50)
+ const [byMuscle, setByMuscle] = useState(false)
const searchRef = useRef(null)
const bpStrip = useRef(null), eqStrip = useRef(null)
const onSearchFocus = useSheetKeyboard(searchRef)
@@ -729,8 +731,17 @@ function ExercisePicker({ onPick, close }) {
const chosenCount = Object.keys(usage).length
useRevealActiveChip(bpStrip, bp)
useRevealActiveChip(eqStrip, eqOn)
+ if (byMuscle) return <>
+
{t('Add exercise')}
+
+
+
+ >
+
return <>
-
{t('Add exercise')}
+
{t('Add exercise')}
+
+
{/* .picker-search is what index.css keys the keyboard-aware sheet layout on: the sheet
lifts above the keys and the search stays put while the list scrolls under it. */}
diff --git a/frontend/src/views/Library.jsx b/frontend/src/views/Library.jsx
index 5822a78..b591abb 100644
--- a/frontend/src/views/Library.jsx
+++ b/frontend/src/views/Library.jsx
@@ -1,4 +1,5 @@
import { useRef, useState } from 'react'
+import { useNavigate } from 'react-router-dom'
import { useStore } from '../store/useStore.js'
import { EXDB, BODYPARTS, allExercises, equipmentOf, matchExercise } from '../lib/exercises.js'
import { activeProfile, exAvailable } from '../lib/equipment.js'
@@ -12,6 +13,7 @@ import { Button } from '../components/ui.jsx'
import { tappable, useRevealActiveChip } from '../lib/use-sheet-keyboard.js'
export default function Library() {
+ const nav = useNavigate()
const S = useStore(s => s.S)
const [q, setQ] = useState('')
const [bp, setBp] = useState('')
@@ -30,7 +32,9 @@ export default function Library() {
useRevealActiveChip(eqStrip, eqOn)
return <>
-
{t('Exercises')}
{t('{0} exercises with animations', EXDB.length)}
+
{t('Exercises')}
{t('{0} exercises with animations', EXDB.length)}
+
+
{ setQ(e.target.value); setShown(40) }} />
{profile &&
diff --git a/frontend/src/views/Muscles.jsx b/frontend/src/views/Muscles.jsx
new file mode 100644
index 0000000..330a489
--- /dev/null
+++ b/frontend/src/views/Muscles.jsx
@@ -0,0 +1,17 @@
+import { useNavigate } from 'react-router-dom'
+import { t } from '../lib/i18n.js'
+import MuscleExplorer from '../components/MuscleExplorer.jsx'
+import { exerciseDetailSheet, addToRoutineSheet } from '../sheets.jsx'
+import Icon from '../components/Icon.jsx'
+
+export default function Muscles() {
+ const nav = useNavigate()
+ return <>
+
+
{t('Explore muscles')}
{t('Choose a muscle to see exercises that train it.')}