Skip to content

Offline gym log for Android. No account, no ads, no internet.

Routines row on home, optional week card and today's card once done

InlitX9bebb112886f
diff --git a/lib/l10n/app_ar.arb b/lib/l10n/app_ar.arb
index 2eeebc9..b1a2f6d 100644
--- a/lib/l10n/app_ar.arb
+++ b/lib/l10n/app_ar.arb
@@ -1111,6 +1111,13 @@
"cardioFocus": "كارديو",
"cardioFocusHint": "جري أو دراجة أو تجديف أو حبل، بالمسافة والوقت",
"homeRecommended": "المقترحات في الرئيسية",
+ "homeRoutines": "الروتينات في الرئيسية",
+ "homeRoutinesHint": "روتيناتك، آخر ما أنجزته أولًا. اضغط على أحدها لتبدأه.",
+ "homeWeekStats": "هذا الأسبوع في الرئيسية",
+ "homeWeekStatsHint": "الحجم والمجموعات والأرقام القياسية لهذا الأسبوع.",
+ "routineDoneToday": "انتهيت لليوم · عمل رائع",
+ "trainAgain": "تمرّن مرة أخرى",
+ "lastDoneAgo": "{n, plural, =0{أُنجز اليوم} =1{أُنجز أمس} other{قبل {n} يوم}}",
"archivedFilter": "المؤرشفة",
"archiveExercise": "أرشفة التمرين",
"restoreExercise": "استعادة",
diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb
index b03815a..8eeaca0 100644
--- a/lib/l10n/app_de.arb
+++ b/lib/l10n/app_de.arb
@@ -992,6 +992,13 @@
"cardioFocus": "Cardio",
"cardioFocusHint": "Laufen, Rad, Rudern oder Seilspringen, nach Strecke und Zeit",
"homeRecommended": "Empfehlungen auf der Startseite",
+ "homeRoutines": "Routinen auf der Startseite",
+ "homeRoutinesHint": "Deine Routinen, die zuletzt gemachte zuerst. Tippe auf eine, um sie zu starten.",
+ "homeWeekStats": "Diese Woche auf der Startseite",
+ "homeWeekStatsHint": "Volumen, Sätze und PRs der Woche.",
+ "routineDoneToday": "Für heute erledigt · stark",
+ "trainAgain": "Nochmal trainieren",
+ "lastDoneAgo": "{n, plural, =0{Heute gemacht} =1{Gestern gemacht} other{Vor {n} Tagen}}",
"archivedFilter": "Archiviert",
"archiveExercise": "Übung archivieren",
"restoreExercise": "Wiederherstellen",
diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb
index c0ae70d..40464ab 100644
--- a/lib/l10n/app_en.arb
+++ b/lib/l10n/app_en.arb
@@ -1010,6 +1010,14 @@
"cardioFocus": "Cardio",
"cardioFocusHint": "Run, bike, row or skip, by distance and time",
"homeRecommended": "Recommended on home",
+ "homeRoutines": "Routines on home",
+ "homeRoutinesHint": "Your routines, last done first. Tap one to start it.",
+ "homeWeekStats": "This week on home",
+ "homeWeekStatsHint": "Volume, sets and PRs of the week.",
+ "routineDoneToday": "Done for today · nice work",
+ "trainAgain": "Train again",
+ "lastDoneAgo": "{n, plural, =0{Done today} =1{Done yesterday} other{{n} days ago}}",
+ "@lastDoneAgo": {"placeholders": {"n": {"type": "int"}}},
"archivedFilter": "Archived",
"archiveExercise": "Archive exercise",
"restoreExercise": "Restore",
diff --git a/lib/l10n/app_es.arb b/lib/l10n/app_es.arb
index fdaa059..3721199 100644
--- a/lib/l10n/app_es.arb
+++ b/lib/l10n/app_es.arb
@@ -936,6 +936,13 @@
"cardioFocus": "Cardio",
"cardioFocusHint": "Correr, bici, remo o comba, por distancia y tiempo",
"homeRecommended": "Recomendados en inicio",
+ "homeRoutines": "Rutinas en inicio",
+ "homeRoutinesHint": "Tus rutinas, la última que hiciste primero. Toca una para empezarla.",
+ "homeWeekStats": "Esta semana en inicio",
+ "homeWeekStatsHint": "Volumen, series y récords de la semana.",
+ "routineDoneToday": "Hecha por hoy · buen trabajo",
+ "trainAgain": "Entrenar otra vez",
+ "lastDoneAgo": "{n, plural, =0{Hecha hoy} =1{Hecha ayer} other{Hace {n} días}}",
"archivedFilter": "Archivados",
"archiveExercise": "Archivar ejercicio",
"restoreExercise": "Restaurar",
diff --git a/lib/l10n/app_fa.arb b/lib/l10n/app_fa.arb
index d5888aa..02c27d6 100644
--- a/lib/l10n/app_fa.arb
+++ b/lib/l10n/app_fa.arb
@@ -1468,6 +1468,13 @@
"cardioFocus": "کاردیو",
"cardioFocusHint": "دویدن، دوچرخه، روئینگ یا طناب، بر اساس مسافت و زمان",
"homeRecommended": "پیشنهادی در خانه",
+ "homeRoutines": "روتین‌ها در خانه",
+ "homeRoutinesHint": "روتین‌هایت، آخرین انجام‌شده اول. روی یکی بزن تا شروع شود.",
+ "homeWeekStats": "این هفته در خانه",
+ "homeWeekStatsHint": "حجم، ست‌ها و رکوردهای هفته.",
+ "routineDoneToday": "برای امروز تمام شد · عالی بود",
+ "trainAgain": "دوباره تمرین کن",
+ "lastDoneAgo": "{n, plural, =0{امروز انجام شد} =1{دیروز انجام شد} other{{n} روز پیش}}",
"archivedFilter": "بایگانی",
"archiveExercise": "بایگانی حرکت",
"restoreExercise": "بازگردانی",
diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb
index 03043b1..a777570 100644
--- a/lib/l10n/app_fr.arb
+++ b/lib/l10n/app_fr.arb
@@ -1111,6 +1111,13 @@
"cardioFocus": "Cardio",
"cardioFocusHint": "Course, vélo, rameur ou corde, en distance et en temps",
"homeRecommended": "Recommandations sur l’accueil",
+ "homeRoutines": "Routines sur l’accueil",
+ "homeRoutinesHint": "Tes routines, la dernière faite en premier. Touche-en une pour la lancer.",
+ "homeWeekStats": "Cette semaine sur l’accueil",
+ "homeWeekStatsHint": "Volume, séries et records de la semaine.",
+ "routineDoneToday": "Fini pour aujourd’hui · bien joué",
+ "trainAgain": "S’entraîner encore",
+ "lastDoneAgo": "{n, plural, =0{Faite aujourd’hui} =1{Faite hier} other{Il y a {n} jours}}",
"archivedFilter": "Archivés",
"archiveExercise": "Archiver l’exercice",
"restoreExercise": "Restaurer",
diff --git a/lib/l10n/app_it.arb b/lib/l10n/app_it.arb
index 7a2d90c..9f2607d 100644
--- a/lib/l10n/app_it.arb
+++ b/lib/l10n/app_it.arb
@@ -972,6 +972,13 @@
"cardioFocus": "Cardio",
"cardioFocusHint": "Corsa, bici, vogatore o corda, per distanza e tempo",
"homeRecommended": "Consigliati nella home",
+ "homeRoutines": "Routine nella home",
+ "homeRoutinesHint": "Le tue routine, l’ultima fatta per prima. Toccane una per iniziarla.",
+ "homeWeekStats": "Questa settimana nella home",
+ "homeWeekStatsHint": "Volume, serie e record della settimana.",
+ "routineDoneToday": "Fatto per oggi · ottimo lavoro",
+ "trainAgain": "Allenati ancora",
+ "lastDoneAgo": "{n, plural, =0{Fatta oggi} =1{Fatta ieri} other{{n} giorni fa}}",
"archivedFilter": "Archiviati",
"archiveExercise": "Archivia esercizio",
"restoreExercise": "Ripristina",
diff --git a/lib/l10n/app_ja.arb b/lib/l10n/app_ja.arb
index 517b101..3ae0af4 100644
--- a/lib/l10n/app_ja.arb
+++ b/lib/l10n/app_ja.arb
@@ -1111,6 +1111,13 @@
"cardioFocus": "有酸素運動",
"cardioFocusHint": "ラン、バイク、ローイング、縄跳びを距離と時間で",
"homeRecommended": "ホームのおすすめ",
+ "homeRoutines": "ホームのルーティン",
+ "homeRoutinesHint": "最近やった順に表示。タップで開始します。",
+ "homeWeekStats": "ホームの今週",
+ "homeWeekStatsHint": "今週のボリューム・セット・記録。",
+ "routineDoneToday": "今日は完了 · お疲れさま",
+ "trainAgain": "もう一度トレーニング",
+ "lastDoneAgo": "{n, plural, =0{今日実施} =1{昨日実施} other{{n}日前}}",
"archivedFilter": "アーカイブ",
"archiveExercise": "種目をアーカイブ",
"restoreExercise": "元に戻す",
diff --git a/lib/l10n/app_ko.arb b/lib/l10n/app_ko.arb
index 0d39a9e..8024410 100644
--- a/lib/l10n/app_ko.arb
+++ b/lib/l10n/app_ko.arb
@@ -1111,6 +1111,13 @@
"cardioFocus": "유산소",
"cardioFocusHint": "달리기, 자전거, 로잉, 줄넘기를 거리와 시간으로",
"homeRecommended": "홈 추천",
+ "homeRoutines": "홈의 루틴",
+ "homeRoutinesHint": "최근에 한 루틴부터 보여줘요. 탭하면 시작해요.",
+ "homeWeekStats": "홈의 이번 주",
+ "homeWeekStatsHint": "이번 주 볼륨, 세트, 기록.",
+ "routineDoneToday": "오늘 완료 · 수고했어요",
+ "trainAgain": "다시 운동하기",
+ "lastDoneAgo": "{n, plural, =0{오늘 완료} =1{어제 완료} other{{n}일 전}}",
"archivedFilter": "보관됨",
"archiveExercise": "운동 보관",
"restoreExercise": "복원",
diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart
index 37b6fff..235da65 100644
--- a/lib/l10n/app_localizations.dart
+++ b/lib/l10n/app_localizations.dart
@@ -5206,6 +5206,48 @@ abstract class AppLocalizations {
/// **'Recommended on home'**
String get homeRecommended;
+ /// No description provided for @homeRoutines.
+ ///
+ /// In en, this message translates to:
+ /// **'Routines on home'**
+ String get homeRoutines;
+
+ /// No description provided for @homeRoutinesHint.
+ ///
+ /// In en, this message translates to:
+ /// **'Your routines, last done first. Tap one to start it.'**
+ String get homeRoutinesHint;
+
+ /// No description provided for @homeWeekStats.
+ ///
+ /// In en, this message translates to:
+ /// **'This week on home'**
+ String get homeWeekStats;
+
+ /// No description provided for @homeWeekStatsHint.
+ ///
+ /// In en, this message translates to:
+ /// **'Volume, sets and PRs of the week.'**
+ String get homeWeekStatsHint;
+
+ /// No description provided for @routineDoneToday.
+ ///
+ /// In en, this message translates to:
+ /// **'Done for today · nice work'**
+ String get routineDoneToday;
+
+ /// No description provided for @trainAgain.
+ ///
+ /// In en, this message translates to:
+ /// **'Train again'**
+ String get trainAgain;
+
+ /// No description provided for @lastDoneAgo.
+ ///
+ /// In en, this message translates to:
+ /// **'{n, plural, =0{Done today} =1{Done yesterday} other{{n} days ago}}'**
+ String lastDoneAgo(int n);
+
/// No description provided for @archivedFilter.
///
/// In en, this message translates to:
diff --git a/lib/l10n/app_localizations_ar.dart b/lib/l10n/app_localizations_ar.dart
index 802d174..a36bb00 100644
--- a/lib/l10n/app_localizations_ar.dart
+++ b/lib/l10n/app_localizations_ar.dart
@@ -2890,6 +2890,36 @@ class AppLocalizationsAr extends AppLocalizations {
@override
String get homeRecommended => 'المقترحات في الرئيسية';
+ @override
+ String get homeRoutines => 'الروتينات في الرئيسية';
+
+ @override
+ String get homeRoutinesHint => 'روتيناتك، آخر ما أنجزته أولًا. اضغط على أحدها لتبدأه.';
+
+ @override
+ String get homeWeekStats => 'هذا الأسبوع في الرئيسية';
+
+ @override
+ String get homeWeekStatsHint => 'الحجم والمجموعات والأرقام القياسية لهذا الأسبوع.';
+
+ @override
+ String get routineDoneToday => 'انتهيت لليوم · عمل رائع';
+
+ @override
+ String get trainAgain => 'تمرّن مرة أخرى';
+
+ @override
+ String lastDoneAgo(int n) {
+ String _temp0 = intl.Intl.pluralLogic(
+ n,
+ locale: localeName,
+ other: 'قبل $n يوم',
+ one: 'أُنجز أمس',
+ zero: 'أُنجز اليوم',
+ );
+ return '$_temp0';
+ }
+
@override
String get archivedFilter => 'المؤرشفة';
diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart
index 80d998c..46ff8bc 100644
--- a/lib/l10n/app_localizations_de.dart
+++ b/lib/l10n/app_localizations_de.dart
@@ -2907,6 +2907,37 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get homeRecommended => 'Empfehlungen auf der Startseite';
+ @override
+ String get homeRoutines => 'Routinen auf der Startseite';
+
+ @override
+ String get homeRoutinesHint =>
+ 'Deine Routinen, die zuletzt gemachte zuerst. Tippe auf eine, um sie zu starten.';
+
+ @override
+ String get homeWeekStats => 'Diese Woche auf der Startseite';
+
+ @override
+ String get homeWeekStatsHint => 'Volumen, Sätze und PRs der Woche.';
+
+ @override
+ String get routineDoneToday => 'Für heute erledigt · stark';
+
+ @override
+ String get trainAgain => 'Nochmal trainieren';
+
+ @override
+ String lastDoneAgo(int n) {
+ String _temp0 = intl.Intl.pluralLogic(
+ n,
+ locale: localeName,
+ other: 'Vor $n Tagen',
+ one: 'Gestern gemacht',
+ zero: 'Heute gemacht',
+ );
+ return '$_temp0';
+ }
+
@override
String get archivedFilter => 'Archiviert';
diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart
index 6aa040f..985ad84 100644
--- a/lib/l10n/app_localizations_en.dart
+++ b/lib/l10n/app_localizations_en.dart
@@ -2888,6 +2888,36 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get homeRecommended => 'Recommended on home';
+ @override
+ String get homeRoutines => 'Routines on home';
+
+ @override
+ String get homeRoutinesHint => 'Your routines, last done first. Tap one to start it.';
+
+ @override
+ String get homeWeekStats => 'This week on home';
+
+ @override
+ String get homeWeekStatsHint => 'Volume, sets and PRs of the week.';
+
+ @override
+ String get routineDoneToday => 'Done for today · nice work';
+
+ @override
+ String get trainAgain => 'Train again';
+
+ @override
+ String lastDoneAgo(int n) {
+ String _temp0 = intl.Intl.pluralLogic(
+ n,
+ locale: localeName,
+ other: '$n days ago',
+ one: 'Done yesterday',
+ zero: 'Done today',
+ );
+ return '$_temp0';
+ }
+
@override
String get archivedFilter => 'Archived';
diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart
index c767b9b..2bd360c 100644
--- a/lib/l10n/app_localizations_es.dart
+++ b/lib/l10n/app_localizations_es.dart
@@ -2893,6 +2893,36 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get homeRecommended => 'Recomendados en inicio';
+ @override
+ String get homeRoutines => 'Rutinas en inicio';
+
+ @override
+ String get homeRoutinesHint => 'Tus rutinas, la última que hiciste primero. Toca una para empezarla.';
+
+ @override
+ String get homeWeekStats => 'Esta semana en inicio';
+
+ @override
+ String get homeWeekStatsHint => 'Volumen, series y récords de la semana.';
+
+ @override
+ String get routineDoneToday => 'Hecha por hoy · buen trabajo';
+
+ @override
+ String get trainAgain => 'Entrenar otra vez';
+
+ @override
+ String lastDoneAgo(int n) {
+ String _temp0 = intl.Intl.pluralLogic(
+ n,
+ locale: localeName,
+ other: 'Hace $n días',
+ one: 'Hecha ayer',
+ zero: 'Hecha hoy',
+ );
+ return '$_temp0';
+ }
+
@override
String get archivedFilter => 'Archivados';
diff --git a/lib/l10n/app_localizations_fa.dart b/lib/l10n/app_localizations_fa.dart
index 0a2bcdc..a8bd711 100644
--- a/lib/l10n/app_localizations_fa.dart
+++ b/lib/l10n/app_localizations_fa.dart
@@ -2878,6 +2878,36 @@ class AppLocalizationsFa extends AppLocalizations {
@override
String get homeRecommended => 'پیشنهادی در خانه';
+ @override
+ String get homeRoutines => 'روتین‌ها در خانه';
+
+ @override
+ String get homeRoutinesHint => 'روتین‌هایت، آخرین انجام‌شده اول. روی یکی بزن تا شروع شود.';
+
+ @override
+ String get homeWeekStats => 'این هفته در خانه';
+
+ @override
+ String get homeWeekStatsHint => 'حجم، ست‌ها و رکوردهای هفته.';
+
+ @override
+ String get routineDoneToday => 'برای امروز تمام شد · عالی بود';
+
+ @override
+ String get trainAgain => 'دوباره تمرین کن';
+
+ @override
+ String lastDoneAgo(int n) {
+ String _temp0 = intl.Intl.pluralLogic(
+ n,
+ locale: localeName,
+ other: '$n روز پیش',
+ one: 'دیروز انجام شد',
+ zero: 'امروز انجام شد',
+ );
+ return '$_temp0';
+ }
+
@override
String get archivedFilter => 'بایگانی';
diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart
index 2f8d44b..cfe7801 100644
--- a/lib/l10n/app_localizations_fr.dart
+++ b/lib/l10n/app_localizations_fr.dart
@@ -2907,6 +2907,36 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get homeRecommended => 'Recommandations sur l’accueil';
+ @override
+ String get homeRoutines => 'Routines sur l’accueil';
+
+ @override
+ String get homeRoutinesHint => 'Tes routines, la dernière faite en premier. Touche-en une pour la lancer.';
+
+ @override
+ String get homeWeekStats => 'Cette semaine sur l’accueil';
+
+ @override
+ String get homeWeekStatsHint => 'Volume, séries et records de la semaine.';
+
+ @override
+ String get routineDoneToday => 'Fini pour aujourd’hui · bien joué';
+
+ @override
+ String get trainAgain => 'S’entraîner encore';
+
+ @override
+ String lastDoneAgo(int n) {
+ String _temp0 = intl.Intl.pluralLogic(
+ n,
+ locale: localeName,
+ other: 'Il y a $n jours',
+ one: 'Faite hier',
+ zero: 'Faite aujourd’hui',
+ );
+ return '$_temp0';
+ }
+
@override
String get archivedFilter => 'Archivés';
diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart
index 0d2a0cb..68f4be7 100644
--- a/lib/l10n/app_localizations_it.dart
+++ b/lib/l10n/app_localizations_it.dart
@@ -2897,6 +2897,36 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get homeRecommended => 'Consigliati nella home';
+ @override
+ String get homeRoutines => 'Routine nella home';
+
+ @override
+ String get homeRoutinesHint => 'Le tue routine, l’ultima fatta per prima. Toccane una per iniziarla.';
+
+ @override
+ String get homeWeekStats => 'Questa settimana nella home';
+
+ @override
+ String get homeWeekStatsHint => 'Volume, serie e record della settimana.';
+
+ @override
+ String get routineDoneToday => 'Fatto per oggi · ottimo lavoro';
+
+ @override
+ String get trainAgain => 'Allenati ancora';
+
+ @override
+ String lastDoneAgo(int n) {
+ String _temp0 = intl.Intl.pluralLogic(
+ n,
+ locale: localeName,
+ other: '$n giorni fa',
+ one: 'Fatta ieri',
+ zero: 'Fatta oggi',
+ );
+ return '$_temp0';
+ }
+
@override
String get archivedFilter => 'Archiviati';
diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart
index f9c5139..19e2b2e 100644
--- a/lib/l10n/app_localizations_ja.dart
+++ b/lib/l10n/app_localizations_ja.dart
@@ -2806,6 +2806,30 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get homeRecommended => 'ホームのおすすめ';
+ @override
+ String get homeRoutines => 'ホームのルーティン';
+
+ @override
+ String get homeRoutinesHint => '最近やった順に表示。タップで開始します。';
+
+ @override
+ String get homeWeekStats => 'ホームの今週';
+
+ @override
+ String get homeWeekStatsHint => '今週のボリューム・セット・記録。';
+
+ @override
+ String get routineDoneToday => '今日は完了 · お疲れさま';
+
+ @override
+ String get trainAgain => 'もう一度トレーニング';
+
+ @override
+ String lastDoneAgo(int n) {
+ String _temp0 = intl.Intl.pluralLogic(n, locale: localeName, other: '$n日前', one: '昨日実施', zero: '今日実施');
+ return '$_temp0';
+ }
+
@override
String get archivedFilter => 'アーカイブ';
diff --git a/lib/l10n/app_localizations_ko.dart b/lib/l10n/app_localizations_ko.dart
index db0df61..19e959f 100644
--- a/lib/l10n/app_localizations_ko.dart
+++ b/lib/l10n/app_localizations_ko.dart
@@ -2816,6 +2816,30 @@ class AppLocalizationsKo extends AppLocalizations {
@override
String get homeRecommended => '홈 추천';
+ @override
+ String get homeRoutines => '홈의 루틴';
+
+ @override
+ String get homeRoutinesHint => '최근에 한 루틴부터 보여줘요. 탭하면 시작해요.';
+
+ @override
+ String get homeWeekStats => '홈의 이번 주';
+
+ @override
+ String get homeWeekStatsHint => '이번 주 볼륨, 세트, 기록.';
+
+ @override
+ String get routineDoneToday => '오늘 완료 · 수고했어요';
+
+ @override
+ String get trainAgain => '다시 운동하기';
+
+ @override
+ String lastDoneAgo(int n) {
+ String _temp0 = intl.Intl.pluralLogic(n, locale: localeName, other: '$n일 전', one: '어제 완료', zero: '오늘 완료');
+ return '$_temp0';
+ }
+
@override
String get archivedFilter => '보관됨';
diff --git a/lib/l10n/app_localizations_nl.dart b/lib/l10n/app_localizations_nl.dart
index 5cbdd63..2466edf 100644
--- a/lib/l10n/app_localizations_nl.dart
+++ b/lib/l10n/app_localizations_nl.dart
@@ -2899,6 +2899,36 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get homeRecommended => 'Aanbevolen op start';
+ @override
+ String get homeRoutines => 'Routines op het startscherm';
+
+ @override
+ String get homeRoutinesHint => 'Je routines, de laatst gedane eerst. Tik op een routine om te starten.';
+
+ @override
+ String get homeWeekStats => 'Deze week op het startscherm';
+
+ @override
+ String get homeWeekStatsHint => 'Volume, sets en PR’s van de week.';
+
+ @override
+ String get routineDoneToday => 'Klaar voor vandaag · goed gedaan';
+
+ @override
+ String get trainAgain => 'Nog een keer trainen';
+
+ @override
+ String lastDoneAgo(int n) {
+ String _temp0 = intl.Intl.pluralLogic(
+ n,
+ locale: localeName,
+ other: '$n dagen geleden',
+ one: 'Gisteren gedaan',
+ zero: 'Vandaag gedaan',
+ );
+ return '$_temp0';
+ }
+
@override
String get archivedFilter => 'Gearchiveerd';
diff --git a/lib/l10n/app_localizations_pl.dart b/lib/l10n/app_localizations_pl.dart
index 250017d..a5f5700 100644
--- a/lib/l10n/app_localizations_pl.dart
+++ b/lib/l10n/app_localizations_pl.dart
@@ -2899,6 +2899,38 @@ class AppLocalizationsPl extends AppLocalizations {
@override
String get homeRecommended => 'Polecane na ekranie głównym';
+ @override
+ String get homeRoutines => 'Rutyny na ekranie głównym';
+
+ @override
+ String get homeRoutinesHint => 'Twoje rutyny, ostatnio wykonana na początku. Stuknij, aby zacząć.';
+
+ @override
+ String get homeWeekStats => 'Ten tydzień na ekranie głównym';
+
+ @override
+ String get homeWeekStatsHint => 'Objętość, serie i rekordy z tego tygodnia.';
+
+ @override
+ String get routineDoneToday => 'Na dziś gotowe · dobra robota';
+
+ @override
+ String get trainAgain => 'Trenuj jeszcze raz';
+
+ @override
+ String lastDoneAgo(int n) {
+ String _temp0 = intl.Intl.pluralLogic(
+ n,
+ locale: localeName,
+ other: '$n dni temu',
+ many: '$n dni temu',
+ few: '$n dni temu',
+ one: 'Zrobione wczoraj',
+ zero: 'Zrobione dziś',
+ );
+ return '$_temp0';
+ }
+
@override
String get archivedFilter => 'Zarchiwizowane';
diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart
index ff07ae8..718ee3d 100644
--- a/lib/l10n/app_localizations_pt.dart
+++ b/lib/l10n/app_localizations_pt.dart
@@ -2893,6 +2893,36 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get homeRecommended => 'Recomendados no início';
+ @override
+ String get homeRoutines => 'Rotinas no início';
+
+ @override
+ String get homeRoutinesHint => 'Suas rotinas, a última feita primeiro. Toque em uma para começar.';
+
+ @override
+ String get homeWeekStats => 'Esta semana no início';
+
+ @override
+ String get homeWeekStatsHint => 'Volume, séries e recordes da semana.';
+
+ @override
+ String get routineDoneToday => 'Feito por hoje · mandou bem';
+
+ @override
+ String get trainAgain => 'Treinar de novo';
+
+ @override
+ String lastDoneAgo(int n) {
+ String _temp0 = intl.Intl.pluralLogic(
+ n,
+ locale: localeName,
+ other: 'Há $n dias',
+ one: 'Feita ontem',
+ zero: 'Feita hoje',
+ );
+ return '$_temp0';
+ }
+
@override
String get archivedFilter => 'Arquivados';
diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart
index 3b6edaf..2061ba5 100644
--- a/lib/l10n/app_localizations_ru.dart
+++ b/lib/l10n/app_localizations_ru.dart
@@ -2984,6 +2984,38 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get homeRecommended => 'Рекомендации на главной';
+ @override
+ String get homeRoutines => 'Тренировки на главной';
+
+ @override
+ String get homeRoutinesHint => 'Твои тренировки, последняя сделанная первой. Нажми, чтобы начать.';
+
+ @override
+ String get homeWeekStats => 'Эта неделя на главной';
+
+ @override
+ String get homeWeekStatsHint => 'Объём, подходы и рекорды за неделю.';
+
+ @override
+ String get routineDoneToday => 'На сегодня всё · отличная работа';
+
+ @override
+ String get trainAgain => 'Тренироваться ещё';
+
+ @override
+ String lastDoneAgo(int n) {
+ String _temp0 = intl.Intl.pluralLogic(
+ n,
+ locale: localeName,
+ other: '$n дня назад',
+ many: '$n дней назад',
+ few: '$n дня назад',
+ one: '$n день назад',
+ zero: 'Сделано сегодня',
+ );
+ return '$_temp0';
+ }
+
@override
String get archivedFilter => 'Архив';
diff --git a/lib/l10n/app_localizations_tr.dart b/lib/l10n/app_localizations_tr.dart
index ab660a2..5423486 100644
--- a/lib/l10n/app_localizations_tr.dart
+++ b/lib/l10n/app_localizations_tr.dart
@@ -2898,6 +2898,36 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get homeRecommended => 'Ana ekranda öneriler';
+ @override
+ String get homeRoutines => 'Ana ekranda programlar';
+
+ @override
+ String get homeRoutinesHint => 'Programların, en son yaptığın önce. Başlatmak için birine dokun.';
+
+ @override
+ String get homeWeekStats => 'Ana ekranda bu hafta';
+
+ @override
+ String get homeWeekStatsHint => 'Haftanın hacmi, setleri ve rekorları.';
+
+ @override
+ String get routineDoneToday => 'Bugünlük bitti · harika iş';
+
+ @override
+ String get trainAgain => 'Tekrar antrenman yap';
+
+ @override
+ String lastDoneAgo(int n) {
+ String _temp0 = intl.Intl.pluralLogic(
+ n,
+ locale: localeName,
+ other: '$n gün önce',
+ one: 'Dün yapıldı',
+ zero: 'Bugün yapıldı',
+ );
+ return '$_temp0';
+ }
+
@override
String get archivedFilter => 'Arşivlenenler';
diff --git a/lib/l10n/app_localizations_uk.dart b/lib/l10n/app_localizations_uk.dart
index 387224a..94da33c 100644
--- a/lib/l10n/app_localizations_uk.dart
+++ b/lib/l10n/app_localizations_uk.dart
@@ -2904,6 +2904,38 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get homeRecommended => 'Рекомендації на головній';
+ @override
+ String get homeRoutines => 'Програми на головній';
+
+ @override
+ String get homeRoutinesHint => 'Твої програми, остання виконана першою. Натисни, щоб почати.';
+
+ @override
+ String get homeWeekStats => 'Цей тиждень на головній';
+
+ @override
+ String get homeWeekStatsHint => 'Обʼєм, підходи й рекорди за тиждень.';
+
+ @override
+ String get routineDoneToday => 'На сьогодні все · чудова робота';
+
+ @override
+ String get trainAgain => 'Тренуватися ще';
+
+ @override
+ String lastDoneAgo(int n) {
+ String _temp0 = intl.Intl.pluralLogic(
+ n,
+ locale: localeName,
+ other: '$n дня тому',
+ many: '$n днів тому',
+ few: '$n дні тому',
+ one: '$n день тому',
+ zero: 'Зроблено сьогодні',
+ );
+ return '$_temp0';
+ }
+
@override
String get archivedFilter => 'Архів';
diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart
index aa0f477..31d6baf 100644
--- a/lib/l10n/app_localizations_zh.dart
+++ b/lib/l10n/app_localizations_zh.dart
@@ -2767,6 +2767,30 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get homeRecommended => '首页推荐';
+ @override
+ String get homeRoutines => '首页的计划';
+
+ @override
+ String get homeRoutinesHint => '你的训练计划,最近做过的排在前面。点一下即可开始。';
+
+ @override
+ String get homeWeekStats => '首页的本周';
+
+ @override
+ String get homeWeekStatsHint => '本周的训练量、组数和纪录。';
+
+ @override
+ String get routineDoneToday => '今天已完成 · 干得好';
+
+ @override
+ String get trainAgain => '再练一次';
+
+ @override
+ String lastDoneAgo(int n) {
+ String _temp0 = intl.Intl.pluralLogic(n, locale: localeName, other: '$n 天前', one: '昨天完成', zero: '今天完成');
+ return '$_temp0';
+ }
+
@override
String get archivedFilter => '已归档';
@@ -6058,6 +6082,30 @@ class AppLocalizationsZhHant extends AppLocalizationsZh {
@override
String get homeRecommended => '首頁推薦';
+ @override
+ String get homeRoutines => '首頁的課表';
+
+ @override
+ String get homeRoutinesHint => '你的課表,最近做過的排在前面。點一下即可開始。';
+
+ @override
+ String get homeWeekStats => '首頁的本週';
+
+ @override
+ String get homeWeekStatsHint => '本週的訓練量、組數和紀錄。';
+
+ @override
+ String get routineDoneToday => '今天完成了 · 做得好';
+
+ @override
+ String get trainAgain => '再練一次';
+
+ @override
+ String lastDoneAgo(int n) {
+ String _temp0 = intl.Intl.pluralLogic(n, locale: localeName, other: '$n 天前', one: '昨天完成', zero: '今天完成');
+ return '$_temp0';
+ }
+
@override
String get archivedFilter => '已封存';
diff --git a/lib/l10n/app_nl.arb b/lib/l10n/app_nl.arb
index 3aa8184..2226655 100644
--- a/lib/l10n/app_nl.arb
+++ b/lib/l10n/app_nl.arb
@@ -1111,6 +1111,13 @@
"cardioFocus": "Cardio",
"cardioFocusHint": "Hardlopen, fietsen, roeien of touwtjespringen, op afstand en tijd",
"homeRecommended": "Aanbevolen op start",
+ "homeRoutines": "Routines op het startscherm",
+ "homeRoutinesHint": "Je routines, de laatst gedane eerst. Tik op een routine om te starten.",
+ "homeWeekStats": "Deze week op het startscherm",
+ "homeWeekStatsHint": "Volume, sets en PR’s van de week.",
+ "routineDoneToday": "Klaar voor vandaag · goed gedaan",
+ "trainAgain": "Nog een keer trainen",
+ "lastDoneAgo": "{n, plural, =0{Vandaag gedaan} =1{Gisteren gedaan} other{{n} dagen geleden}}",
"archivedFilter": "Gearchiveerd",
"archiveExercise": "Oefening archiveren",
"restoreExercise": "Herstellen",
diff --git a/lib/l10n/app_pl.arb b/lib/l10n/app_pl.arb
index f7b4ae6..e948185 100644
--- a/lib/l10n/app_pl.arb
+++ b/lib/l10n/app_pl.arb
@@ -1111,6 +1111,13 @@
"cardioFocus": "Cardio",
"cardioFocusHint": "Bieg, rower, wioślarz lub skakanka, na dystans i czas",
"homeRecommended": "Polecane na ekranie głównym",
+ "homeRoutines": "Rutyny na ekranie głównym",
+ "homeRoutinesHint": "Twoje rutyny, ostatnio wykonana na początku. Stuknij, aby zacząć.",
+ "homeWeekStats": "Ten tydzień na ekranie głównym",
+ "homeWeekStatsHint": "Objętość, serie i rekordy z tego tygodnia.",
+ "routineDoneToday": "Na dziś gotowe · dobra robota",
+ "trainAgain": "Trenuj jeszcze raz",
+ "lastDoneAgo": "{n, plural, =0{Zrobione dziś} =1{Zrobione wczoraj} few{{n} dni temu} many{{n} dni temu} other{{n} dni temu}}",
"archivedFilter": "Zarchiwizowane",
"archiveExercise": "Archiwizuj ćwiczenie",
"restoreExercise": "Przywróć",
diff --git a/lib/l10n/app_pt.arb b/lib/l10n/app_pt.arb
index f6d4a83..ff59039 100644
--- a/lib/l10n/app_pt.arb
+++ b/lib/l10n/app_pt.arb
@@ -893,6 +893,13 @@
"cardioFocus": "Cardio",
"cardioFocusHint": "Corrida, bicicleta, remo ou corda, por distância e tempo",
"homeRecommended": "Recomendados no início",
+ "homeRoutines": "Rotinas no início",
+ "homeRoutinesHint": "Suas rotinas, a última feita primeiro. Toque em uma para começar.",
+ "homeWeekStats": "Esta semana no início",
+ "homeWeekStatsHint": "Volume, séries e recordes da semana.",
+ "routineDoneToday": "Feito por hoje · mandou bem",
+ "trainAgain": "Treinar de novo",
+ "lastDoneAgo": "{n, plural, =0{Feita hoje} =1{Feita ontem} other{Há {n} dias}}",
"archivedFilter": "Arquivados",
"archiveExercise": "Arquivar exercício",
"restoreExercise": "Restaurar",
diff --git a/lib/l10n/app_ru.arb b/lib/l10n/app_ru.arb
index a47603b..f6bfd01 100644
--- a/lib/l10n/app_ru.arb
+++ b/lib/l10n/app_ru.arb
@@ -920,6 +920,13 @@
"cardioFocus": "Кардио",
"cardioFocusHint": "Бег, велосипед, гребля или скакалка — по дистанции и времени",
"homeRecommended": "Рекомендации на главной",
+ "homeRoutines": "Тренировки на главной",
+ "homeRoutinesHint": "Твои тренировки, последняя сделанная первой. Нажми, чтобы начать.",
+ "homeWeekStats": "Эта неделя на главной",
+ "homeWeekStatsHint": "Объём, подходы и рекорды за неделю.",
+ "routineDoneToday": "На сегодня всё · отличная работа",
+ "trainAgain": "Тренироваться ещё",
+ "lastDoneAgo": "{n, plural, =0{Сделано сегодня} =1{Сделано вчера} one{{n} день назад} few{{n} дня назад} many{{n} дней назад} other{{n} дня назад}}",
"archivedFilter": "Архив",
"archiveExercise": "Архивировать упражнение",
"restoreExercise": "Восстановить",
diff --git a/lib/l10n/app_tr.arb b/lib/l10n/app_tr.arb
index 9e2e0be..42db24a 100644
--- a/lib/l10n/app_tr.arb
+++ b/lib/l10n/app_tr.arb
@@ -1111,6 +1111,13 @@
"cardioFocus": "Kardiyo",
"cardioFocusHint": "Koşu, bisiklet, kürek ya da ip, mesafe ve süreyle",
"homeRecommended": "Ana ekranda öneriler",
+ "homeRoutines": "Ana ekranda programlar",
+ "homeRoutinesHint": "Programların, en son yaptığın önce. Başlatmak için birine dokun.",
+ "homeWeekStats": "Ana ekranda bu hafta",
+ "homeWeekStatsHint": "Haftanın hacmi, setleri ve rekorları.",
+ "routineDoneToday": "Bugünlük bitti · harika iş",
+ "trainAgain": "Tekrar antrenman yap",
+ "lastDoneAgo": "{n, plural, =0{Bugün yapıldı} =1{Dün yapıldı} other{{n} gün önce}}",
"archivedFilter": "Arşivlenenler",
"archiveExercise": "Egzersizi arşivle",
"restoreExercise": "Geri al",
diff --git a/lib/l10n/app_uk.arb b/lib/l10n/app_uk.arb
index 658b88b..63d2550 100644
--- a/lib/l10n/app_uk.arb
+++ b/lib/l10n/app_uk.arb
@@ -1111,6 +1111,13 @@
"cardioFocus": "Кардіо",
"cardioFocusHint": "Біг, велосипед, веслування чи скакалка — за дистанцією і часом",
"homeRecommended": "Рекомендації на головній",
+ "homeRoutines": "Програми на головній",
+ "homeRoutinesHint": "Твої програми, остання виконана першою. Натисни, щоб почати.",
+ "homeWeekStats": "Цей тиждень на головній",
+ "homeWeekStatsHint": "Обʼєм, підходи й рекорди за тиждень.",
+ "routineDoneToday": "На сьогодні все · чудова робота",
+ "trainAgain": "Тренуватися ще",
+ "lastDoneAgo": "{n, plural, =0{Зроблено сьогодні} =1{Зроблено вчора} one{{n} день тому} few{{n} дні тому} many{{n} днів тому} other{{n} дня тому}}",
"archivedFilter": "Архів",
"archiveExercise": "Архівувати вправу",
"restoreExercise": "Відновити",
diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb
index e6a3fd8..ad4ac35 100644
--- a/lib/l10n/app_zh.arb
+++ b/lib/l10n/app_zh.arb
@@ -893,6 +893,13 @@
"cardioFocus": "有氧",
"cardioFocusHint": "跑步、骑行、划船或跳绳,按距离和时间记录",
"homeRecommended": "首页推荐",
+ "homeRoutines": "首页的计划",
+ "homeRoutinesHint": "你的训练计划,最近做过的排在前面。点一下即可开始。",
+ "homeWeekStats": "首页的本周",
+ "homeWeekStatsHint": "本周的训练量、组数和纪录。",
+ "routineDoneToday": "今天已完成 · 干得好",
+ "trainAgain": "再练一次",
+ "lastDoneAgo": "{n, plural, =0{今天完成} =1{昨天完成} other{{n} 天前}}",
"archivedFilter": "已归档",
"archiveExercise": "归档动作",
"restoreExercise": "恢复",
diff --git a/lib/l10n/app_zh_Hant.arb b/lib/l10n/app_zh_Hant.arb
index 2112954..cbec55e 100644
--- a/lib/l10n/app_zh_Hant.arb
+++ b/lib/l10n/app_zh_Hant.arb
@@ -1111,6 +1111,13 @@
"cardioFocus": "有氧",
"cardioFocusHint": "跑步、騎車、划船或跳繩,按距離和時間記錄",
"homeRecommended": "首頁推薦",
+ "homeRoutines": "首頁的課表",
+ "homeRoutinesHint": "你的課表,最近做過的排在前面。點一下即可開始。",
+ "homeWeekStats": "首頁的本週",
+ "homeWeekStatsHint": "本週的訓練量、組數和紀錄。",
+ "routineDoneToday": "今天完成了 · 做得好",
+ "trainAgain": "再練一次",
+ "lastDoneAgo": "{n, plural, =0{今天完成} =1{昨天完成} other{{n} 天前}}",
"archivedFilter": "已封存",
"archiveExercise": "封存動作",
"restoreExercise": "還原",
diff --git a/lib/screens/home_screen.dart b/lib/screens/home_screen.dart
index 64f19e6..015f688 100644
--- a/lib/screens/home_screen.dart
+++ b/lib/screens/home_screen.dart
@@ -3,6 +3,7 @@ import 'package:phosphoricons_flutter/phosphoricons_flutter.dart';
import '../l10n/l10n.dart';
import '../models/exercise.dart';
+import '../models/workout.dart';
import '../state/fit_state.dart';
import '../theme/app_colors.dart';
import '../theme/app_theme.dart';
@@ -11,9 +12,11 @@ import '../widgets/entrance.dart';
import '../widgets/exercise_media.dart';
import '../widgets/glass.dart';
import '../widgets/home_folder.dart';
+import '../widgets/routine_folder.dart';
import '../widgets/svg_icon.dart';
import '../widgets/ui_kit.dart';
import 'progress_screen.dart';
+import 'routines_screen.dart';
class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
@@ -22,6 +25,7 @@ class HomeScreen extends StatelessWidget {
Widget build(BuildContext context) {
final gc = context.gc;
final recommended = fit.recommendedExercises(8);
+ final routines = fit.routinesByLastDone;
return RiseScope(
id: 'home',
@@ -45,10 +49,27 @@ class HomeScreen extends StatelessWidget {
const SizedBox(height: 14),
_photoNudge(gc),
],
- const SizedBox(height: 30),
- _heading(gc, t.thisWeek),
- const SizedBox(height: 14),
- _weekStats(context, gc),
+ if (fit.showWeekStats) ...[
+ const SizedBox(height: 30),
+ _heading(gc, t.thisWeek),
+ const SizedBox(height: 14),
+ _weekStats(context, gc),
+ ],
+ if (fit.showRoutineRow && routines.isNotEmpty) ...[
+ const SizedBox(height: 30),
+ _heading(gc, t.routines, onMore: fit.goRoutines),
+ const SizedBox(height: 14),
+ SizedBox(
+ height: 128,
+ child: ListView.separated(
+ scrollDirection: Axis.horizontal,
+ clipBehavior: Clip.none,
+ itemCount: routines.length,
+ separatorBuilder: (_, _) => const SizedBox(width: 12),
+ itemBuilder: (_, i) => _routineCard(context, gc, routines[i]),
+ ),
+ ),
+ ],
const SizedBox(height: 30),
_heading(gc, t.activityLabel, onMore: fit.goProgress),
const SizedBox(height: 14),
@@ -179,7 +200,10 @@ class HomeScreen extends StatelessWidget {
final label = isRoutine ? t.todaysRoutine : t.todaysFocus;
final title = isRoutine ? fit.routineTitle(routine) : focus.title;
final today = fit.routinesOn(DateTime.now());
- final subtitle = isRoutine
+ final done = isRoutine && fit.pendingRoutinesOn(DateTime.now()).isEmpty;
+ final subtitle = done
+ ? t.routineDoneToday
+ : isRoutine
? [
t.exerciseCount(routine.exerciseIds.length),
if (today.length > 1) t.routineOfDay(today.indexOf(routine) + 1, today.length),
@@ -229,9 +253,20 @@ class HomeScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Text(label.toUpperCase(),
- style: AppTheme.f(10.5,
- weight: FontWeight.w700, color: gc.textTertiary, letterSpacing: 1.4)),
+ Row(children: [
+ if (done) ...[
+ Container(
+ width: 16,
+ height: 16,
+ decoration: BoxDecoration(color: gc.ember, shape: BoxShape.circle),
+ child: Center(child: SvgPathIcon(Ic.checkBold, size: 8, color: gc.onEmber)),
+ ),
+ const SizedBox(width: 7),
+ ],
+ Text(label.toUpperCase(),
+ style: AppTheme.f(10.5,
+ weight: FontWeight.w700, color: gc.textTertiary, letterSpacing: 1.4)),
+ ]),
const SizedBox(height: 9),
Padding(
padding: const EdgeInsets.only(right: 96),
@@ -248,9 +283,11 @@ class HomeScreen extends StatelessWidget {
style: AppTheme.f(13, weight: FontWeight.w500, color: gc.textSecondary)),
const SizedBox(height: 20),
PrimaryButton(
- label: t.startWorkout,
+ label: done ? t.trainAgain : t.startWorkout,
icon: Ic.play,
height: 52,
+ bg: done ? gc.bgRaised2 : null,
+ fg: done ? gc.text : null,
onTap: isRoutine ? () => fit.startRoutine(routine) : fit.startFocusWorkout,
),
],
@@ -328,7 +365,7 @@ class HomeScreen extends StatelessWidget {
child: _stat(gc, t.volume, fit.volumeValue(fit.volumeThisWeekKg),
unit: fit.volumeUnit),
),
- Expanded(child: _stat(gc, t.setsToday, '${fit.setsToday}')),
+ Expanded(child: _stat(gc, t.statSets, '${fit.weekSetCount}')),
Expanded(child: _stat(gc, t.prs, '${fit.prsThisWeek}')),
],
),
@@ -412,6 +449,51 @@ class HomeScreen extends StatelessWidget {
);
}
+ Widget _routineCard(BuildContext context, GymColors gc, Routine r) {
+ final hue = folderHue(r);
+ final last = fit.lastDoneOf(r.id);
+ final now = DateTime.now();
+ final ago = last == null
+ ? null
+ : DateTime(now.year, now.month, now.day).difference(DateTime(last.year, last.month, last.day)).inDays;
+ return Pressable(
+ onTap: () => r.exerciseIds.isEmpty ? fit.openRoutine(r.id) : fit.startRoutine(r),
+ onLongPress: () => showRoutineMenu(context, r),
+ child: Container(
+ width: 156,
+ padding: const EdgeInsets.fromLTRB(14, 14, 14, 13),
+ decoration: BoxDecoration(
+ color: gc.bgRaised,
+ borderRadius: BorderRadius.circular(18),
+ ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Container(
+ width: 30,
+ height: 30,
+ decoration: BoxDecoration(color: hue, shape: BoxShape.circle),
+ child: Center(
+ child: SvgPathIcon(Ic.play, size: 12, color: Color.lerp(hue, Colors.black, 0.6)!),
+ ),
+ ),
+ const Spacer(),
+ Text(fit.routineTitle(r),
+ maxLines: 2,
+ overflow: TextOverflow.ellipsis,
+ style: AppTheme.f(14, weight: FontWeight.w700, color: gc.text, height: 1.2)),
+ const SizedBox(height: 4),
+ Text(
+ [t.exerciseCount(r.exerciseIds.length), if (ago != null) t.lastDoneAgo(ago)].join(' · '),
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: AppTheme.f(11, weight: FontWeight.w500, color: gc.textTertiary)),
+ ],
+ ),
+ ),
+ );
+ }
+
Widget _recCard(GymColors gc, Exercise ex) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
diff --git a/lib/screens/routines_screen.dart b/lib/screens/routines_screen.dart
index 2d76abb..c01987c 100644
--- a/lib/screens/routines_screen.dart
+++ b/lib/screens/routines_screen.dart
@@ -396,11 +396,11 @@ class RoutinesScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(bottom: 12),
child: Row(crossAxisAlignment: CrossAxisAlignment.start, children: [
- Expanded(child: RoutineFolder(routine: list[i], onMenu: () => _routineMenu(context, list[i]))),
+ Expanded(child: RoutineFolder(routine: list[i], onMenu: () => showRoutineMenu(context, list[i]))),
const SizedBox(width: 12),
Expanded(
child: i + 1 < list.length
- ? RoutineFolder(routine: list[i + 1], onMenu: () => _routineMenu(context, list[i + 1]))
+ ? RoutineFolder(routine: list[i + 1], onMenu: () => showRoutineMenu(context, list[i + 1]))
: const SizedBox.shrink(),
),
]),
@@ -408,61 +408,6 @@ class RoutinesScreen extends StatelessWidget {
]);
}
- void _routineMenu(BuildContext context, Routine r) {
- final gc = context.gc;
- showAppSheet<void>(
- context: context,
- backgroundColor: Colors.transparent,
- builder: (sheet) => Container(
- padding: sheetPad(sheet),
- decoration: BoxDecoration(
- color: gc.bgRaised,
- borderRadius: const BorderRadius.vertical(top: Radius.circular(28)),
- ),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: [
- const SheetHandle(),
- const SizedBox(height: 16),
- SheetTitle(fit.routineTitle(r), subtitle: t.exerciseCount(r.exerciseIds.length)),
- const SizedBox(height: 14),
- OptionGroup([
- OptionItem(t.editEntry, icon: PhosphorIconsRegular.pencilSimple, onTap: () {
- Navigator.pop(sheet);
- fit.openRoutine(r.id);
- }),
- if (r.exerciseIds.isNotEmpty)
- OptionItem(titleCase(t.startWorkout), icon: PhosphorIconsRegular.play, onTap: () {
- Navigator.pop(sheet);
- fit.startRoutine(r);
- }),
- OptionItem(t.shareRoutine, icon: PhosphorIconsRegular.shareNetwork, onTap: () {
- Navigator.pop(sheet);
- sharePlan([r]);
- }),
- OptionItem(t.duplicateRoutine, icon: PhosphorIconsRegular.copy, onTap: () {
- Navigator.pop(sheet);
- fit.duplicateRoutine(r.id);
- }),
- OptionItem(t.delete, icon: PhosphorIconsRegular.trash, danger: true, onTap: () async {
- Navigator.pop(sheet);
- final ok = await askConfirm(
- context,
- title: t.deleteRoutine,
- body: fit.routineTitle(r),
- confirmLabel: t.delete,
- danger: true,
- );
- if (ok) fit.deleteRoutine(r.id);
- }),
- ]),
- ],
- ),
- ),
- );
- }
-
void _pickRoutine(BuildContext context, int weekday) {
final gc = context.gc;
final routines = [
@@ -528,3 +473,58 @@ class RoutinesScreen extends StatelessWidget {
);
}
}
+
+void showRoutineMenu(BuildContext context, Routine r) {
+ final gc = context.gc;
+ showAppSheet<void>(
+ context: context,
+ backgroundColor: Colors.transparent,
+ builder: (sheet) => Container(
+ padding: sheetPad(sheet),
+ decoration: BoxDecoration(
+ color: gc.bgRaised,
+ borderRadius: const BorderRadius.vertical(top: Radius.circular(28)),
+ ),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ const SheetHandle(),
+ const SizedBox(height: 16),
+ SheetTitle(fit.routineTitle(r), subtitle: t.exerciseCount(r.exerciseIds.length)),
+ const SizedBox(height: 14),
+ OptionGroup([
+ OptionItem(t.editEntry, icon: PhosphorIconsRegular.pencilSimple, onTap: () {
+ Navigator.pop(sheet);
+ fit.openRoutine(r.id);
+ }),
+ if (r.exerciseIds.isNotEmpty)
+ OptionItem(titleCase(t.startWorkout), icon: PhosphorIconsRegular.play, onTap: () {
+ Navigator.pop(sheet);
+ fit.startRoutine(r);
+ }),
+ OptionItem(t.shareRoutine, icon: PhosphorIconsRegular.shareNetwork, onTap: () {
+ Navigator.pop(sheet);
+ sharePlan([r]);
+ }),
+ OptionItem(t.duplicateRoutine, icon: PhosphorIconsRegular.copy, onTap: () {
+ Navigator.pop(sheet);
+ fit.duplicateRoutine(r.id);
+ }),
+ OptionItem(t.delete, icon: PhosphorIconsRegular.trash, danger: true, onTap: () async {
+ Navigator.pop(sheet);
+ final ok = await askConfirm(
+ context,
+ title: t.deleteRoutine,
+ body: fit.routineTitle(r),
+ confirmLabel: t.delete,
+ danger: true,
+ );
+ if (ok) fit.deleteRoutine(r.id);
+ }),
+ ]),
+ ],
+ ),
+ ),
+ );
+}
diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart
index f339a24..ed178e2 100644
--- a/lib/screens/settings_screen.dart
+++ b/lib/screens/settings_screen.dart
@@ -335,6 +335,18 @@ class SettingsScreen extends StatelessWidget {
child: _prefRow(gc, PhosphorIconsRegular.sparkle, t.homeRecommended,
TinySwitch(on: fit.showRecommended), hint: t.recommendedRowHint),
),
+ GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: fit.toggleRoutineRow,
+ child: _prefRow(gc, PhosphorIconsRegular.folders, t.homeRoutines,
+ TinySwitch(on: fit.showRoutineRow), hint: t.homeRoutinesHint),
+ ),
+ GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: fit.toggleWeekStats,
+ child: _prefRow(gc, PhosphorIconsRegular.chartBar, t.homeWeekStats,
+ TinySwitch(on: fit.showWeekStats), hint: t.homeWeekStatsHint),
+ ),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: fit.toggleGamification,
diff --git a/lib/state/fit_state.dart b/lib/state/fit_state.dart
index 4fdcc7e..fbd1cb7 100644
--- a/lib/state/fit_state.dart
+++ b/lib/state/fit_state.dart
@@ -201,6 +201,8 @@ class FitState extends FitCore
bgDim = (data['bgDim'] as num?)?.toDouble() ?? 0.55;
showFocus = data['showFocus'] as bool? ?? true;
showRecommended = data['showRecs'] as bool? ?? true;
+ showWeekStats = data['showWeek'] as bool? ?? true;
+ showRoutineRow = data['showRoutineRow'] as bool? ?? true;
levelHints = data['levelHints'] as bool? ?? true;
toastSound = data['toastSound'] as bool? ?? true;
Beeper.instance.chimeOn = toastSound;
@@ -376,6 +378,8 @@ class FitState extends FitCore
'bgDim': bgDim,
'showFocus': showFocus,
'showRecs': showRecommended,
+ 'showWeek': showWeekStats,
+ 'showRoutineRow': showRoutineRow,
'levelHints': levelHints,
'toastSound': toastSound,
'heatLabels': heatmapLabels,
@@ -490,6 +494,8 @@ class FitState extends FitCore
profile = Profile();
showFocus = true;
showRecommended = true;
+ showWeekStats = true;
+ showRoutineRow = true;
levelHints = true;
toastSound = true;
Beeper.instance.chimeOn = true;
diff --git a/lib/state/routines_state.dart b/lib/state/routines_state.dart
index ae9222b..b01f269 100644
--- a/lib/state/routines_state.dart
+++ b/lib/state/routines_state.dart
@@ -35,6 +35,25 @@ mixin RoutinesState on FitCore, LibraryState {
Routine? get todayRoutine => routineOn(DateTime.now());
+ DateTime? lastDoneOf(String routineId) {
+ DateTime? last;
+ for (final s in sessions) {
+ if (s.routineId == routineId && (last == null || s.date.isAfter(last))) last = s.date;
+ }
+ return last;
+ }
+
+ List<Routine> get routinesByLastDone {
+ final last = {for (final r in routines) r.id: lastDoneOf(r.id)};
+ final order = {for (final (i, r) in routines.indexed) r.id: i};
+ return [...routines]..sort((a, b) {
+ final la = last[a.id], lb = last[b.id];
+ if (la != null && lb != null && la != lb) return lb.compareTo(la);
+ if ((la == null) != (lb == null)) return la == null ? 1 : -1;
+ return order[a.id]!.compareTo(order[b.id]!);
+ });
+ }
+
List<String> planIdsOn(int weekday) => [
?weeklyPlan[weekday],
if (multiPlan) ...?planExtras[weekday],
diff --git a/lib/state/settings_state.dart b/lib/state/settings_state.dart
index da23ac0..c2682fa 100644
--- a/lib/state/settings_state.dart
+++ b/lib/state/settings_state.dart
@@ -30,6 +30,8 @@ mixin SettingsState on FitCore, ToolsState, LibraryState {
double bgDim = 0.55;
bool showFocus = true;
bool showRecommended = true;
+ bool showWeekStats = true;
+ bool showRoutineRow = true;
bool levelHints = true;
bool toastSound = true;
bool heatmapLabels = true;
@@ -357,6 +359,18 @@ mixin SettingsState on FitCore, ToolsState, LibraryState {
notifyListeners();
}
+ void toggleWeekStats() {
+ showWeekStats = !showWeekStats;
+ _persist();
+ notifyListeners();
+ }
+
+ void toggleRoutineRow() {
+ showRoutineRow = !showRoutineRow;
+ _persist();
+ notifyListeners();
+ }
+
void toggleHeatmapLabels() {
heatmapLabels = !heatmapLabels;
_persist();
diff --git a/lib/state/stats_state.dart b/lib/state/stats_state.dart
index 4c09495..b5bc45a 100644
--- a/lib/state/stats_state.dart
+++ b/lib/state/stats_state.dart
@@ -403,6 +403,8 @@ mixin StatsState on FitCore, ToolsState, LibraryState, TimelineState {
double get volumeThisWeekKg => _thisWeekSessions.fold(0.0, (a, s) => a + s.volume);
+ int get weekSetCount => _thisWeekSessions.fold(0, (a, s) => a + s.setCount);
+
int get setsToday {
final t = _dayKey(DateTime.now());
return sessions.where((s) => _dayKey(s.date) == t).fold(0, (a, s) => a + s.setCount);
diff --git a/test/requests_08oct_test.dart b/test/requests_08oct_test.dart
new file mode 100644
index 0000000..db15e5d
--- /dev/null
+++ b/test/requests_08oct_test.dart
@@ -0,0 +1,128 @@
+import 'package:flutter_test/flutter_test.dart';
+import 'package:gymmane/models/workout.dart';
+import 'package:gymmane/services/local_store.dart';
+import 'package:gymmane/state/fit_state.dart';
+import 'package:shared_preferences/shared_preferences.dart';
+
+void main() {
+ TestWidgetsFlutterBinding.ensureInitialized();
+
+ late List<String> ids;
+
+ setUp(() async {
+ SharedPreferences.setMockInitialValues({});
+ await Store.instance.init();
+ fit.resetAllData();
+ fit.onboarded = true;
+ ids = fit.allExercises.take(6).map((e) => e.id).toList();
+ });
+
+ tearDown(() {
+ if (fit.session != null) fit.saveAndExit();
+ });
+
+ String routineWith(String name, List<String> exs) {
+ final r = fit.createRoutine(name);
+ for (final id in exs) {
+ fit.toggleRoutineExercise(r, id);
+ }
+ return r;
+ }
+
+ LoggedSession done(String routineId, int ago) => LoggedSession(
+ DateTime.now().subtract(Duration(days: ago)),
+ 1800,
+ [LoggedExercise(ids[0], 'x', 'chest', [LoggedSet(8, 60)])],
+ routineId: routineId,
+ );
+
+ group('#177 saltar dentro de una superserie', () {
+ void finish(int exIdx) {
+ for (final st in fit.session!.exercises[exIdx].sets) {
+ st.done = true;
+ }
+ }
+
+ test('la flecha sale de la cadena como al completar la serie', () {
+ routineWith('Cadena', ids);
+ fit.startRoutine(fit.routines.single);
+ final s = fit.session!;
+ for (var i = 0; i < 4; i++) {
+ s.exercises[i].linkedNext = true;
+ }
+ for (final i in [0, 1, 3, 4]) {
+ finish(i);
+ }
+ s.currentIndex = 2;
+
+ fit.nextExercise();
+ expect(s.currentIndex, 5);
+ });
+
+ test('dentro de la cadena va al siguiente que aún tiene series', () {
+ routineWith('Cadena', ids);
+ fit.startRoutine(fit.routines.single);
+ final s = fit.session!;
+ for (var i = 0; i < 4; i++) {
+ s.exercises[i].linkedNext = true;
+ }
+ finish(1);
+ s.currentIndex = 0;
+
+ fit.nextExercise();
+ expect(s.currentIndex, 2);
+ });
+
+ test('fuera de una cadena sigue yendo al siguiente de la lista', () {
+ routineWith('Suelta', ids.take(3).toList());
+ fit.startRoutine(fit.routines.single);
+ fit.nextExercise();
+ expect(fit.session!.currentIndex, 1);
+ });
+ });
+
+ group('#174 rutina de hoy hecha', () {
+ test('tras hacerla no queda nada pendiente hoy', () {
+ final r = routineWith('Básica', ids.take(2).toList());
+ fit.weeklyPlan[DateTime.now().weekday] = r;
+ expect(fit.pendingRoutinesOn(DateTime.now()).map((e) => e.id), [r]);
+
+ fit.sessions.add(done(r, 0));
+ expect(fit.pendingRoutinesOn(DateTime.now()), isEmpty);
+ expect(fit.todayRoutine?.id, r);
+ });
+ });
+
+ group('#176 rutinas en inicio', () {
+ test('la última hecha va primero y las nunca hechas al final en su orden', () {
+ final a = routineWith('A', [ids[0]]);
+ final b = routineWith('B', [ids[1]]);
+ final c = routineWith('C', [ids[2]]);
+ final d = routineWith('D', [ids[3]]);
+ fit.sessions.addAll([done(a, 5), done(c, 1), done(a, 9)]);
+
+ expect(fit.routinesByLastDone.map((r) => r.id), [c, a, b, d]);
+ expect(fit.lastDoneOf(b), isNull);
+ });
+ });
+
+ group('#175 ajustes de inicio', () {
+ test('las dos tarjetas se pueden quitar y se recuerdan', () async {
+ expect(fit.showWeekStats, isTrue);
+ expect(fit.showRoutineRow, isTrue);
+ fit.toggleWeekStats();
+ fit.toggleRoutineRow();
+ fit.persistNow();
+ fit.loadFromStore();
+ expect(fit.showWeekStats, isFalse);
+ expect(fit.showRoutineRow, isFalse);
+ });
+
+ test('las series de la tarjeta semanal son las de la semana', () {
+ fit.sessions.add(LoggedSession(DateTime.now(), 600, [
+ LoggedExercise(ids[0], 'x', 'chest', [LoggedSet(8, 60), LoggedSet(8, 60)]),
+ ]));
+ expect(fit.weekSetCount, 2);
+ });
+ });
+}