diff --git a/frontend/src/lib/plan-share.js b/frontend/src/lib/plan-share.js index 7e41d1d..8f62630 100644 --- a/frontend/src/lib/plan-share.js +++ b/frontend/src/lib/plan-share.js @@ -45,6 +45,7 @@ function cleanEx(e) { if (e.repsMin != null) o.repsMin = e.repsMin if (e.repsMax != null) o.repsMax = e.repsMax if (e.sg) o.sg = e.sg + if (e.note) o.note = e.note return o } @@ -174,7 +175,8 @@ function routineHTML(r, unit) { const ex = EXIDX[e.id] const name = ex ? ex.n : t('Unknown exercise') const part = ex && ex.bp && ex.bp !== 'cardio' ? `${esc(ex.bp)}` : '' - return `
${esc(name)}${part}
${esc(scheme(e, unit))}
` + const note = e.note ? `
${esc(e.note)}
` : '' + return `
${esc(name)}${part}
${esc(scheme(e, unit))}
${note}
` }).join('') return u.length > 1 ? `
${esc(t('Superset'))}
${items}
` @@ -236,11 +238,13 @@ export function planPrintHTML(S, owner) { .r-count { font-size: 12px; color: #8a90a0; white-space: nowrap; } .ex-list { display: flex; flex-direction: column; } - .ex { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 6px 0; break-inside: avoid; page-break-inside: avoid; } + .ex { display: flex; flex-direction: column; padding: 6px 0; break-inside: avoid; page-break-inside: avoid; } .ex + .ex, .ss + .ex, .ex + .ss { border-top: 1px solid #f2f3f6; } + .ex-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; } .ex-n { text-transform: capitalize; font-weight: 500; } .ex-n .part { text-transform: capitalize; color: #9aa0ae; font-weight: 400; font-size: 12px; margin-left: 8px; } .ex-s { color: #3d424e; white-space: nowrap; font-variant-numeric: tabular-nums; } + .ex-note { color: #6a7080; font-size: 12px; margin-top: 2px; } .ex.empty, .none { color: #a2a8b6; } .ss { break-inside: avoid; page-break-inside: avoid; border-left: 3px solid #cfe08a; padding-left: 12px; margin: 4px 0; } diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.js index b726cb1..6a2492b 100644 --- a/frontend/src/locales/de.js +++ b/frontend/src/locales/de.js @@ -217,6 +217,7 @@ export default { 'Load starter plan (Push / Pull / Legs)': 'Starterplan laden (Push / Pull / Beine)', // --- routine edit --- 'Superset with exercise above': 'Supersatz mit der Übung darüber', + 'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'Notiz (optional) — Hinweise zur Belastung, z. B. „nur die Stange, dann pro Satz +1 Scheibe pro Seite“, was immer du dir merken willst', 'No exercises yet — add your first one.': 'Noch keine Übungen — füge deine erste hinzu.', '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?', diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.js index 99b88cc..cd3acd4 100644 --- a/frontend/src/locales/es.js +++ b/frontend/src/locales/es.js @@ -206,6 +206,7 @@ export default { 'Create one or load the starter plan.': 'Crea una o carga el plan inicial.', 'Load starter plan (Push / Pull / Legs)': 'Cargar plan inicial (Push / Pull / Piernas)', 'Superset with exercise above': 'Superserie con el ejercicio de arriba', + 'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'Nota (opcional) — indicaciones de carga, ej. «solo barra y +1 disco por lado en cada serie», lo que quieras recordar', 'No exercises yet — add your first one.': 'Aún no hay ejercicios — añade el primero.', '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?', diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.js index 1324543..b50544a 100644 --- a/frontend/src/locales/fr.js +++ b/frontend/src/locales/fr.js @@ -206,6 +206,7 @@ export default { 'Create one or load the starter plan.': 'Crées-en une ou charge le plan de départ.', '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", + 'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'Note (optionnelle) — indications de charge, ex. « barre seule puis +1 disque par côté à chaque série », tout ce que tu veux te rappeler', 'No exercises yet — add your first one.': 'Aucun exercice — ajoute le premier.', '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 ?', diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.js index 119d3e9..2b3c21e 100644 --- a/frontend/src/locales/hi.js +++ b/frontend/src/locales/hi.js @@ -206,6 +206,7 @@ export default { 'Create one or load the starter plan.': 'एक बनाएँ या स्टार्टर प्लान लोड करें।', 'Load starter plan (Push / Pull / Legs)': 'स्टार्टर प्लान लोड करें (पुश / पुल / लेग्स)', 'Superset with exercise above': 'ऊपर वाले व्यायाम के साथ सुपरसेट', + 'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'नोट (वैकल्पिक) — लोडिंग संकेत, जैसे "सिर्फ़ खाली बार, फिर हर सेट में हर तरफ़ +1 प्लेट", जो भी याद रखना चाहें', 'No exercises yet — add your first one.': 'अभी कोई व्यायाम नहीं — पहला जोड़ें।', 'Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.': 'किसी व्यायाम पर लिंक बटन दबाएँ ताकि वह ऊपर वाले के साथ सुपरसेट बने — आप उन्हें लगातार करेंगे।', 'Delete routine?': 'रूटीन हटाएँ?', diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.js index 2aeed2e..6d393aa 100644 --- a/frontend/src/locales/it.js +++ b/frontend/src/locales/it.js @@ -206,6 +206,7 @@ export default { 'Create one or load the starter plan.': 'Creane una o carica il piano iniziale.', 'Load starter plan (Push / Pull / Legs)': 'Carica piano iniziale (Push / Pull / Gambe)', 'Superset with exercise above': "Superset con l'esercizio sopra", + 'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'Nota (facoltativa) — indicazioni di carico, es. "solo bilanciere poi +1 disco per lato a ogni serie", qualsiasi cosa tu voglia ricordare', 'No exercises yet — add your first one.': 'Ancora nessun esercizio — aggiungi il primo.', '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?', diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.js index 7a3ff84..d460c56 100644 --- a/frontend/src/locales/ko.js +++ b/frontend/src/locales/ko.js @@ -206,6 +206,7 @@ export default { 'Create one or load the starter plan.': '루틴을 만들거나 스타터 계획을 불러오세요.', 'Load starter plan (Push / Pull / Legs)': '스타터 계획 불러오기 (푸시 / 풀 / 레그)', 'Superset with exercise above': '위 운동과 슈퍼세트', + 'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': '메모(선택 사항) — 중량 안내, 예: "빈 바로 시작 후 세트마다 양쪽 +1플레이트", 기억하고 싶은 모든 것', 'No exercises yet — add your first one.': '아직 운동이 없어요 — 첫 운동을 추가하세요.', 'Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.': '운동의 연결 버튼을 탭하면 위 운동과 슈퍼세트가 됩니다 — 연달아 수행하게 돼요.', 'Delete routine?': '루틴을 삭제할까요?', diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.js index 27634f7..ed2b54e 100644 --- a/frontend/src/locales/pl.js +++ b/frontend/src/locales/pl.js @@ -206,6 +206,7 @@ export default { 'Create one or load the starter plan.': 'Utwórz plan albo wczytaj startowy.', 'Load starter plan (Push / Pull / Legs)': 'Wczytaj plan startowy (Push / Pull / Nogi)', 'Superset with exercise above': 'Superseria z ćwiczeniem powyżej', + 'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'Notatka (opcjonalnie) — wskazówki dot. obciążenia, np. "sama sztanga, potem +1 talerz na stronę w każdej serii", cokolwiek chcesz zapamiętać', 'No exercises yet — add your first one.': 'Brak ćwiczeń — dodaj pierwsze.', '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?', diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.js index c46e111..f9ec41d 100644 --- a/frontend/src/locales/pt.js +++ b/frontend/src/locales/pt.js @@ -206,6 +206,7 @@ export default { 'Create one or load the starter plan.': 'Cria uma ou carrega o plano inicial.', 'Load starter plan (Push / Pull / Legs)': 'Carregar plano inicial (Push / Pull / Pernas)', 'Superset with exercise above': 'Supersérie com o exercício acima', + 'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'Nota (opcional) — dicas de carga, ex. "só a barra, depois +1 anilha por lado a cada série", o que quiser lembrar', 'No exercises yet — add your first one.': 'Ainda sem exercícios — adiciona o primeiro.', '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?', diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.js index 720dacd..f188d64 100644 --- a/frontend/src/locales/ru.js +++ b/frontend/src/locales/ru.js @@ -206,6 +206,7 @@ export default { 'Create one or load the starter plan.': 'Создай программу или загрузи стартовый план.', 'Load starter plan (Push / Pull / Legs)': 'Загрузить стартовый план (Push / Pull / Ноги)', 'Superset with exercise above': 'Суперсет с упражнением выше', + 'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'Заметка (необязательно) — подсказки по нагрузке, напр. «только гриф, затем +1 блин на сторону каждый подход», всё, что стоит запомнить', 'No exercises yet — add your first one.': 'Упражнений пока нет — добавь первое.', 'Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Нажми кнопку связи у упражнения, чтобы объединить его в суперсет с тем, что выше — сделаешь их подряд.', 'Delete routine?': 'Удалить программу?', diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.js index 9539877..a912a6d 100644 --- a/frontend/src/locales/tr.js +++ b/frontend/src/locales/tr.js @@ -206,6 +206,7 @@ export default { 'Create one or load the starter plan.': 'Bir tane oluştur ya da başlangıç planını yükle.', 'Load starter plan (Push / Pull / Legs)': 'Başlangıç planını yükle (Push / Pull / Bacak)', 'Superset with exercise above': 'Üstteki egzersizle süperset', + 'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'Not (isteğe bağlı) — yükleme ipuçları, örn. "sadece bar, sonra her sette +1 disk/taraf", aklında tutmak istediğin her şey', 'No exercises yet — add your first one.': 'Henüz egzersiz yok — ilkini ekle.', '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?', diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.js index 3ec38c3..6a3af0a 100644 --- a/frontend/src/locales/zh.js +++ b/frontend/src/locales/zh.js @@ -206,6 +206,7 @@ export default { 'Create one or load the starter plan.': '创建一个或加载入门计划。', 'Load starter plan (Push / Pull / Legs)': '加载入门计划(推 / 拉 / 腿)', 'Superset with exercise above': '与上面的动作组成超级组', + 'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': '备注(可选)— 加重提示,例如"空杠开始,之后每组每侧+1片",任何你想记住的内容', 'No exercises yet — add your first one.': '还没有动作——添加第一个吧。', 'Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.': '点击动作上的链接按钮,可与上面的动作组成超级组——你将连续完成它们。', 'Delete routine?': '删除训练日?', diff --git a/frontend/src/sheets.jsx b/frontend/src/sheets.jsx index d0f6d36..ff0b28a 100644 --- a/frontend/src/sheets.jsx +++ b/frontend/src/sheets.jsx @@ -516,14 +516,19 @@ function ExConfig({ ex, existing, onSave, onDelete, close, routine, initial }) { // rather than carrying a flag nothing downstream can read. const flags = {} if (bw !== isBodyweightEq(ex.id)) flags.bodyweight = bw - if (cardio) onSave({ sets, min: Math.max(1, Math.round(c.min) || 20), speed: Math.max(0, c.speed || 8) }) - else if (mode === 'time') onSave({ sets, mode: 'time', sec: Math.max(1, Math.round(c.sec) || 45), weight: Math.max(0, c.weight || 0), ...flags, ...prog }) + // Free text, e.g. a pyramid's per-set loading ("bar only, +1 plate/side each set") — the + // sets/reps/weight fields are one flat target and have no room for that on their own. + // Mode-independent, so it is spread in below rather than folded into `flags`. + const note = (c.note || '').trim().slice(0, 500) + const withNote = note ? { note } : {} + if (cardio) onSave({ sets, min: Math.max(1, Math.round(c.min) || 20), speed: Math.max(0, c.speed || 8), ...withNote }) + else if (mode === 'time') onSave({ sets, mode: 'time', sec: Math.max(1, Math.round(c.sec) || 45), weight: Math.max(0, c.weight || 0), ...flags, ...prog, ...withNote }) else { // A unilateral target is stored even: the split has to divide, and a typed 15 would // otherwise plan seven reps on one side and eight on the other, every session. const typed = Math.max(1, Math.round(c.reps) || 10) const reps = perSide ? Math.ceil(typed / 2) * 2 : typed - const out = { sets, mode: 'reps', reps, weight: Math.max(0, c.weight || 0), ...flags, ...(perSide ? { side: true } : {}), ...prog } + const out = { sets, mode: 'reps', reps, weight: Math.max(0, c.weight || 0), ...flags, ...(perSide ? { side: true } : {}), ...prog, ...withNote } if (policyFor({ ...c, id: ex.id }, routine, 'reps') === 'double') out.repsMin = Math.min(reps, Math.max(1, Math.round(c.repsMin) || Math.max(1, reps - 2))) // A ceiling below the working reps would tell you to add a set on day one. if (bw && !(out.weight > 0) && c.repsMax > 0) out.repsMax = Math.max(reps, Math.round(c.repsMax)) @@ -598,6 +603,9 @@ function ExConfig({ ex, existing, onSave, onDelete, close, routine, initial }) { : t('Reps climb by one whenever every set was clean. Set a ceiling to add sets instead of reps forever.')} } +