diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index b8e61ce92..e5d6d0c2b 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -12,14 +12,15 @@ jobs: uses: actions/checkout@v4 - name: Setup Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: - java-version: 17.x + java-version: '17' + distribution: 'oracle' - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3 + ruby-version: '3.2' - name: Setup Flutter uses: subosito/flutter-action@v2 @@ -63,7 +64,7 @@ jobs: flutter build linux --release cd flatpak/scripts dart pub get - dart flatpak_packager.dart --meta ../flatpak_meta.json --github + dart flatpak_packager.dart --meta ../flatpak_meta.json --github --addTodaysVersion ${{ env.VERSION }} - name: Build AAB run: flutter build appbundle --release @@ -71,9 +72,9 @@ jobs: WGER_API_KEY: ${{ secrets.WGER_API_KEY }} - name: Upload build to Play Store - uses: maierj/fastlane-action@v3.0.0 - with: - lane: production + run: | + bundle install + bundle exec fastlane android production - name: Make Github release uses: softprops/action-gh-release@v1 @@ -120,6 +121,6 @@ jobs: git add pubspec.yaml git commit -m "Bump version to $( flutter pub run cider version )" git tag ${{ env.VERSION }} - git push ${{ env.VERSION }} - git push --delete ${{ env.VERSION_V }} + git push origin ${{ env.VERSION }} + git push origin --delete ${{ env.VERSION_V }} git push \ No newline at end of file diff --git a/AUTHORS.md b/AUTHORS.md index cbcbda3e7..b617a4a7c 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -23,9 +23,14 @@ - artchiee - - Tejas Bir Singh - - Abhishek Saini - +- Hanaa Allohibi - +- Shey Alnasrawi - ## Translators +- Saudi Arabian + - Hanaa Allohibi + - German - mondstern (2) diff --git a/Gemfile.lock b/Gemfile.lock index c8df7aea0..e0b3d0764 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,25 +3,25 @@ GEM specs: CFPropertyList (3.0.6) rexml - addressable (2.8.5) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) artifactory (3.0.15) atomos (0.1.3) - aws-eventstream (1.2.0) - aws-partitions (1.853.0) - aws-sdk-core (3.187.0) - aws-eventstream (~> 1, >= 1.0.2) + aws-eventstream (1.3.0) + aws-partitions (1.877.0) + aws-sdk-core (3.190.2) + aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) - aws-sigv4 (~> 1.5) + aws-sigv4 (~> 1.8) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.72.0) - aws-sdk-core (~> 3, >= 3.184.0) + aws-sdk-kms (1.76.0) + aws-sdk-core (~> 3, >= 3.188.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.137.0) - aws-sdk-core (~> 3, >= 3.181.0) + aws-sdk-s3 (1.142.0) + aws-sdk-core (~> 3, >= 3.189.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.6) - aws-sigv4 (1.6.1) + aws-sigv4 (~> 1.8) + aws-sigv4 (1.8.0) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) claide (1.1.0) @@ -32,10 +32,10 @@ GEM declarative (0.0.20) digest-crc (0.6.5) rake (>= 12.0.0, < 14.0.0) - domain_name (0.6.20231109) + domain_name (0.6.20240107) dotenv (2.8.1) emoji_regex (3.2.3) - excon (0.104.0) + excon (0.109.0) faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -64,8 +64,8 @@ GEM faraday-retry (1.0.3) faraday_middleware (1.2.0) faraday (~> 1.0) - fastimage (2.2.7) - fastlane (2.217.0) + fastimage (2.3.0) + fastlane (2.219.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -84,6 +84,7 @@ GEM gh_inspector (>= 1.1.2, < 2.0.0) google-apis-androidpublisher_v3 (~> 0.3) google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-env (>= 1.6.0, < 2.0.0) google-cloud-storage (~> 1.31) highline (~> 2.0) http-cookie (~> 1.0.5) @@ -92,7 +93,7 @@ GEM mini_magick (>= 4.9.4, < 5.0.0) multipart-post (>= 2.0.0, < 3.0.0) naturally (~> 2.2) - optparse (~> 0.1.1) + optparse (>= 0.1.1) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) security (= 0.1.3) @@ -107,7 +108,7 @@ GEM xcpretty-travis-formatter (>= 0.0.3) fastlane-plugin-versioning (0.5.2) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.52.0) + google-apis-androidpublisher_v3 (0.54.0) google-apis-core (>= 0.11.0, < 2.a) google-apis-core (0.11.2) addressable (~> 2.5, >= 2.5.1) @@ -122,19 +123,19 @@ GEM google-apis-core (>= 0.11.0, < 2.a) google-apis-playcustomapp_v1 (0.13.0) google-apis-core (>= 0.11.0, < 2.a) - google-apis-storage_v1 (0.29.0) + google-apis-storage_v1 (0.31.0) google-apis-core (>= 0.11.0, < 2.a) - google-cloud-core (1.6.0) - google-cloud-env (~> 1.0) + google-cloud-core (1.6.1) + google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) google-cloud-env (1.6.0) faraday (>= 0.17.3, < 3.0) google-cloud-errors (1.3.1) - google-cloud-storage (1.45.0) + google-cloud-storage (1.47.0) addressable (~> 2.8) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.29.0) + google-apis-storage_v1 (~> 0.31.0) google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) @@ -149,7 +150,7 @@ GEM domain_name (~> 0.5) httpclient (2.8.3) jmespath (1.6.2) - json (2.6.3) + json (2.7.1) jwt (2.7.1) mini_magick (4.12.0) mini_mime (1.1.5) @@ -157,9 +158,9 @@ GEM multipart-post (2.3.0) nanaimo (0.3.0) naturally (2.2.1) - optparse (0.1.1) + optparse (0.4.0) os (1.1.4) - plist (3.7.0) + plist (3.7.1) public_suffix (5.0.4) rake (13.1.0) representable (3.2.0) @@ -185,7 +186,7 @@ GEM unicode-display_width (>= 1.1.1, < 3) trailblazer-option (0.1.2) tty-cursor (0.7.1) - tty-screen (0.8.1) + tty-screen (0.8.2) tty-spinner (0.9.3) tty-cursor (~> 0.7) uber (0.1.0) diff --git a/README.md b/README.md index d0164856b..d9f2a5b08 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,11 @@ If you want to contribute, hop on the Discord server and say hi!

- + - + - +

## Installation @@ -40,30 +40,31 @@ Alternatively, you can use the test server (the db is reset every day): ### 2 -Install Flutter, and all its dependencies, and create a new virtual device: +Install Flutter and all its dependencies, and create a new virtual device: . The app currently uses flutter 3.16 ### 3 +The application will complain about an API key not being set. You can just +ignore this during development, this is only important if you want to register +directly over the app. If you just want to login, you can skip this section. -Create a new file ``wger.properties`` in ``fastlane/metadata/envfiles/``: +If you want to register directly over the app, you need to set a user on the backend +that is allowed to do this. For this, create/register a new user, generate an api key +and run ``python3 manage.py add-user-rest theusername`` (you can later list all the +registered users with ``python3 manage.py list-users-api``). + +Then create a new file ``wger.properties`` in ``fastlane/metadata/envfiles/`` and +add the key: ```properties WGER_API_KEY=123456 ``` -On Linux and macOS, add these as environment variables, e.g. by running the `source` +Alternatively, add the key as an environment variables, e.g. by running the `source` command on the file. -To just run/develop the app it only needs to have any value for WGER_API_KEY, but -you need a correct value if you want to register via the app. For this, you need -to allow (a probably dedicated) user on the wger server to register users on its -behalf. For this, generate an API KEY by visiting -on your local instance and then run ``python3 manage.py add-user-rest the username`` - -You can later list all the registered users with: ``python3 manage.py list-users-api`` - ### 4 Start the application with ``flutter run`` or use your IDE @@ -74,7 +75,7 @@ You can run the tests with the ``flutter test`` ## Translation -Translate the app to your language on [Weblate](https://hosted.weblate.org/engage/wger/). +Translate the app to your language on [Weblate](https://hosted.weblate.org/engage/wger/). [![translation status](https://hosted.weblate.org/widgets/wger/-/mobile/multi-blue.svg)](https://hosted.weblate.org/engage/wger/) diff --git a/fastlane/metadata/android/ca/images/phoneScreenshots/01 - dashboard.png b/fastlane/metadata/android/ca/images/phoneScreenshots/01 - dashboard.png index d3c5fff70..94309dd1a 100644 Binary files a/fastlane/metadata/android/ca/images/phoneScreenshots/01 - dashboard.png and b/fastlane/metadata/android/ca/images/phoneScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/ca/images/phoneScreenshots/02 - workout detail.png b/fastlane/metadata/android/ca/images/phoneScreenshots/02 - workout detail.png index dde86efc2..6fe046a85 100644 Binary files a/fastlane/metadata/android/ca/images/phoneScreenshots/02 - workout detail.png and b/fastlane/metadata/android/ca/images/phoneScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/ca/images/phoneScreenshots/03 - gym mode.png b/fastlane/metadata/android/ca/images/phoneScreenshots/03 - gym mode.png index c4eb428cf..35ec1a786 100644 Binary files a/fastlane/metadata/android/ca/images/phoneScreenshots/03 - gym mode.png and b/fastlane/metadata/android/ca/images/phoneScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/ca/images/phoneScreenshots/04 - measurements.png b/fastlane/metadata/android/ca/images/phoneScreenshots/04 - measurements.png index 68a85478a..157f90d07 100644 Binary files a/fastlane/metadata/android/ca/images/phoneScreenshots/04 - measurements.png and b/fastlane/metadata/android/ca/images/phoneScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/ca/images/phoneScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/ca/images/phoneScreenshots/05 - nutritional plan.png index 8099005f2..05b9ff04e 100644 Binary files a/fastlane/metadata/android/ca/images/phoneScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/ca/images/phoneScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/ca/images/phoneScreenshots/06 - weight.png b/fastlane/metadata/android/ca/images/phoneScreenshots/06 - weight.png index 1d5197205..b6d9455db 100644 Binary files a/fastlane/metadata/android/ca/images/phoneScreenshots/06 - weight.png and b/fastlane/metadata/android/ca/images/phoneScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/ca/images/tenInchScreenshots/01 - dashboard.png b/fastlane/metadata/android/ca/images/tenInchScreenshots/01 - dashboard.png index 61372e4ee..279085696 100644 Binary files a/fastlane/metadata/android/ca/images/tenInchScreenshots/01 - dashboard.png and b/fastlane/metadata/android/ca/images/tenInchScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/ca/images/tenInchScreenshots/02 - workout detail.png b/fastlane/metadata/android/ca/images/tenInchScreenshots/02 - workout detail.png index 097161f07..445e575d9 100644 Binary files a/fastlane/metadata/android/ca/images/tenInchScreenshots/02 - workout detail.png and b/fastlane/metadata/android/ca/images/tenInchScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/ca/images/tenInchScreenshots/03 - gym mode.png b/fastlane/metadata/android/ca/images/tenInchScreenshots/03 - gym mode.png index fcf79544d..461e8f9b8 100644 Binary files a/fastlane/metadata/android/ca/images/tenInchScreenshots/03 - gym mode.png and b/fastlane/metadata/android/ca/images/tenInchScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/ca/images/tenInchScreenshots/04 - measurements.png b/fastlane/metadata/android/ca/images/tenInchScreenshots/04 - measurements.png index 808a77bca..42b37da31 100644 Binary files a/fastlane/metadata/android/ca/images/tenInchScreenshots/04 - measurements.png and b/fastlane/metadata/android/ca/images/tenInchScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/ca/images/tenInchScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/ca/images/tenInchScreenshots/05 - nutritional plan.png index 34f96c722..aa12a8d62 100644 Binary files a/fastlane/metadata/android/ca/images/tenInchScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/ca/images/tenInchScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/ca/images/tenInchScreenshots/06 - weight.png b/fastlane/metadata/android/ca/images/tenInchScreenshots/06 - weight.png index df0b3d918..f6419c32d 100644 Binary files a/fastlane/metadata/android/ca/images/tenInchScreenshots/06 - weight.png and b/fastlane/metadata/android/ca/images/tenInchScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/de-DE/images/phoneScreenshots/01 - dashboard.png b/fastlane/metadata/android/de-DE/images/phoneScreenshots/01 - dashboard.png index bf3a8ecef..83bef4fd4 100644 Binary files a/fastlane/metadata/android/de-DE/images/phoneScreenshots/01 - dashboard.png and b/fastlane/metadata/android/de-DE/images/phoneScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/de-DE/images/phoneScreenshots/02 - workout detail.png b/fastlane/metadata/android/de-DE/images/phoneScreenshots/02 - workout detail.png index 070220ea7..f30bdc397 100644 Binary files a/fastlane/metadata/android/de-DE/images/phoneScreenshots/02 - workout detail.png and b/fastlane/metadata/android/de-DE/images/phoneScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/de-DE/images/phoneScreenshots/03 - gym mode.png b/fastlane/metadata/android/de-DE/images/phoneScreenshots/03 - gym mode.png index d3ecec568..99cf8bb42 100644 Binary files a/fastlane/metadata/android/de-DE/images/phoneScreenshots/03 - gym mode.png and b/fastlane/metadata/android/de-DE/images/phoneScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/de-DE/images/phoneScreenshots/04 - measurements.png b/fastlane/metadata/android/de-DE/images/phoneScreenshots/04 - measurements.png index 36e3161d4..92bc04398 100644 Binary files a/fastlane/metadata/android/de-DE/images/phoneScreenshots/04 - measurements.png and b/fastlane/metadata/android/de-DE/images/phoneScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/de-DE/images/phoneScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/de-DE/images/phoneScreenshots/05 - nutritional plan.png index ad569028b..01df4c808 100644 Binary files a/fastlane/metadata/android/de-DE/images/phoneScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/de-DE/images/phoneScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/de-DE/images/phoneScreenshots/06 - weight.png b/fastlane/metadata/android/de-DE/images/phoneScreenshots/06 - weight.png index 681bbb0a8..634da29fb 100644 Binary files a/fastlane/metadata/android/de-DE/images/phoneScreenshots/06 - weight.png and b/fastlane/metadata/android/de-DE/images/phoneScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/de-DE/images/tenInchScreenshots/01 - dashboard.png b/fastlane/metadata/android/de-DE/images/tenInchScreenshots/01 - dashboard.png index 947f780a5..df1bca975 100644 Binary files a/fastlane/metadata/android/de-DE/images/tenInchScreenshots/01 - dashboard.png and b/fastlane/metadata/android/de-DE/images/tenInchScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/de-DE/images/tenInchScreenshots/02 - workout detail.png b/fastlane/metadata/android/de-DE/images/tenInchScreenshots/02 - workout detail.png index 6b5d1bb9b..1d5a6907f 100644 Binary files a/fastlane/metadata/android/de-DE/images/tenInchScreenshots/02 - workout detail.png and b/fastlane/metadata/android/de-DE/images/tenInchScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/de-DE/images/tenInchScreenshots/03 - gym mode.png b/fastlane/metadata/android/de-DE/images/tenInchScreenshots/03 - gym mode.png index 7daa84e79..3e33192de 100644 Binary files a/fastlane/metadata/android/de-DE/images/tenInchScreenshots/03 - gym mode.png and b/fastlane/metadata/android/de-DE/images/tenInchScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/de-DE/images/tenInchScreenshots/04 - measurements.png b/fastlane/metadata/android/de-DE/images/tenInchScreenshots/04 - measurements.png index c85c18e42..df92f03cc 100644 Binary files a/fastlane/metadata/android/de-DE/images/tenInchScreenshots/04 - measurements.png and b/fastlane/metadata/android/de-DE/images/tenInchScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/de-DE/images/tenInchScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/de-DE/images/tenInchScreenshots/05 - nutritional plan.png index 681db0c8a..e1fc22815 100644 Binary files a/fastlane/metadata/android/de-DE/images/tenInchScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/de-DE/images/tenInchScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/de-DE/images/tenInchScreenshots/06 - weight.png b/fastlane/metadata/android/de-DE/images/tenInchScreenshots/06 - weight.png index 059aa620b..0ac0f2faf 100644 Binary files a/fastlane/metadata/android/de-DE/images/tenInchScreenshots/06 - weight.png and b/fastlane/metadata/android/de-DE/images/tenInchScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/01 - dashboard.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/01 - dashboard.png index 9a6464239..591f9586b 100644 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/01 - dashboard.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/02 - workout detail.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/02 - workout detail.png index 4f099a138..d4052db6c 100644 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/02 - workout detail.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/03 - gym mode.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/03 - gym mode.png index 9bcf025e9..51c154780 100644 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/03 - gym mode.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/04 - measurements.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/04 - measurements.png index f92f02926..b48cad2c0 100644 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/04 - measurements.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/05 - nutritional plan.png index dfdd5f79e..7d20ebc98 100644 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/06 - weight.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/06 - weight.png index 174f3078b..943a98dd0 100644 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/06 - weight.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/en-US/images/tenInchScreenshots/01 - dashboard.png b/fastlane/metadata/android/en-US/images/tenInchScreenshots/01 - dashboard.png index c2d8c6d9b..486afa899 100644 Binary files a/fastlane/metadata/android/en-US/images/tenInchScreenshots/01 - dashboard.png and b/fastlane/metadata/android/en-US/images/tenInchScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/en-US/images/tenInchScreenshots/02 - workout detail.png b/fastlane/metadata/android/en-US/images/tenInchScreenshots/02 - workout detail.png index 1846b51ef..f94cbb22a 100644 Binary files a/fastlane/metadata/android/en-US/images/tenInchScreenshots/02 - workout detail.png and b/fastlane/metadata/android/en-US/images/tenInchScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/en-US/images/tenInchScreenshots/03 - gym mode.png b/fastlane/metadata/android/en-US/images/tenInchScreenshots/03 - gym mode.png index d2c1e70b5..825c85b04 100644 Binary files a/fastlane/metadata/android/en-US/images/tenInchScreenshots/03 - gym mode.png and b/fastlane/metadata/android/en-US/images/tenInchScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/en-US/images/tenInchScreenshots/04 - measurements.png b/fastlane/metadata/android/en-US/images/tenInchScreenshots/04 - measurements.png index 99e2fad8e..09d47fd84 100644 Binary files a/fastlane/metadata/android/en-US/images/tenInchScreenshots/04 - measurements.png and b/fastlane/metadata/android/en-US/images/tenInchScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/en-US/images/tenInchScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/en-US/images/tenInchScreenshots/05 - nutritional plan.png index d9b2dcfee..370eb1466 100644 Binary files a/fastlane/metadata/android/en-US/images/tenInchScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/en-US/images/tenInchScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/en-US/images/tenInchScreenshots/06 - weight.png b/fastlane/metadata/android/en-US/images/tenInchScreenshots/06 - weight.png index 8e56083e6..8dcfa0cac 100644 Binary files a/fastlane/metadata/android/en-US/images/tenInchScreenshots/06 - weight.png and b/fastlane/metadata/android/en-US/images/tenInchScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/es-ES/images/phoneScreenshots/01 - dashboard.png b/fastlane/metadata/android/es-ES/images/phoneScreenshots/01 - dashboard.png index 0e2fab9a6..a7707302c 100644 Binary files a/fastlane/metadata/android/es-ES/images/phoneScreenshots/01 - dashboard.png and b/fastlane/metadata/android/es-ES/images/phoneScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/es-ES/images/phoneScreenshots/02 - workout detail.png b/fastlane/metadata/android/es-ES/images/phoneScreenshots/02 - workout detail.png index 19053690c..e3b438f61 100644 Binary files a/fastlane/metadata/android/es-ES/images/phoneScreenshots/02 - workout detail.png and b/fastlane/metadata/android/es-ES/images/phoneScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/es-ES/images/phoneScreenshots/03 - gym mode.png b/fastlane/metadata/android/es-ES/images/phoneScreenshots/03 - gym mode.png index 0245db197..1318ae44a 100644 Binary files a/fastlane/metadata/android/es-ES/images/phoneScreenshots/03 - gym mode.png and b/fastlane/metadata/android/es-ES/images/phoneScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/es-ES/images/phoneScreenshots/04 - measurements.png b/fastlane/metadata/android/es-ES/images/phoneScreenshots/04 - measurements.png index e21483d23..191d1337c 100644 Binary files a/fastlane/metadata/android/es-ES/images/phoneScreenshots/04 - measurements.png and b/fastlane/metadata/android/es-ES/images/phoneScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/es-ES/images/phoneScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/es-ES/images/phoneScreenshots/05 - nutritional plan.png index c830d5632..76fd0663c 100644 Binary files a/fastlane/metadata/android/es-ES/images/phoneScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/es-ES/images/phoneScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/es-ES/images/phoneScreenshots/06 - weight.png b/fastlane/metadata/android/es-ES/images/phoneScreenshots/06 - weight.png index 2f0a79370..7d3f95156 100644 Binary files a/fastlane/metadata/android/es-ES/images/phoneScreenshots/06 - weight.png and b/fastlane/metadata/android/es-ES/images/phoneScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/es-ES/images/tenInchScreenshots/01 - dashboard.png b/fastlane/metadata/android/es-ES/images/tenInchScreenshots/01 - dashboard.png index 8b7205e01..0ad318655 100644 Binary files a/fastlane/metadata/android/es-ES/images/tenInchScreenshots/01 - dashboard.png and b/fastlane/metadata/android/es-ES/images/tenInchScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/es-ES/images/tenInchScreenshots/02 - workout detail.png b/fastlane/metadata/android/es-ES/images/tenInchScreenshots/02 - workout detail.png index 5db7020d3..2642a0d34 100644 Binary files a/fastlane/metadata/android/es-ES/images/tenInchScreenshots/02 - workout detail.png and b/fastlane/metadata/android/es-ES/images/tenInchScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/es-ES/images/tenInchScreenshots/03 - gym mode.png b/fastlane/metadata/android/es-ES/images/tenInchScreenshots/03 - gym mode.png index 7f044e3a0..c6ac74834 100644 Binary files a/fastlane/metadata/android/es-ES/images/tenInchScreenshots/03 - gym mode.png and b/fastlane/metadata/android/es-ES/images/tenInchScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/es-ES/images/tenInchScreenshots/04 - measurements.png b/fastlane/metadata/android/es-ES/images/tenInchScreenshots/04 - measurements.png index 959c6b1ea..689a2d20f 100644 Binary files a/fastlane/metadata/android/es-ES/images/tenInchScreenshots/04 - measurements.png and b/fastlane/metadata/android/es-ES/images/tenInchScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/es-ES/images/tenInchScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/es-ES/images/tenInchScreenshots/05 - nutritional plan.png index 1d4e48a38..28ad6f65f 100644 Binary files a/fastlane/metadata/android/es-ES/images/tenInchScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/es-ES/images/tenInchScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/es-ES/images/tenInchScreenshots/06 - weight.png b/fastlane/metadata/android/es-ES/images/tenInchScreenshots/06 - weight.png index 75c398c7e..700e746ec 100644 Binary files a/fastlane/metadata/android/es-ES/images/tenInchScreenshots/06 - weight.png and b/fastlane/metadata/android/es-ES/images/tenInchScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/fr-FR/images/phoneScreenshots/01 - dashboard.png b/fastlane/metadata/android/fr-FR/images/phoneScreenshots/01 - dashboard.png index 614385a73..1911c4b9a 100644 Binary files a/fastlane/metadata/android/fr-FR/images/phoneScreenshots/01 - dashboard.png and b/fastlane/metadata/android/fr-FR/images/phoneScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/fr-FR/images/phoneScreenshots/02 - workout detail.png b/fastlane/metadata/android/fr-FR/images/phoneScreenshots/02 - workout detail.png index f196593a0..09ba2e033 100644 Binary files a/fastlane/metadata/android/fr-FR/images/phoneScreenshots/02 - workout detail.png and b/fastlane/metadata/android/fr-FR/images/phoneScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/fr-FR/images/phoneScreenshots/03 - gym mode.png b/fastlane/metadata/android/fr-FR/images/phoneScreenshots/03 - gym mode.png index 7de86c3fe..e53727fad 100644 Binary files a/fastlane/metadata/android/fr-FR/images/phoneScreenshots/03 - gym mode.png and b/fastlane/metadata/android/fr-FR/images/phoneScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/fr-FR/images/phoneScreenshots/04 - measurements.png b/fastlane/metadata/android/fr-FR/images/phoneScreenshots/04 - measurements.png index b0f61a0c2..7811ff117 100644 Binary files a/fastlane/metadata/android/fr-FR/images/phoneScreenshots/04 - measurements.png and b/fastlane/metadata/android/fr-FR/images/phoneScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/fr-FR/images/phoneScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/fr-FR/images/phoneScreenshots/05 - nutritional plan.png index 9b856c1a1..2f3af9040 100644 Binary files a/fastlane/metadata/android/fr-FR/images/phoneScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/fr-FR/images/phoneScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/fr-FR/images/phoneScreenshots/06 - weight.png b/fastlane/metadata/android/fr-FR/images/phoneScreenshots/06 - weight.png index a90d5f752..82bf994ca 100644 Binary files a/fastlane/metadata/android/fr-FR/images/phoneScreenshots/06 - weight.png and b/fastlane/metadata/android/fr-FR/images/phoneScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/01 - dashboard.png b/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/01 - dashboard.png index 5a2065f01..0bc569fce 100644 Binary files a/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/01 - dashboard.png and b/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/02 - workout detail.png b/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/02 - workout detail.png index 9fbea689a..6fb043d43 100644 Binary files a/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/02 - workout detail.png and b/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/03 - gym mode.png b/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/03 - gym mode.png index f5f2f3551..2bbf89bf9 100644 Binary files a/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/03 - gym mode.png and b/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/04 - measurements.png b/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/04 - measurements.png index b907f735d..1b3a23fed 100644 Binary files a/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/04 - measurements.png and b/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/05 - nutritional plan.png index 17e487cfc..062a42cd5 100644 Binary files a/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/06 - weight.png b/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/06 - weight.png index 1bd13e2ce..87ee976b2 100644 Binary files a/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/06 - weight.png and b/fastlane/metadata/android/fr-FR/images/tenInchScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/hi-IN/images/phoneScreenshots/01 - dashboard.png b/fastlane/metadata/android/hi-IN/images/phoneScreenshots/01 - dashboard.png index 6424a7768..44a8673bc 100644 Binary files a/fastlane/metadata/android/hi-IN/images/phoneScreenshots/01 - dashboard.png and b/fastlane/metadata/android/hi-IN/images/phoneScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/hi-IN/images/phoneScreenshots/02 - workout detail.png b/fastlane/metadata/android/hi-IN/images/phoneScreenshots/02 - workout detail.png index 53633b505..1c10efc5c 100644 Binary files a/fastlane/metadata/android/hi-IN/images/phoneScreenshots/02 - workout detail.png and b/fastlane/metadata/android/hi-IN/images/phoneScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/hi-IN/images/phoneScreenshots/03 - gym mode.png b/fastlane/metadata/android/hi-IN/images/phoneScreenshots/03 - gym mode.png index 556e8d9f1..66d765a54 100644 Binary files a/fastlane/metadata/android/hi-IN/images/phoneScreenshots/03 - gym mode.png and b/fastlane/metadata/android/hi-IN/images/phoneScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/hi-IN/images/phoneScreenshots/04 - measurements.png b/fastlane/metadata/android/hi-IN/images/phoneScreenshots/04 - measurements.png index 37fe29b14..0ab424a76 100644 Binary files a/fastlane/metadata/android/hi-IN/images/phoneScreenshots/04 - measurements.png and b/fastlane/metadata/android/hi-IN/images/phoneScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/hi-IN/images/phoneScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/hi-IN/images/phoneScreenshots/05 - nutritional plan.png index fade0968e..60a06e731 100644 Binary files a/fastlane/metadata/android/hi-IN/images/phoneScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/hi-IN/images/phoneScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/hi-IN/images/phoneScreenshots/06 - weight.png b/fastlane/metadata/android/hi-IN/images/phoneScreenshots/06 - weight.png index 6fc7b59da..9f1609792 100644 Binary files a/fastlane/metadata/android/hi-IN/images/phoneScreenshots/06 - weight.png and b/fastlane/metadata/android/hi-IN/images/phoneScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/01 - dashboard.png b/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/01 - dashboard.png index 186619e3d..8cf19109d 100644 Binary files a/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/01 - dashboard.png and b/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/02 - workout detail.png b/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/02 - workout detail.png index e64e66963..599a84967 100644 Binary files a/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/02 - workout detail.png and b/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/03 - gym mode.png b/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/03 - gym mode.png index f6b42328f..831873652 100644 Binary files a/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/03 - gym mode.png and b/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/04 - measurements.png b/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/04 - measurements.png index 1d8864539..2800a1036 100644 Binary files a/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/04 - measurements.png and b/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/05 - nutritional plan.png index bbe6b5af3..09efe8516 100644 Binary files a/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/06 - weight.png b/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/06 - weight.png index efaa837eb..d45c1accf 100644 Binary files a/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/06 - weight.png and b/fastlane/metadata/android/hi-IN/images/tenInchScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/hr/images/phoneScreenshots/01 - dashboard.png b/fastlane/metadata/android/hr/images/phoneScreenshots/01 - dashboard.png index 610e9b171..0ca52983b 100644 Binary files a/fastlane/metadata/android/hr/images/phoneScreenshots/01 - dashboard.png and b/fastlane/metadata/android/hr/images/phoneScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/hr/images/phoneScreenshots/02 - workout detail.png b/fastlane/metadata/android/hr/images/phoneScreenshots/02 - workout detail.png index 83ed0bab8..9ef5d174b 100644 Binary files a/fastlane/metadata/android/hr/images/phoneScreenshots/02 - workout detail.png and b/fastlane/metadata/android/hr/images/phoneScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/hr/images/phoneScreenshots/03 - gym mode.png b/fastlane/metadata/android/hr/images/phoneScreenshots/03 - gym mode.png index 4483d31a4..98ac1539d 100644 Binary files a/fastlane/metadata/android/hr/images/phoneScreenshots/03 - gym mode.png and b/fastlane/metadata/android/hr/images/phoneScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/hr/images/phoneScreenshots/04 - measurements.png b/fastlane/metadata/android/hr/images/phoneScreenshots/04 - measurements.png index 043b8d8b7..7dafde013 100644 Binary files a/fastlane/metadata/android/hr/images/phoneScreenshots/04 - measurements.png and b/fastlane/metadata/android/hr/images/phoneScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/hr/images/phoneScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/hr/images/phoneScreenshots/05 - nutritional plan.png index 64a4cb305..cf64316d2 100644 Binary files a/fastlane/metadata/android/hr/images/phoneScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/hr/images/phoneScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/hr/images/phoneScreenshots/06 - weight.png b/fastlane/metadata/android/hr/images/phoneScreenshots/06 - weight.png index 56f2f84f4..0a299658f 100644 Binary files a/fastlane/metadata/android/hr/images/phoneScreenshots/06 - weight.png and b/fastlane/metadata/android/hr/images/phoneScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/hr/images/tenInchScreenshots/01 - dashboard.png b/fastlane/metadata/android/hr/images/tenInchScreenshots/01 - dashboard.png index a9af66e54..f289e4174 100644 Binary files a/fastlane/metadata/android/hr/images/tenInchScreenshots/01 - dashboard.png and b/fastlane/metadata/android/hr/images/tenInchScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/hr/images/tenInchScreenshots/02 - workout detail.png b/fastlane/metadata/android/hr/images/tenInchScreenshots/02 - workout detail.png index 089e1559e..e0e6269bf 100644 Binary files a/fastlane/metadata/android/hr/images/tenInchScreenshots/02 - workout detail.png and b/fastlane/metadata/android/hr/images/tenInchScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/hr/images/tenInchScreenshots/03 - gym mode.png b/fastlane/metadata/android/hr/images/tenInchScreenshots/03 - gym mode.png index 2addbe6e7..2d24f17ec 100644 Binary files a/fastlane/metadata/android/hr/images/tenInchScreenshots/03 - gym mode.png and b/fastlane/metadata/android/hr/images/tenInchScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/hr/images/tenInchScreenshots/04 - measurements.png b/fastlane/metadata/android/hr/images/tenInchScreenshots/04 - measurements.png index f1a563887..958bd135c 100644 Binary files a/fastlane/metadata/android/hr/images/tenInchScreenshots/04 - measurements.png and b/fastlane/metadata/android/hr/images/tenInchScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/hr/images/tenInchScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/hr/images/tenInchScreenshots/05 - nutritional plan.png index 89e57d238..08f4b0a64 100644 Binary files a/fastlane/metadata/android/hr/images/tenInchScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/hr/images/tenInchScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/hr/images/tenInchScreenshots/06 - weight.png b/fastlane/metadata/android/hr/images/tenInchScreenshots/06 - weight.png index 37fe0afa6..7291963c0 100644 Binary files a/fastlane/metadata/android/hr/images/tenInchScreenshots/06 - weight.png and b/fastlane/metadata/android/hr/images/tenInchScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/it-IT/images/phoneScreenshots/01 - dashboard.png b/fastlane/metadata/android/it-IT/images/phoneScreenshots/01 - dashboard.png index 96369bd38..bab882df4 100644 Binary files a/fastlane/metadata/android/it-IT/images/phoneScreenshots/01 - dashboard.png and b/fastlane/metadata/android/it-IT/images/phoneScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/it-IT/images/phoneScreenshots/02 - workout detail.png b/fastlane/metadata/android/it-IT/images/phoneScreenshots/02 - workout detail.png index 559cc8314..77362ce12 100644 Binary files a/fastlane/metadata/android/it-IT/images/phoneScreenshots/02 - workout detail.png and b/fastlane/metadata/android/it-IT/images/phoneScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/it-IT/images/phoneScreenshots/03 - gym mode.png b/fastlane/metadata/android/it-IT/images/phoneScreenshots/03 - gym mode.png index f7cb9e106..1968f99e7 100644 Binary files a/fastlane/metadata/android/it-IT/images/phoneScreenshots/03 - gym mode.png and b/fastlane/metadata/android/it-IT/images/phoneScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/it-IT/images/phoneScreenshots/04 - measurements.png b/fastlane/metadata/android/it-IT/images/phoneScreenshots/04 - measurements.png index 0a6f75bf9..fd8ec59b6 100644 Binary files a/fastlane/metadata/android/it-IT/images/phoneScreenshots/04 - measurements.png and b/fastlane/metadata/android/it-IT/images/phoneScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/it-IT/images/phoneScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/it-IT/images/phoneScreenshots/05 - nutritional plan.png index ee0d5a464..ec303fcda 100644 Binary files a/fastlane/metadata/android/it-IT/images/phoneScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/it-IT/images/phoneScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/it-IT/images/phoneScreenshots/06 - weight.png b/fastlane/metadata/android/it-IT/images/phoneScreenshots/06 - weight.png index 009444be1..277d4f490 100644 Binary files a/fastlane/metadata/android/it-IT/images/phoneScreenshots/06 - weight.png and b/fastlane/metadata/android/it-IT/images/phoneScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/it-IT/images/tenInchScreenshots/01 - dashboard.png b/fastlane/metadata/android/it-IT/images/tenInchScreenshots/01 - dashboard.png index 5aba2d211..aef866a25 100644 Binary files a/fastlane/metadata/android/it-IT/images/tenInchScreenshots/01 - dashboard.png and b/fastlane/metadata/android/it-IT/images/tenInchScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/it-IT/images/tenInchScreenshots/02 - workout detail.png b/fastlane/metadata/android/it-IT/images/tenInchScreenshots/02 - workout detail.png index 7252a3e5b..c2f2e4692 100644 Binary files a/fastlane/metadata/android/it-IT/images/tenInchScreenshots/02 - workout detail.png and b/fastlane/metadata/android/it-IT/images/tenInchScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/it-IT/images/tenInchScreenshots/03 - gym mode.png b/fastlane/metadata/android/it-IT/images/tenInchScreenshots/03 - gym mode.png index d452dd639..ca36f3e9f 100644 Binary files a/fastlane/metadata/android/it-IT/images/tenInchScreenshots/03 - gym mode.png and b/fastlane/metadata/android/it-IT/images/tenInchScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/it-IT/images/tenInchScreenshots/04 - measurements.png b/fastlane/metadata/android/it-IT/images/tenInchScreenshots/04 - measurements.png index 7030caaae..52f05aafa 100644 Binary files a/fastlane/metadata/android/it-IT/images/tenInchScreenshots/04 - measurements.png and b/fastlane/metadata/android/it-IT/images/tenInchScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/it-IT/images/tenInchScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/it-IT/images/tenInchScreenshots/05 - nutritional plan.png index 683286a39..8198830a3 100644 Binary files a/fastlane/metadata/android/it-IT/images/tenInchScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/it-IT/images/tenInchScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/it-IT/images/tenInchScreenshots/06 - weight.png b/fastlane/metadata/android/it-IT/images/tenInchScreenshots/06 - weight.png index b0e9a213f..8044c26b9 100644 Binary files a/fastlane/metadata/android/it-IT/images/tenInchScreenshots/06 - weight.png and b/fastlane/metadata/android/it-IT/images/tenInchScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/nb-NO/images/phoneScreenshots/01 - dashboard.png b/fastlane/metadata/android/nb-NO/images/phoneScreenshots/01 - dashboard.png index 48e04cfde..23bbd7caa 100644 Binary files a/fastlane/metadata/android/nb-NO/images/phoneScreenshots/01 - dashboard.png and b/fastlane/metadata/android/nb-NO/images/phoneScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/nb-NO/images/phoneScreenshots/02 - workout detail.png b/fastlane/metadata/android/nb-NO/images/phoneScreenshots/02 - workout detail.png index d374796c0..a31ea7f49 100644 Binary files a/fastlane/metadata/android/nb-NO/images/phoneScreenshots/02 - workout detail.png and b/fastlane/metadata/android/nb-NO/images/phoneScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/nb-NO/images/phoneScreenshots/03 - gym mode.png b/fastlane/metadata/android/nb-NO/images/phoneScreenshots/03 - gym mode.png index 9190a4deb..51c154780 100644 Binary files a/fastlane/metadata/android/nb-NO/images/phoneScreenshots/03 - gym mode.png and b/fastlane/metadata/android/nb-NO/images/phoneScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/nb-NO/images/phoneScreenshots/04 - measurements.png b/fastlane/metadata/android/nb-NO/images/phoneScreenshots/04 - measurements.png index 4a986a802..2e5a17304 100644 Binary files a/fastlane/metadata/android/nb-NO/images/phoneScreenshots/04 - measurements.png and b/fastlane/metadata/android/nb-NO/images/phoneScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/nb-NO/images/phoneScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/nb-NO/images/phoneScreenshots/05 - nutritional plan.png index 56d3b93fb..4998bf60e 100644 Binary files a/fastlane/metadata/android/nb-NO/images/phoneScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/nb-NO/images/phoneScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/nb-NO/images/phoneScreenshots/06 - weight.png b/fastlane/metadata/android/nb-NO/images/phoneScreenshots/06 - weight.png index 4980efb8c..709723a55 100644 Binary files a/fastlane/metadata/android/nb-NO/images/phoneScreenshots/06 - weight.png and b/fastlane/metadata/android/nb-NO/images/phoneScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/01 - dashboard.png b/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/01 - dashboard.png index 850463cfa..4de775fe1 100644 Binary files a/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/01 - dashboard.png and b/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/02 - workout detail.png b/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/02 - workout detail.png index b7af8d5a1..5c2917502 100644 Binary files a/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/02 - workout detail.png and b/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/03 - gym mode.png b/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/03 - gym mode.png index d2c1e70b5..825c85b04 100644 Binary files a/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/03 - gym mode.png and b/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/04 - measurements.png b/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/04 - measurements.png index 48ab77970..a81fcab72 100644 Binary files a/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/04 - measurements.png and b/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/05 - nutritional plan.png index 6b49ea409..9f6032cda 100644 Binary files a/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/06 - weight.png b/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/06 - weight.png index 86e9bd1fb..ecad5360c 100644 Binary files a/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/06 - weight.png and b/fastlane/metadata/android/nb-NO/images/tenInchScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/pl-PL/images/phoneScreenshots/01 - dashboard.png b/fastlane/metadata/android/pl-PL/images/phoneScreenshots/01 - dashboard.png index 1cd483b52..8083a3e9f 100644 Binary files a/fastlane/metadata/android/pl-PL/images/phoneScreenshots/01 - dashboard.png and b/fastlane/metadata/android/pl-PL/images/phoneScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/pl-PL/images/phoneScreenshots/02 - workout detail.png b/fastlane/metadata/android/pl-PL/images/phoneScreenshots/02 - workout detail.png index 819a449ac..2d881923c 100644 Binary files a/fastlane/metadata/android/pl-PL/images/phoneScreenshots/02 - workout detail.png and b/fastlane/metadata/android/pl-PL/images/phoneScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/pl-PL/images/phoneScreenshots/03 - gym mode.png b/fastlane/metadata/android/pl-PL/images/phoneScreenshots/03 - gym mode.png index be469d83e..47882b268 100644 Binary files a/fastlane/metadata/android/pl-PL/images/phoneScreenshots/03 - gym mode.png and b/fastlane/metadata/android/pl-PL/images/phoneScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/pl-PL/images/phoneScreenshots/04 - measurements.png b/fastlane/metadata/android/pl-PL/images/phoneScreenshots/04 - measurements.png index a51163834..52e0dcfd3 100644 Binary files a/fastlane/metadata/android/pl-PL/images/phoneScreenshots/04 - measurements.png and b/fastlane/metadata/android/pl-PL/images/phoneScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/pl-PL/images/phoneScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/pl-PL/images/phoneScreenshots/05 - nutritional plan.png index 617c5e0cb..cdef0d8a4 100644 Binary files a/fastlane/metadata/android/pl-PL/images/phoneScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/pl-PL/images/phoneScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/pl-PL/images/phoneScreenshots/06 - weight.png b/fastlane/metadata/android/pl-PL/images/phoneScreenshots/06 - weight.png index 11dbaefe6..c4cba25be 100644 Binary files a/fastlane/metadata/android/pl-PL/images/phoneScreenshots/06 - weight.png and b/fastlane/metadata/android/pl-PL/images/phoneScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/01 - dashboard.png b/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/01 - dashboard.png index d835451c6..624ee0fda 100644 Binary files a/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/01 - dashboard.png and b/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/02 - workout detail.png b/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/02 - workout detail.png index 9f9780c53..031ad0d91 100644 Binary files a/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/02 - workout detail.png and b/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/03 - gym mode.png b/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/03 - gym mode.png index e34004204..fc382ac2a 100644 Binary files a/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/03 - gym mode.png and b/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/04 - measurements.png b/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/04 - measurements.png index 81fef6e77..957698f34 100644 Binary files a/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/04 - measurements.png and b/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/05 - nutritional plan.png index 1eb5b30d2..203ab3d28 100644 Binary files a/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/06 - weight.png b/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/06 - weight.png index aeeb65578..1bafd3e4c 100644 Binary files a/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/06 - weight.png and b/fastlane/metadata/android/pl-PL/images/tenInchScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/pt-BR/images/phoneScreenshots/01 - dashboard.png b/fastlane/metadata/android/pt-BR/images/phoneScreenshots/01 - dashboard.png index 71e6f3690..c5a2f9ae0 100644 Binary files a/fastlane/metadata/android/pt-BR/images/phoneScreenshots/01 - dashboard.png and b/fastlane/metadata/android/pt-BR/images/phoneScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/pt-BR/images/phoneScreenshots/02 - workout detail.png b/fastlane/metadata/android/pt-BR/images/phoneScreenshots/02 - workout detail.png index ca0e53e95..e12183f39 100644 Binary files a/fastlane/metadata/android/pt-BR/images/phoneScreenshots/02 - workout detail.png and b/fastlane/metadata/android/pt-BR/images/phoneScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/pt-BR/images/phoneScreenshots/03 - gym mode.png b/fastlane/metadata/android/pt-BR/images/phoneScreenshots/03 - gym mode.png index b64be4fbe..0a8b75184 100644 Binary files a/fastlane/metadata/android/pt-BR/images/phoneScreenshots/03 - gym mode.png and b/fastlane/metadata/android/pt-BR/images/phoneScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/pt-BR/images/phoneScreenshots/04 - measurements.png b/fastlane/metadata/android/pt-BR/images/phoneScreenshots/04 - measurements.png index 9b54dad2b..c2b28f208 100644 Binary files a/fastlane/metadata/android/pt-BR/images/phoneScreenshots/04 - measurements.png and b/fastlane/metadata/android/pt-BR/images/phoneScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/pt-BR/images/phoneScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/pt-BR/images/phoneScreenshots/05 - nutritional plan.png index 1d8b4471f..a5dd947da 100644 Binary files a/fastlane/metadata/android/pt-BR/images/phoneScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/pt-BR/images/phoneScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/pt-BR/images/phoneScreenshots/06 - weight.png b/fastlane/metadata/android/pt-BR/images/phoneScreenshots/06 - weight.png index dd836bdd3..3eae44a48 100644 Binary files a/fastlane/metadata/android/pt-BR/images/phoneScreenshots/06 - weight.png and b/fastlane/metadata/android/pt-BR/images/phoneScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/01 - dashboard.png b/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/01 - dashboard.png index b194ca8b4..81875ef5c 100644 Binary files a/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/01 - dashboard.png and b/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/02 - workout detail.png b/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/02 - workout detail.png index 947e9d549..e5511614b 100644 Binary files a/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/02 - workout detail.png and b/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/03 - gym mode.png b/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/03 - gym mode.png index b5a9b5120..bdbf913be 100644 Binary files a/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/03 - gym mode.png and b/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/04 - measurements.png b/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/04 - measurements.png index 98245beae..1d254684b 100644 Binary files a/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/04 - measurements.png and b/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/05 - nutritional plan.png index 4198415b2..a92d67878 100644 Binary files a/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/06 - weight.png b/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/06 - weight.png index ce03527be..a082674b4 100644 Binary files a/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/06 - weight.png and b/fastlane/metadata/android/pt-BR/images/tenInchScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/ru-RU/images/phoneScreenshots/01 - dashboard.png b/fastlane/metadata/android/ru-RU/images/phoneScreenshots/01 - dashboard.png index de3acf8b6..278058daf 100644 Binary files a/fastlane/metadata/android/ru-RU/images/phoneScreenshots/01 - dashboard.png and b/fastlane/metadata/android/ru-RU/images/phoneScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/ru-RU/images/phoneScreenshots/02 - workout detail.png b/fastlane/metadata/android/ru-RU/images/phoneScreenshots/02 - workout detail.png index ea2a9803e..7a70103ef 100644 Binary files a/fastlane/metadata/android/ru-RU/images/phoneScreenshots/02 - workout detail.png and b/fastlane/metadata/android/ru-RU/images/phoneScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/ru-RU/images/phoneScreenshots/03 - gym mode.png b/fastlane/metadata/android/ru-RU/images/phoneScreenshots/03 - gym mode.png index 9fa452b26..2320f167a 100644 Binary files a/fastlane/metadata/android/ru-RU/images/phoneScreenshots/03 - gym mode.png and b/fastlane/metadata/android/ru-RU/images/phoneScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/ru-RU/images/phoneScreenshots/04 - measurements.png b/fastlane/metadata/android/ru-RU/images/phoneScreenshots/04 - measurements.png index 456ba8db9..14ea73eab 100644 Binary files a/fastlane/metadata/android/ru-RU/images/phoneScreenshots/04 - measurements.png and b/fastlane/metadata/android/ru-RU/images/phoneScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/ru-RU/images/phoneScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/ru-RU/images/phoneScreenshots/05 - nutritional plan.png index b7f005228..b4eef8102 100644 Binary files a/fastlane/metadata/android/ru-RU/images/phoneScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/ru-RU/images/phoneScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/ru-RU/images/phoneScreenshots/06 - weight.png b/fastlane/metadata/android/ru-RU/images/phoneScreenshots/06 - weight.png index 263d102f2..2b2588012 100644 Binary files a/fastlane/metadata/android/ru-RU/images/phoneScreenshots/06 - weight.png and b/fastlane/metadata/android/ru-RU/images/phoneScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/01 - dashboard.png b/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/01 - dashboard.png index b61252b79..092aa6b7f 100644 Binary files a/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/01 - dashboard.png and b/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/02 - workout detail.png b/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/02 - workout detail.png index 543197484..9c295b601 100644 Binary files a/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/02 - workout detail.png and b/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/03 - gym mode.png b/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/03 - gym mode.png index 560499b87..d3b06a158 100644 Binary files a/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/03 - gym mode.png and b/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/04 - measurements.png b/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/04 - measurements.png index 59c48ad59..9a818f6d0 100644 Binary files a/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/04 - measurements.png and b/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/05 - nutritional plan.png index 80f6313dd..bfb4795a1 100644 Binary files a/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/06 - weight.png b/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/06 - weight.png index 032318fba..36a31f505 100644 Binary files a/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/06 - weight.png and b/fastlane/metadata/android/ru-RU/images/tenInchScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/tr-TR/images/phoneScreenshots/01 - dashboard.png b/fastlane/metadata/android/tr-TR/images/phoneScreenshots/01 - dashboard.png index 13c48997f..f79654c20 100644 Binary files a/fastlane/metadata/android/tr-TR/images/phoneScreenshots/01 - dashboard.png and b/fastlane/metadata/android/tr-TR/images/phoneScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/tr-TR/images/phoneScreenshots/02 - workout detail.png b/fastlane/metadata/android/tr-TR/images/phoneScreenshots/02 - workout detail.png index 3b17cab52..fd1a4703f 100644 Binary files a/fastlane/metadata/android/tr-TR/images/phoneScreenshots/02 - workout detail.png and b/fastlane/metadata/android/tr-TR/images/phoneScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/tr-TR/images/phoneScreenshots/03 - gym mode.png b/fastlane/metadata/android/tr-TR/images/phoneScreenshots/03 - gym mode.png index 9d2e27547..fb1b85870 100644 Binary files a/fastlane/metadata/android/tr-TR/images/phoneScreenshots/03 - gym mode.png and b/fastlane/metadata/android/tr-TR/images/phoneScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/tr-TR/images/phoneScreenshots/04 - measurements.png b/fastlane/metadata/android/tr-TR/images/phoneScreenshots/04 - measurements.png index d8ece96b8..7296b352f 100644 Binary files a/fastlane/metadata/android/tr-TR/images/phoneScreenshots/04 - measurements.png and b/fastlane/metadata/android/tr-TR/images/phoneScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/tr-TR/images/phoneScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/tr-TR/images/phoneScreenshots/05 - nutritional plan.png index 5b345f02e..f7027918e 100644 Binary files a/fastlane/metadata/android/tr-TR/images/phoneScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/tr-TR/images/phoneScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/tr-TR/images/phoneScreenshots/06 - weight.png b/fastlane/metadata/android/tr-TR/images/phoneScreenshots/06 - weight.png index fb0635956..11e4f81cd 100644 Binary files a/fastlane/metadata/android/tr-TR/images/phoneScreenshots/06 - weight.png and b/fastlane/metadata/android/tr-TR/images/phoneScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/01 - dashboard.png b/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/01 - dashboard.png index 8ec0b4ed6..98dd2b01f 100644 Binary files a/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/01 - dashboard.png and b/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/02 - workout detail.png b/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/02 - workout detail.png index fbd397ebb..f0744c788 100644 Binary files a/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/02 - workout detail.png and b/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/03 - gym mode.png b/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/03 - gym mode.png index d87e7cdc3..49db309a0 100644 Binary files a/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/03 - gym mode.png and b/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/04 - measurements.png b/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/04 - measurements.png index f5fea9976..3dd470757 100644 Binary files a/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/04 - measurements.png and b/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/05 - nutritional plan.png index a67946bd2..01cd830cb 100644 Binary files a/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/06 - weight.png b/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/06 - weight.png index dd927851d..7e2d8564f 100644 Binary files a/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/06 - weight.png and b/fastlane/metadata/android/tr-TR/images/tenInchScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/uk/images/phoneScreenshots/01 - dashboard.png b/fastlane/metadata/android/uk/images/phoneScreenshots/01 - dashboard.png index dc092b531..0fae328e6 100644 Binary files a/fastlane/metadata/android/uk/images/phoneScreenshots/01 - dashboard.png and b/fastlane/metadata/android/uk/images/phoneScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/uk/images/phoneScreenshots/02 - workout detail.png b/fastlane/metadata/android/uk/images/phoneScreenshots/02 - workout detail.png index b8dcc9e83..dae3dee7e 100644 Binary files a/fastlane/metadata/android/uk/images/phoneScreenshots/02 - workout detail.png and b/fastlane/metadata/android/uk/images/phoneScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/uk/images/phoneScreenshots/03 - gym mode.png b/fastlane/metadata/android/uk/images/phoneScreenshots/03 - gym mode.png index a9acbb6fa..fd7815e7c 100644 Binary files a/fastlane/metadata/android/uk/images/phoneScreenshots/03 - gym mode.png and b/fastlane/metadata/android/uk/images/phoneScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/uk/images/phoneScreenshots/04 - measurements.png b/fastlane/metadata/android/uk/images/phoneScreenshots/04 - measurements.png index 5cd1d469b..6d3d57d96 100644 Binary files a/fastlane/metadata/android/uk/images/phoneScreenshots/04 - measurements.png and b/fastlane/metadata/android/uk/images/phoneScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/uk/images/phoneScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/uk/images/phoneScreenshots/05 - nutritional plan.png index 2fcacdbd2..a220ec722 100644 Binary files a/fastlane/metadata/android/uk/images/phoneScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/uk/images/phoneScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/uk/images/phoneScreenshots/06 - weight.png b/fastlane/metadata/android/uk/images/phoneScreenshots/06 - weight.png index e71214d8b..bc6a75f12 100644 Binary files a/fastlane/metadata/android/uk/images/phoneScreenshots/06 - weight.png and b/fastlane/metadata/android/uk/images/phoneScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/uk/images/tenInchScreenshots/01 - dashboard.png b/fastlane/metadata/android/uk/images/tenInchScreenshots/01 - dashboard.png index 8d975fd98..358c08162 100644 Binary files a/fastlane/metadata/android/uk/images/tenInchScreenshots/01 - dashboard.png and b/fastlane/metadata/android/uk/images/tenInchScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/uk/images/tenInchScreenshots/02 - workout detail.png b/fastlane/metadata/android/uk/images/tenInchScreenshots/02 - workout detail.png index 3417db388..760674d18 100644 Binary files a/fastlane/metadata/android/uk/images/tenInchScreenshots/02 - workout detail.png and b/fastlane/metadata/android/uk/images/tenInchScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/uk/images/tenInchScreenshots/03 - gym mode.png b/fastlane/metadata/android/uk/images/tenInchScreenshots/03 - gym mode.png index 253354da1..2d6894fa8 100644 Binary files a/fastlane/metadata/android/uk/images/tenInchScreenshots/03 - gym mode.png and b/fastlane/metadata/android/uk/images/tenInchScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/uk/images/tenInchScreenshots/04 - measurements.png b/fastlane/metadata/android/uk/images/tenInchScreenshots/04 - measurements.png index c6bd5dcf5..2a519ada1 100644 Binary files a/fastlane/metadata/android/uk/images/tenInchScreenshots/04 - measurements.png and b/fastlane/metadata/android/uk/images/tenInchScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/uk/images/tenInchScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/uk/images/tenInchScreenshots/05 - nutritional plan.png index 26d5d891c..e89270519 100644 Binary files a/fastlane/metadata/android/uk/images/tenInchScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/uk/images/tenInchScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/uk/images/tenInchScreenshots/06 - weight.png b/fastlane/metadata/android/uk/images/tenInchScreenshots/06 - weight.png index 9478427b3..9ce072ebe 100644 Binary files a/fastlane/metadata/android/uk/images/tenInchScreenshots/06 - weight.png and b/fastlane/metadata/android/uk/images/tenInchScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/zh-CN/images/phoneScreenshots/01 - dashboard.png b/fastlane/metadata/android/zh-CN/images/phoneScreenshots/01 - dashboard.png index 108a7e272..ae692319f 100644 Binary files a/fastlane/metadata/android/zh-CN/images/phoneScreenshots/01 - dashboard.png and b/fastlane/metadata/android/zh-CN/images/phoneScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/zh-CN/images/phoneScreenshots/02 - workout detail.png b/fastlane/metadata/android/zh-CN/images/phoneScreenshots/02 - workout detail.png index f5e079bad..b2a2764a1 100644 Binary files a/fastlane/metadata/android/zh-CN/images/phoneScreenshots/02 - workout detail.png and b/fastlane/metadata/android/zh-CN/images/phoneScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/zh-CN/images/phoneScreenshots/03 - gym mode.png b/fastlane/metadata/android/zh-CN/images/phoneScreenshots/03 - gym mode.png index 7b4e1435d..1247c72ea 100644 Binary files a/fastlane/metadata/android/zh-CN/images/phoneScreenshots/03 - gym mode.png and b/fastlane/metadata/android/zh-CN/images/phoneScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/zh-CN/images/phoneScreenshots/04 - measurements.png b/fastlane/metadata/android/zh-CN/images/phoneScreenshots/04 - measurements.png index 9ade47279..50a908edb 100644 Binary files a/fastlane/metadata/android/zh-CN/images/phoneScreenshots/04 - measurements.png and b/fastlane/metadata/android/zh-CN/images/phoneScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/zh-CN/images/phoneScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/zh-CN/images/phoneScreenshots/05 - nutritional plan.png index 314092a39..15d75a917 100644 Binary files a/fastlane/metadata/android/zh-CN/images/phoneScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/zh-CN/images/phoneScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/zh-CN/images/phoneScreenshots/06 - weight.png b/fastlane/metadata/android/zh-CN/images/phoneScreenshots/06 - weight.png index 8d2c64b8d..9341c45a7 100644 Binary files a/fastlane/metadata/android/zh-CN/images/phoneScreenshots/06 - weight.png and b/fastlane/metadata/android/zh-CN/images/phoneScreenshots/06 - weight.png differ diff --git a/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/01 - dashboard.png b/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/01 - dashboard.png index edc5ea276..731c23a88 100644 Binary files a/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/01 - dashboard.png and b/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/01 - dashboard.png differ diff --git a/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/02 - workout detail.png b/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/02 - workout detail.png index 595a2e677..0ad300712 100644 Binary files a/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/02 - workout detail.png and b/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/02 - workout detail.png differ diff --git a/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/03 - gym mode.png b/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/03 - gym mode.png index 73ddb549b..9d7d5ddb2 100644 Binary files a/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/03 - gym mode.png and b/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/03 - gym mode.png differ diff --git a/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/04 - measurements.png b/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/04 - measurements.png index ed7116741..2c7edec4a 100644 Binary files a/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/04 - measurements.png and b/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/04 - measurements.png differ diff --git a/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/05 - nutritional plan.png b/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/05 - nutritional plan.png index d16422efa..08f3cd1d1 100644 Binary files a/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/05 - nutritional plan.png and b/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/05 - nutritional plan.png differ diff --git a/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/06 - weight.png b/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/06 - weight.png index 216bf860f..379d18880 100644 Binary files a/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/06 - weight.png and b/fastlane/metadata/android/zh-CN/images/tenInchScreenshots/06 - weight.png differ diff --git a/fastlane/report.xml b/fastlane/report.xml index c04fdec0e..ec8e75e93 100644 --- a/fastlane/report.xml +++ b/fastlane/report.xml @@ -5,12 +5,12 @@ - + - + diff --git a/flatpak/de.wger.flutter.appdata.xml b/flatpak/de.wger.flutter.metainfo.xml similarity index 100% rename from flatpak/de.wger.flutter.appdata.xml rename to flatpak/de.wger.flutter.metainfo.xml diff --git a/flatpak/flatpak_meta.json b/flatpak/flatpak_meta.json index 5d408ead3..253cf82ef 100644 --- a/flatpak/flatpak_meta.json +++ b/flatpak/flatpak_meta.json @@ -3,14 +3,8 @@ "lowercaseAppName": "wger", "githubReleaseOrganization": "wger-project", "githubReleaseProject": "flutter", - "localReleases": [ - - ], - "localReleaseAssets": [ - - ], "localLinuxBuildDir": "../build/linux", - "appDataPath": "de.wger.flutter.appdata.xml", + "appStreamPath": "de.wger.flutter.metainfo.xml", "desktopPath": "de.wger.flutter.desktop", "icons": { "64x64": "logo64.png", diff --git a/flatpak/scripts/flatpak_packager.dart b/flatpak/scripts/flatpak_packager.dart index 5346a6056..92cf27681 100644 --- a/flatpak/scripts/flatpak_packager.dart +++ b/flatpak/scripts/flatpak_packager.dart @@ -1,17 +1,27 @@ // ignore_for_file: avoid_print import 'dart:io'; - import 'flatpak_shared.dart'; +/// Creates an archive containing all the sources for the Flatpak package for a +/// specific architecture. +/// /// arguments: /// --meta [file] +/// Required argument for providing the metadata file for this script. + /// --github +/// Use this option to pull release info from Github rather than the metadata file. + +/// --addTodaysVersion [version] +/// If pulling data from Github, this provides a way to specify the release to be released today. + void main(List arguments) async { - if (Platform.isWindows) { - throw Exception('Must be run under a UNIX-like operating system.'); + if (!Platform.isLinux) { + throw Exception('Must be run under Linux'); } + // PARSE ARGUMENTS final metaIndex = arguments.indexOf('--meta'); if (metaIndex == -1) { throw Exception( @@ -22,123 +32,136 @@ void main(List arguments) async { } final metaFile = File(arguments[metaIndex + 1]); - if (!metaFile.existsSync()) { + if (!(await metaFile.exists())) { throw Exception('The provided metadata file does not exist.'); } - final meta = FlatpakMeta.fromJson(metaFile); - final fetchFromGithub = arguments.contains('--github'); + final addTodaysVersionIndex = arguments.indexOf('--addTodaysVersion'); + if (addTodaysVersionIndex != -1 && arguments.length == addTodaysVersionIndex + 1) { + throw Exception('The --addTodaysVersion flag must be followed by the version name.'); + } + + final addedTodaysVersion = + addTodaysVersionIndex != -1 ? arguments[addTodaysVersionIndex + 1] : null; + + // GENERATE PACKAGE + + final meta = FlatpakMeta.fromJson(metaFile, skipLocalReleases: fetchFromGithub); + final outputDir = Directory('${Directory.current.path}/flatpak_generator_exports'); - outputDir.createSync(); + await outputDir.create(); - final packageGenerator = PackageGenerator(inputDir: metaFile.parent, meta: meta); + final packageGenerator = PackageGenerator( + inputDir: metaFile.parent, meta: meta, addedTodaysVersion: addedTodaysVersion); - packageGenerator.generatePackage( - outputDir, - PackageGenerator.runningOnARM() ? CPUArchitecture.aarch64 : CPUArchitecture.x86_64, - fetchFromGithub, - ); + await packageGenerator.generatePackage( + outputDir, + await PackageGenerator.runningOnARM() ? CPUArchitecture.aarch64 : CPUArchitecture.x86_64, + fetchFromGithub); } class PackageGenerator { final Directory inputDir; final FlatpakMeta meta; - final Map shaByArch = {}; + final String? addedTodaysVersion; - PackageGenerator({required this.inputDir, required this.meta}); + PackageGenerator({required this.inputDir, required this.meta, required this.addedTodaysVersion}); Future generatePackage( Directory outputDir, CPUArchitecture arch, bool fetchReleasesFromGithub) async { - final tempDir = outputDir.createTempSync('flutter_generator_temp'); + final tempDir = await outputDir.createTemp('flutter_generator_temp'); final appId = meta.appId; // desktop file final desktopFile = File('${inputDir.path}/${meta.desktopPath}'); - if (!desktopFile.existsSync()) { + if (!(await desktopFile.exists())) { throw Exception( 'The desktop file does not exist under the specified path: ${desktopFile.path}'); } - desktopFile.copySync('${tempDir.path}/$appId.desktop'); + await desktopFile.copy('${tempDir.path}/$appId.desktop'); // icons final iconTempDir = Directory('${tempDir.path}/icons'); for (final icon in meta.icons) { final iconFile = File('${inputDir.path}/${icon.path}'); - if (!iconFile.existsSync()) { + if (!(await iconFile.exists())) { throw Exception('The icon file ${iconFile.path} does not exist.'); } final iconSubdir = Directory('${iconTempDir.path}/${icon.type}'); - iconSubdir.createSync(recursive: true); - iconFile.copySync('${iconSubdir.path}/${icon.getFilename(appId)}'); + await iconSubdir.create(recursive: true); + await iconFile.copy('${iconSubdir.path}/${icon.getFilename(appId)}'); } - // appdata file - final origAppDataFile = File('${inputDir.path}/${meta.appDataPath}'); - if (!origAppDataFile.existsSync()) { + // AppStream metainfo file + final origAppStreamFile = File('${inputDir.path}/${meta.appStreamPath}'); + if (!(await origAppStreamFile.exists())) { throw Exception( - 'The app data file does not exist under the specified path: ${origAppDataFile.path}'); + 'The app data file does not exist under the specified path: ${origAppStreamFile.path}'); } - final editedAppDataContent = AppDataModifier.replaceVersions( - origAppDataFile.readAsStringSync(), await meta.getReleases(fetchReleasesFromGithub)); + final editedAppStreamContent = AppStreamModifier.replaceVersions( + await origAppStreamFile.readAsString(), + await meta.getReleases(fetchReleasesFromGithub, addedTodaysVersion)); - final editedAppDataFile = File('${tempDir.path}/$appId.appdata.xml'); - editedAppDataFile.writeAsStringSync(editedAppDataContent); + final editedAppStreamFile = File('${tempDir.path}/$appId.metainfo.xml'); + await editedAppStreamFile.writeAsString(editedAppStreamContent); // build files final bundlePath = '${inputDir.path}/${meta.localLinuxBuildDir}/${arch.flutterDirName}/release/bundle'; final buildDir = Directory(bundlePath); - if (!buildDir.existsSync()) { + if (!(await buildDir.exists())) { throw Exception( 'The linux build directory does not exist under the specified path: ${buildDir.path}'); } final destDir = Directory('${tempDir.path}/bin'); - destDir.createSync(); + await destDir.create(); + + final baseFilename = '${meta.lowercaseAppName}-linux-${arch.flatpakArchCode}'; + final packagePath = '${outputDir.absolute.path}/$baseFilename.tar.gz'; + final shaPath = '${outputDir.absolute.path}/$baseFilename.sha256'; - final baseFileName = '${meta.lowercaseAppName}-linux-${arch.flatpakArchCode}'; + await Process.run('cp', ['-r', '${buildDir.absolute.path}/.', destDir.absolute.path]); + await Process.run('tar', ['-czvf', packagePath, '.'], workingDirectory: tempDir.absolute.path); - final packagePath = '${outputDir.absolute.path}/$baseFileName.tar.gz'; - Process.runSync('cp', ['-r', '${buildDir.absolute.path}/.', destDir.absolute.path]); - Process.runSync('tar', ['-czvf', packagePath, '.'], workingDirectory: tempDir.absolute.path); print('Generated $packagePath'); - final preShasum = Process.runSync('shasum', ['-a', '256', packagePath]); - final sha256 = preShasum.stdout.toString().split(' ').first; + final preShasum = await Process.run('shasum', ['-a', '256', packagePath]); + final shasum = preShasum.stdout.toString().split(' ').first; - final shaFile = await File('${outputDir.path}/$baseFileName.sha256').writeAsString(sha256); - print('Generated ${shaFile.path}'); + await File(shaPath).writeAsString(shasum); - shaByArch.putIfAbsent(arch, () => sha256); + print('Generated $shaPath'); - tempDir.deleteSync(recursive: true); + await tempDir.delete(recursive: true); } - static bool runningOnARM() { - final unameRes = Process.runSync('uname', ['-m']); + static Future runningOnARM() async { + final unameRes = await Process.run('uname', ['-m']); final unameString = unameRes.stdout.toString().trimLeft(); return unameString.startsWith('arm') || unameString.startsWith('aarch'); } } -// updates releases in ${appName}.appdata.xml -class AppDataModifier { - static String replaceVersions(String origAppDataContent, List versions) { +// updates releases in ${appName}.metainfo.xml +class AppStreamModifier { + static String replaceVersions(String origAppStreamContent, List versions) { final joinedReleases = versions.map((v) => '\t\t').join('\n'); - final releasesSection = '\n$joinedReleases\n\t'; //todo check this - if (origAppDataContent.contains('') .replaceFirst(RegExp(''), releasesSection) .replaceAll('<~>', '\n'); } else { - return origAppDataContent.replaceFirst('', '\n\t$releasesSection\n'); + return origAppStreamContent.replaceFirst( + '', '\n\t$releasesSection\n'); } } } diff --git a/flatpak/scripts/flatpak_shared.dart b/flatpak/scripts/flatpak_shared.dart index f411aabef..f9432f5ce 100644 --- a/flatpak/scripts/flatpak_shared.dart +++ b/flatpak/scripts/flatpak_shared.dart @@ -3,20 +3,21 @@ import 'dart:io'; import 'package:http/http.dart' as http; +/// Shared files for the two Flatpak-related scripts. + class Release { final String version; - final String date; //todo add resources + final String date; //TODO add resources Release({required this.version, required this.date}); } enum CPUArchitecture { x86_64('x86_64', 'x64'), - aarch64('aarch64', 'aarch64'); + aarch64('aarch64', 'arm64'); final String flatpakArchCode; final String flutterDirName; - const CPUArchitecture(this.flatpakArchCode, this.flutterDirName); } @@ -55,21 +56,21 @@ class GithubReleases { GithubReleases(this.githubReleaseOrganization, this.githubReleaseProject); - Future> getReleases() async { + Future> getReleases(bool canBeEmpty) async { if (_releases == null) { - await _fetchReleasesAndAssets(); + await _fetchReleasesAndAssets(canBeEmpty); } return _releases!; } Future?> getLatestReleaseAssets() async { if (_releases == null) { - await _fetchReleasesAndAssets(); + await _fetchReleasesAndAssets(false); } return _latestReleaseAssets; } - Future _fetchReleasesAndAssets() async { + Future _fetchReleasesAndAssets(bool canBeEmpty) async { final releaseJsonContent = (await http.get(Uri( scheme: 'https', host: 'api.github.com', @@ -89,7 +90,7 @@ class GithubReleases { if (latestReleaseAssetDate == null || (latestReleaseAssetDate?.compareTo(releaseDateAndTime) == -1)) { - final assets = await _parseReleaseAssets(releaseMap['assets'] as List); + final assets = await _parseGithubReleaseAssets(releaseMap['assets'] as List); if (assets != null) { _latestReleaseAssets = assets; latestReleaseAssetDate = releaseDateAndTime; @@ -99,12 +100,14 @@ class GithubReleases { releases.add(Release(version: releaseMap['name'] as String, date: releaseDateString)); }); - if (releases.isNotEmpty) { + if (releases.isNotEmpty || canBeEmpty) { _releases = releases; + } else { + throw Exception("Github must contain at least 1 release."); } } - Future?> _parseReleaseAssets(List assetMaps) async { + Future?> _parseGithubReleaseAssets(List assetMaps) async { String? x64TarballUrl; String? x64Sha; String? aarch64TarballUrl; @@ -166,15 +169,14 @@ class GithubReleases { return res.isEmpty ? null : res; } - Future _readSha(String shaUrl) async { - return (await http.get(Uri.parse(shaUrl))).body.split(' ').first; - } + Future _readSha(String shaUrl) async => + (await http.get(Uri.parse(shaUrl))).body.split(' ').first; } class FlatpakMeta { final String appId; final String lowercaseAppName; - final String appDataPath; + final String appStreamPath; final String desktopPath; final List icons; @@ -202,7 +204,7 @@ class FlatpakMeta { required List? localReleases, required List? localReleaseAssets, required this.localLinuxBuildDir, - required this.appDataPath, + required this.appStreamPath, required this.desktopPath, required this.icons, required this.freedesktopRuntime, @@ -216,28 +218,37 @@ class FlatpakMeta { } } - Future> getReleases(bool fetchReleasesFromGithub) async { + Future> getReleases( + bool fetchReleasesFromGithub, String? addedTodaysVersion) async { + final releases = List.empty(growable: true); + if (addedTodaysVersion != null) { + releases.add(Release( + version: addedTodaysVersion, date: DateTime.now().toIso8601String().split("T").first)); + } if (fetchReleasesFromGithub) { if (_githubReleases == null) { throw Exception( 'Metadata must include Github repository info if fetching releases from Github.'); } - return await _githubReleases!.getReleases(); + releases.addAll(await _githubReleases!.getReleases(addedTodaysVersion != null)); } else { - if (_localReleases == null) { + if (_localReleases == null && addedTodaysVersion == null) { throw Exception('Metadata must include releases if not fetching releases from Github.'); } - return _localReleases!; + if (_localReleases?.isNotEmpty ?? false) { + releases.addAll(_localReleases!); + } } + return releases; } - Future?> getReleaseAssets(bool fetchReleasesFromGithub) async { + Future?> getLatestReleaseAssets(bool fetchReleasesFromGithub) async { if (fetchReleasesFromGithub) { if (_githubReleases == null) { throw Exception( 'Metadata must include Github repository info if fetching releases from Github.'); } - return _githubReleases!.getLatestReleaseAssets(); + return await _githubReleases!.getLatestReleaseAssets(); } else { if (_localReleases == null) { throw Exception('Metadata must include releases if not fetching releases from Github.'); @@ -246,7 +257,7 @@ class FlatpakMeta { } } - static FlatpakMeta fromJson(File jsonFile) { + static FlatpakMeta fromJson(File jsonFile, {bool skipLocalReleases = false}) { try { final dynamic json = jsonDecode(jsonFile.readAsStringSync()); return FlatpakMeta( @@ -254,36 +265,42 @@ class FlatpakMeta { lowercaseAppName: json['lowercaseAppName'] as String, githubReleaseOrganization: json['githubReleaseOrganization'] as String?, githubReleaseProject: json['githubReleaseProject'] as String?, - localReleases: (json['localReleases'] as List?)?.map((dynamic r) { - final rMap = r as Map; - return Release(version: rMap['version'] as String, date: rMap['date'] as String); - }).toList(), - localReleaseAssets: (json['localReleaseAssets'] as List?)?.map((dynamic ra) { - final raMap = ra as Map; - final archString = raMap['arch'] as String; - final arch = (archString == CPUArchitecture.x86_64.flatpakArchCode) - ? CPUArchitecture.x86_64 - : (archString == CPUArchitecture.aarch64.flatpakArchCode) - ? CPUArchitecture.aarch64 - : null; - if (arch == null) { - throw Exception( - 'Architecture must be either "${CPUArchitecture.x86_64.flatpakArchCode}" or "${CPUArchitecture.aarch64.flatpakArchCode}"'); - } - final tarballPath = '${jsonFile.parent.path}/${raMap['tarballPath'] as String}'; - final preShasum = Process.runSync('shasum', ['-a', '256', tarballPath]); - final shasum = preShasum.stdout.toString().split(' ').first; - if (preShasum.exitCode != 0) { - throw Exception(preShasum.stderr); - } - return ReleaseAsset( - arch: arch, - tarballUrlOrPath: tarballPath, - isRelativeLocalPath: true, - tarballSha256: shasum); - }).toList(), + localReleases: skipLocalReleases + ? null + : (json['localReleases'] as List?)?.map((dynamic r) { + final rMap = r as Map; + return Release(version: rMap['version'] as String, date: rMap['date'] as String); + }).toList(), + localReleaseAssets: skipLocalReleases + ? null + : (json['localReleaseAssets'] as List?)?.map((dynamic ra) { + final raMap = ra as Map; + final archString = raMap['arch'] as String; + final arch = (archString == CPUArchitecture.x86_64.flatpakArchCode) + ? CPUArchitecture.x86_64 + : (archString == CPUArchitecture.aarch64.flatpakArchCode) + ? CPUArchitecture.aarch64 + : null; + if (arch == null) { + throw Exception( + 'Architecture must be either "${CPUArchitecture.x86_64.flatpakArchCode}" or "${CPUArchitecture.aarch64.flatpakArchCode}"'); + } + final tarballFile = + File('${jsonFile.parent.path}/${raMap['tarballPath'] as String}'); + final tarballPath = tarballFile.absolute.path; + final preShasum = Process.runSync('shasum', ['-a', '256', tarballPath]); + final shasum = preShasum.stdout.toString().split(' ').first; + if (preShasum.exitCode != 0) { + throw Exception(preShasum.stderr); + } + return ReleaseAsset( + arch: arch, + tarballUrlOrPath: tarballPath, + isRelativeLocalPath: true, + tarballSha256: shasum); + }).toList(), localLinuxBuildDir: json['localLinuxBuildDir'] as String, - appDataPath: json['appDataPath'] as String, + appStreamPath: json['appStreamPath'] as String, desktopPath: json['desktopPath'] as String, icons: (json['icons'] as Map).entries.map((mapEntry) { return Icon(type: mapEntry.key as String, path: mapEntry.value as String); diff --git a/flatpak/scripts/manifest_generator.dart b/flatpak/scripts/manifest_generator.dart index da27f8609..254bb1aec 100644 --- a/flatpak/scripts/manifest_generator.dart +++ b/flatpak/scripts/manifest_generator.dart @@ -1,8 +1,20 @@ +// ignore_for_file: avoid_print + import 'dart:convert'; import 'dart:io'; - import 'flatpak_shared.dart'; +/// Generates the Flatpak manifest. +/// (Separate from the package generation, as those are generated per each +/// architecture.) +/// +/// arguments: +/// --meta [file] +/// Required argument for providing the metadata file for this script. + +/// --github +/// Use this option to pull release info from Github rather than the metadata file. + void main(List arguments) async { if (Platform.isWindows) { throw Exception('Must be run under a UNIX-like operating system.'); @@ -22,10 +34,10 @@ void main(List arguments) async { throw Exception('The provided metadata file does not exist.'); } - final meta = FlatpakMeta.fromJson(metaFile); - final fetchFromGithub = arguments.contains('--github'); + final meta = FlatpakMeta.fromJson(metaFile, skipLocalReleases: fetchFromGithub); + final outputDir = Directory('${Directory.current.path}/flatpak_generator_exports'); outputDir.createSync(); @@ -56,7 +68,7 @@ class FlatpakManifestGenerator { Future generateFlatpakManifest(bool fetchFromGithub) async { final appName = meta.lowercaseAppName; final appId = meta.appId; - final assets = await meta.getReleaseAssets(fetchFromGithub); + final assets = await meta.getLatestReleaseAssets(fetchFromGithub); if (assets == null) { throw Exception('There are no associated assets.'); @@ -88,7 +100,7 @@ class FlatpakManifestGenerator { ...meta.icons.map((icon) => 'install -Dm644 $appName/icons/${icon.type}/${icon.getFilename(appId)} /app/share/icons/hicolor/${icon.type}/apps/${icon.getFilename(appId)}'), 'install -Dm644 $appName/$appId.desktop /app/share/applications/$appId.desktop', - 'install -Dm644 $appName/$appId.appdata.xml /app/share/applications/$appId.appdata.xml' + 'install -Dm644 $appName/$appId.metainfo.xml /app/share/metainfo/$appId.metainfo.xml' ], 'sources': assets .map((a) => { @@ -105,7 +117,7 @@ class FlatpakManifestGenerator { } Future generateFlathubJson(bool fetchFromGithub) async { - final assets = await meta.getReleaseAssets(fetchFromGithub); + final assets = await meta.getLatestReleaseAssets(fetchFromGithub); if (assets == null) { throw Exception('There are no associated assets.'); diff --git a/flatpak/scripts/pubspec.lock b/flatpak/scripts/pubspec.lock index d3d4f8469..4da5d192b 100644 --- a/flatpak/scripts/pubspec.lock +++ b/flatpak/scripts/pubspec.lock @@ -13,18 +13,18 @@ packages: dependency: transitive description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.18.0" http: dependency: "direct main" description: name: http - sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" url: "https://pub.dev" source: hosted - version: "0.13.5" + version: "0.13.6" http_parser: dependency: transitive description: @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.11.0" path: dependency: transitive description: @@ -77,9 +77,9 @@ packages: dependency: transitive description: name: typed_data - sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" sdks: - dart: ">=2.18.5 <4.0.0" + dart: ">=2.19.0 <4.0.0" diff --git a/integration_test/1_dashboard.dart b/integration_test/1_dashboard.dart index 315788584..cbd5d2ab8 100644 --- a/integration_test/1_dashboard.dart +++ b/integration_test/1_dashboard.dart @@ -14,13 +14,14 @@ import '../test/nutrition/nutritional_plan_form_test.mocks.dart'; import '../test/workout/weight_unit_form_widget_test.mocks.dart'; import '../test/workout/workout_form_test.mocks.dart'; import '../test_data/body_weight.dart'; +import '../test_data/exercises.dart'; import '../test_data/measurements.dart'; import '../test_data/nutritional_plans.dart'; import '../test_data/workouts.dart'; Widget createDashboardScreen({locale = 'en'}) { final mockWorkoutProvider = MockWorkoutPlansProvider(); - when(mockWorkoutProvider.activePlan).thenReturn(getWorkout()); + when(mockWorkoutProvider.activePlan).thenReturn(getWorkout(exercises: getScreenshotExercises())); final Map logs = { 'results': [ diff --git a/integration_test/2_workout.dart b/integration_test/2_workout.dart index 3b6f4fa92..ede8fe71d 100644 --- a/integration_test/2_workout.dart +++ b/integration_test/2_workout.dart @@ -7,13 +7,14 @@ import 'package:wger/screens/workout_plan_screen.dart'; import 'package:wger/theme/theme.dart'; import '../test/workout/workout_form_test.mocks.dart'; +import '../test_data/exercises.dart'; import '../test_data/workouts.dart'; Widget createWorkoutDetailScreen({locale = 'en'}) { final key = GlobalKey(); final mockWorkoutProvider = MockWorkoutPlansProvider(); - final workout = getWorkout(); + final workout = getWorkout(exercises: getScreenshotExercises()); when(mockWorkoutProvider.activePlan).thenReturn(workout); when(mockWorkoutProvider.fetchAndSetWorkoutPlanFull(1)).thenAnswer((_) => Future.value(workout)); @@ -33,7 +34,7 @@ Widget createWorkoutDetailScreen({locale = 'en'}) { home: TextButton( onPressed: () => key.currentState!.push( MaterialPageRoute( - settings: RouteSettings(arguments: getWorkout()), + settings: RouteSettings(arguments: workout), builder: (_) => WorkoutPlanScreen(), ), ), diff --git a/integration_test/3_gym_mode.dart b/integration_test/3_gym_mode.dart index 8ffcbdc20..51ccbc754 100644 --- a/integration_test/3_gym_mode.dart +++ b/integration_test/3_gym_mode.dart @@ -16,12 +16,12 @@ import '../test_data/workouts.dart'; Widget createGymModeScreen({locale = 'en'}) { final key = GlobalKey(); final bases = getTestExerciseBases(); - final workout = getWorkout(); + final workout = getWorkout(exercises: getScreenshotExercises()); final mockExerciseProvider = MockExercisesProvider(); - when(mockExerciseProvider.findExerciseBaseById(1)).thenReturn(bases[0]); // bench press - when(mockExerciseProvider.findExerciseBaseById(6)).thenReturn(bases[5]); // side raises + when(mockExerciseProvider.findExerciseById(1)).thenReturn(bases[0]); // bench press + when(mockExerciseProvider.findExerciseById(6)).thenReturn(bases[5]); // side raises //when(mockExerciseProvider.findExerciseBaseById(2)).thenReturn(bases[1]); // crunches //when(mockExerciseProvider.findExerciseBaseById(3)).thenReturn(bases[2]); // dead lift diff --git a/integration_test/README.md b/integration_test/README.md index d4fcea9c5..cdc6a5934 100644 --- a/integration_test/README.md +++ b/integration_test/README.md @@ -1,10 +1,12 @@ -Start emulator and run +This will generate some screenshots and save them to the Play Store metadata folder. -`flutter drive --driver=test_driver/screenshot_driver.dart --target=integration_test/make_screenshots_test.dart` +1) Set the correct value for the device size by setting the `destination` variable +2) Start the correct emulator and + run `flutter drive --driver=test_driver/screenshot_driver.dart --target=integration_test/make_screenshots_test.dart` +3) If you get errors or the screenshots are not written to disk, edit the + `languages` list and comment some of the languages -This will generate some screenshots and save them to the Play Store metadata folder - -See +See also * * diff --git a/integration_test/make_screenshots_test.dart b/integration_test/make_screenshots_test.dart index 633d34d4c..5dcddb1ee 100644 --- a/integration_test/make_screenshots_test.dart +++ b/integration_test/make_screenshots_test.dart @@ -19,6 +19,7 @@ enum DeviceType { tvScreenshots, wearScreenshots } + final destination = DeviceType.phoneScreenshots.name; Future takeScreenshot(tester, binding, String language, String name) async { @@ -33,21 +34,26 @@ Future takeScreenshot(tester, binding, String language, String name) async // Available languages in weblate for the fastlane/metadata/android folder (not necessarily // those for which the application is translated) const languages = [ - //'de-DE', - // Note: it seems if too many languages are processed at once, some processes // disappear and no images are written. Doing this in smaller steps works fine + /* 'ca', 'de-DE', + 'el-GR', 'en-US', 'es-ES', - 'fr-FR', + */ + + /* + 'fr-FR', 'hi-IN', 'hr', 'it-IT', 'pt-BR', + */ + 'nb-NO', 'pl-PL', 'ru-RU', diff --git a/ios/Podfile.lock b/ios/Podfile.lock index d8fa7f919..b8acaa9e4 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,9 +1,13 @@ PODS: + - camera_avfoundation (0.0.1): + - Flutter - Flutter (1.0.0) - flutter_barcode_scanner (2.0.0): - Flutter - flutter_keyboard_visibility (0.0.1): - Flutter + - flutter_zxing (0.0.1): + - Flutter - image_picker_ios (0.0.1): - Flutter - integration_test (0.0.1): @@ -19,26 +23,33 @@ PODS: - Flutter - video_player_avfoundation (0.0.1): - Flutter + - FlutterMacOS DEPENDENCIES: + - camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`) - Flutter (from `Flutter`) - flutter_barcode_scanner (from `.symlinks/plugins/flutter_barcode_scanner/ios`) - flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`) + - flutter_zxing (from `.symlinks/plugins/flutter_zxing/ios`) - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) - integration_test (from `.symlinks/plugins/integration_test/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - rive_common (from `.symlinks/plugins/rive_common/ios`) - - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`) + - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - - video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/ios`) + - video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`) EXTERNAL SOURCES: + camera_avfoundation: + :path: ".symlinks/plugins/camera_avfoundation/ios" Flutter: :path: Flutter flutter_barcode_scanner: :path: ".symlinks/plugins/flutter_barcode_scanner/ios" flutter_keyboard_visibility: :path: ".symlinks/plugins/flutter_keyboard_visibility/ios" + flutter_zxing: + :path: ".symlinks/plugins/flutter_zxing/ios" image_picker_ios: :path: ".symlinks/plugins/image_picker_ios/ios" integration_test: @@ -48,24 +59,26 @@ EXTERNAL SOURCES: rive_common: :path: ".symlinks/plugins/rive_common/ios" shared_preferences_foundation: - :path: ".symlinks/plugins/shared_preferences_foundation/ios" + :path: ".symlinks/plugins/shared_preferences_foundation/darwin" url_launcher_ios: :path: ".symlinks/plugins/url_launcher_ios/ios" video_player_avfoundation: - :path: ".symlinks/plugins/video_player_avfoundation/ios" + :path: ".symlinks/plugins/video_player_avfoundation/darwin" SPEC CHECKSUMS: + camera_avfoundation: 3125e8cd1a4387f6f31c6c63abb8a55892a9eeeb Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 flutter_barcode_scanner: 7a1144744c28dc0c57a8de7218ffe5ec59a9e4bf flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069 + flutter_zxing: 19a866d17c8a87ee1026d68521c69d2f008635f6 image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5 - integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5 - package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e - rive_common: b5b1aa30c63b8f0f00f32cddc9ea394d3d3473b5 - shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472 - url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4 - video_player_avfoundation: 81e49bb3d9fb63dccf9fa0f6d877dc3ddbeac126 + integration_test: 13825b8a9334a850581300559b8839134b124670 + package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85 + rive_common: 3a4c254c6e4db7e4b9e05daeb3d1f47ae4f7bf76 + shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 + url_launcher_ios: 68d46cc9766d0c41dbdc884310529557e3cd7a86 + video_player_avfoundation: 8563f13d8fc8b2c29dc2d09e60b660e4e8128837 PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048 -COCOAPODS: 1.12.0 +COCOAPODS: 1.14.3 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 7bccdc01e..08905a67e 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -155,7 +155,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -204,6 +204,7 @@ files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 3db53b6e1..b52b2e698 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ _singleton; + + ServiceLocator._internal(); + + static final ServiceLocator _singleton = ServiceLocator._internal(); + + Future _initDB() async { + ExerciseDatabase exerciseDB; + IngredientDatabase ingredientDB; + // final exerciseDB = ExerciseDatabase(); + // final ingredientDB = IngredientDatabase(); + + if (Platform.environment.containsKey('FLUTTER_TEST')) { + exerciseDB = ExerciseDatabase.inMemory(NativeDatabase.memory()); + ingredientDB = IngredientDatabase.inMemory(NativeDatabase.memory()); + } else { + exerciseDB = ExerciseDatabase(); + ingredientDB = IngredientDatabase(); + } + + locator.registerSingleton(exerciseDB); + locator.registerSingleton(ingredientDB); + } + + Future configure() async { + try { + await _initDB(); + } catch (e, _) { + log(e.toString()); + rethrow; + } + } +} diff --git a/lib/database/exercises/exercise_database.dart b/lib/database/exercises/exercise_database.dart new file mode 100644 index 000000000..b68d19808 --- /dev/null +++ b/lib/database/exercises/exercise_database.dart @@ -0,0 +1,85 @@ +import 'dart:io'; + +import 'package:drift/drift.dart'; +import 'package:drift/native.dart'; +import 'package:path/path.dart' as p; +import 'package:path_provider/path_provider.dart'; +import 'package:wger/database/exercises/type_converters.dart'; +import 'package:wger/models/exercises/category.dart'; +import 'package:wger/models/exercises/equipment.dart'; +import 'package:wger/models/exercises/language.dart'; +import 'package:wger/models/exercises/muscle.dart'; + +part 'exercise_database.g.dart'; + +@DataClassName('ExerciseTable') +class Exercises extends Table { + IntColumn get id => integer()(); + + TextColumn get data => text()(); + + // TextColumn get data => text().map(const ExerciseBaseConverter())(); + + DateTimeColumn get lastUpdate => dateTime()(); + + /// The date when the exercise was last fetched from the API. While we know + /// when the exercise itself was last updated in `lastUpdate`, we can save + /// ourselves a lot of requests if we don't check too often + DateTimeColumn get lastFetched => dateTime()(); +} + +@DataClassName('MuscleTable') +class Muscles extends Table { + IntColumn get id => integer()(); + + TextColumn get data => text().map(const MuscleConverter())(); +} + +@DataClassName('CategoryTable') +class Categories extends Table { + IntColumn get id => integer()(); + + TextColumn get data => text().map(const ExerciseCategoryConverter())(); +} + +@DataClassName('LanguagesTable') +class Languages extends Table { + IntColumn get id => integer()(); + + TextColumn get data => text().map(const LanguageConverter())(); +} + +@DataClassName('EquipmentTable') +class Equipments extends Table { + IntColumn get id => integer()(); + + TextColumn get data => text().map(const EquipmentConverter())(); +} + +@DriftDatabase(tables: [Exercises, Muscles, Equipments, Categories, Languages]) +class ExerciseDatabase extends _$ExerciseDatabase { + ExerciseDatabase() : super(_openConnection()); + + // Named constructor for creating in-memory database + ExerciseDatabase.inMemory(super.e); + + @override + // TODO: implement schemaVersion + int get schemaVersion => 1; + + Future deleteEverything() { + return transaction(() async { + for (final table in allTables) { + await delete(table).go(); + } + }); + } +} + +LazyDatabase _openConnection() { + return LazyDatabase(() async { + final dbFolder = await getApplicationCacheDirectory(); + final file = File(p.join(dbFolder.path, 'exercises.sqlite')); + return NativeDatabase.createInBackground(file); + }); +} diff --git a/lib/database/exercises/exercise_database.g.dart b/lib/database/exercises/exercise_database.g.dart new file mode 100644 index 000000000..3e09c0ef5 --- /dev/null +++ b/lib/database/exercises/exercise_database.g.dart @@ -0,0 +1,968 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'exercise_database.dart'; + +// ignore_for_file: type=lint +class $ExercisesTable extends Exercises with TableInfo<$ExercisesTable, ExerciseTable> { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + $ExercisesTable(this.attachedDatabase, [this._alias]); + static const VerificationMeta _idMeta = const VerificationMeta('id'); + @override + late final GeneratedColumn id = GeneratedColumn('id', aliasedName, false, + type: DriftSqlType.int, requiredDuringInsert: true); + static const VerificationMeta _dataMeta = const VerificationMeta('data'); + @override + late final GeneratedColumn data = GeneratedColumn('data', aliasedName, false, + type: DriftSqlType.string, requiredDuringInsert: true); + static const VerificationMeta _lastUpdateMeta = const VerificationMeta('lastUpdate'); + @override + late final GeneratedColumn lastUpdate = GeneratedColumn( + 'last_update', aliasedName, false, + type: DriftSqlType.dateTime, requiredDuringInsert: true); + static const VerificationMeta _lastFetchedMeta = const VerificationMeta('lastFetched'); + @override + late final GeneratedColumn lastFetched = GeneratedColumn( + 'last_fetched', aliasedName, false, + type: DriftSqlType.dateTime, requiredDuringInsert: true); + @override + List get $columns => [id, data, lastUpdate, lastFetched]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'exercises'; + @override + VerificationContext validateIntegrity(Insertable instance, + {bool isInserting = false}) { + final context = VerificationContext(); + final data = instance.toColumns(true); + if (data.containsKey('id')) { + context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); + } else if (isInserting) { + context.missing(_idMeta); + } + if (data.containsKey('data')) { + context.handle(_dataMeta, this.data.isAcceptableOrUnknown(data['data']!, _dataMeta)); + } else if (isInserting) { + context.missing(_dataMeta); + } + if (data.containsKey('last_update')) { + context.handle( + _lastUpdateMeta, lastUpdate.isAcceptableOrUnknown(data['last_update']!, _lastUpdateMeta)); + } else if (isInserting) { + context.missing(_lastUpdateMeta); + } + if (data.containsKey('last_fetched')) { + context.handle(_lastFetchedMeta, + lastFetched.isAcceptableOrUnknown(data['last_fetched']!, _lastFetchedMeta)); + } else if (isInserting) { + context.missing(_lastFetchedMeta); + } + return context; + } + + @override + Set get $primaryKey => const {}; + @override + ExerciseTable map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return ExerciseTable( + id: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}id'])!, + data: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}data'])!, + lastUpdate: attachedDatabase.typeMapping + .read(DriftSqlType.dateTime, data['${effectivePrefix}last_update'])!, + lastFetched: attachedDatabase.typeMapping + .read(DriftSqlType.dateTime, data['${effectivePrefix}last_fetched'])!, + ); + } + + @override + $ExercisesTable createAlias(String alias) { + return $ExercisesTable(attachedDatabase, alias); + } +} + +class ExerciseTable extends DataClass implements Insertable { + final int id; + final String data; + final DateTime lastUpdate; + + /// The date when the exercise was last fetched from the API. While we know + /// when the exercise itself was last updated in `lastUpdate`, we can save + /// ourselves a lot of requests if we don't check too often + final DateTime lastFetched; + const ExerciseTable( + {required this.id, required this.data, required this.lastUpdate, required this.lastFetched}); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['id'] = Variable(id); + map['data'] = Variable(data); + map['last_update'] = Variable(lastUpdate); + map['last_fetched'] = Variable(lastFetched); + return map; + } + + ExercisesCompanion toCompanion(bool nullToAbsent) { + return ExercisesCompanion( + id: Value(id), + data: Value(data), + lastUpdate: Value(lastUpdate), + lastFetched: Value(lastFetched), + ); + } + + factory ExerciseTable.fromJson(Map json, {ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return ExerciseTable( + id: serializer.fromJson(json['id']), + data: serializer.fromJson(json['data']), + lastUpdate: serializer.fromJson(json['lastUpdate']), + lastFetched: serializer.fromJson(json['lastFetched']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'id': serializer.toJson(id), + 'data': serializer.toJson(data), + 'lastUpdate': serializer.toJson(lastUpdate), + 'lastFetched': serializer.toJson(lastFetched), + }; + } + + ExerciseTable copyWith({int? id, String? data, DateTime? lastUpdate, DateTime? lastFetched}) => + ExerciseTable( + id: id ?? this.id, + data: data ?? this.data, + lastUpdate: lastUpdate ?? this.lastUpdate, + lastFetched: lastFetched ?? this.lastFetched, + ); + @override + String toString() { + return (StringBuffer('ExerciseTable(') + ..write('id: $id, ') + ..write('data: $data, ') + ..write('lastUpdate: $lastUpdate, ') + ..write('lastFetched: $lastFetched') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash(id, data, lastUpdate, lastFetched); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is ExerciseTable && + other.id == this.id && + other.data == this.data && + other.lastUpdate == this.lastUpdate && + other.lastFetched == this.lastFetched); +} + +class ExercisesCompanion extends UpdateCompanion { + final Value id; + final Value data; + final Value lastUpdate; + final Value lastFetched; + final Value rowid; + const ExercisesCompanion({ + this.id = const Value.absent(), + this.data = const Value.absent(), + this.lastUpdate = const Value.absent(), + this.lastFetched = const Value.absent(), + this.rowid = const Value.absent(), + }); + ExercisesCompanion.insert({ + required int id, + required String data, + required DateTime lastUpdate, + required DateTime lastFetched, + this.rowid = const Value.absent(), + }) : id = Value(id), + data = Value(data), + lastUpdate = Value(lastUpdate), + lastFetched = Value(lastFetched); + static Insertable custom({ + Expression? id, + Expression? data, + Expression? lastUpdate, + Expression? lastFetched, + Expression? rowid, + }) { + return RawValuesInsertable({ + if (id != null) 'id': id, + if (data != null) 'data': data, + if (lastUpdate != null) 'last_update': lastUpdate, + if (lastFetched != null) 'last_fetched': lastFetched, + if (rowid != null) 'rowid': rowid, + }); + } + + ExercisesCompanion copyWith( + {Value? id, + Value? data, + Value? lastUpdate, + Value? lastFetched, + Value? rowid}) { + return ExercisesCompanion( + id: id ?? this.id, + data: data ?? this.data, + lastUpdate: lastUpdate ?? this.lastUpdate, + lastFetched: lastFetched ?? this.lastFetched, + rowid: rowid ?? this.rowid, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (id.present) { + map['id'] = Variable(id.value); + } + if (data.present) { + map['data'] = Variable(data.value); + } + if (lastUpdate.present) { + map['last_update'] = Variable(lastUpdate.value); + } + if (lastFetched.present) { + map['last_fetched'] = Variable(lastFetched.value); + } + if (rowid.present) { + map['rowid'] = Variable(rowid.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('ExercisesCompanion(') + ..write('id: $id, ') + ..write('data: $data, ') + ..write('lastUpdate: $lastUpdate, ') + ..write('lastFetched: $lastFetched, ') + ..write('rowid: $rowid') + ..write(')')) + .toString(); + } +} + +class $MusclesTable extends Muscles with TableInfo<$MusclesTable, MuscleTable> { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + $MusclesTable(this.attachedDatabase, [this._alias]); + static const VerificationMeta _idMeta = const VerificationMeta('id'); + @override + late final GeneratedColumn id = GeneratedColumn('id', aliasedName, false, + type: DriftSqlType.int, requiredDuringInsert: true); + static const VerificationMeta _dataMeta = const VerificationMeta('data'); + @override + late final GeneratedColumnWithTypeConverter data = GeneratedColumn( + 'data', aliasedName, false, + type: DriftSqlType.string, requiredDuringInsert: true) + .withConverter($MusclesTable.$converterdata); + @override + List get $columns => [id, data]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'muscles'; + @override + VerificationContext validateIntegrity(Insertable instance, + {bool isInserting = false}) { + final context = VerificationContext(); + final data = instance.toColumns(true); + if (data.containsKey('id')) { + context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); + } else if (isInserting) { + context.missing(_idMeta); + } + context.handle(_dataMeta, const VerificationResult.success()); + return context; + } + + @override + Set get $primaryKey => const {}; + @override + MuscleTable map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return MuscleTable( + id: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}id'])!, + data: $MusclesTable.$converterdata.fromSql( + attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}data'])!), + ); + } + + @override + $MusclesTable createAlias(String alias) { + return $MusclesTable(attachedDatabase, alias); + } + + static TypeConverter $converterdata = const MuscleConverter(); +} + +class MuscleTable extends DataClass implements Insertable { + final int id; + final Muscle data; + const MuscleTable({required this.id, required this.data}); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['id'] = Variable(id); + { + map['data'] = Variable($MusclesTable.$converterdata.toSql(data)); + } + return map; + } + + MusclesCompanion toCompanion(bool nullToAbsent) { + return MusclesCompanion( + id: Value(id), + data: Value(data), + ); + } + + factory MuscleTable.fromJson(Map json, {ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return MuscleTable( + id: serializer.fromJson(json['id']), + data: serializer.fromJson(json['data']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'id': serializer.toJson(id), + 'data': serializer.toJson(data), + }; + } + + MuscleTable copyWith({int? id, Muscle? data}) => MuscleTable( + id: id ?? this.id, + data: data ?? this.data, + ); + @override + String toString() { + return (StringBuffer('MuscleTable(') + ..write('id: $id, ') + ..write('data: $data') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash(id, data); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is MuscleTable && other.id == this.id && other.data == this.data); +} + +class MusclesCompanion extends UpdateCompanion { + final Value id; + final Value data; + final Value rowid; + const MusclesCompanion({ + this.id = const Value.absent(), + this.data = const Value.absent(), + this.rowid = const Value.absent(), + }); + MusclesCompanion.insert({ + required int id, + required Muscle data, + this.rowid = const Value.absent(), + }) : id = Value(id), + data = Value(data); + static Insertable custom({ + Expression? id, + Expression? data, + Expression? rowid, + }) { + return RawValuesInsertable({ + if (id != null) 'id': id, + if (data != null) 'data': data, + if (rowid != null) 'rowid': rowid, + }); + } + + MusclesCompanion copyWith({Value? id, Value? data, Value? rowid}) { + return MusclesCompanion( + id: id ?? this.id, + data: data ?? this.data, + rowid: rowid ?? this.rowid, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (id.present) { + map['id'] = Variable(id.value); + } + if (data.present) { + map['data'] = Variable($MusclesTable.$converterdata.toSql(data.value)); + } + if (rowid.present) { + map['rowid'] = Variable(rowid.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('MusclesCompanion(') + ..write('id: $id, ') + ..write('data: $data, ') + ..write('rowid: $rowid') + ..write(')')) + .toString(); + } +} + +class $EquipmentsTable extends Equipments with TableInfo<$EquipmentsTable, EquipmentTable> { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + $EquipmentsTable(this.attachedDatabase, [this._alias]); + static const VerificationMeta _idMeta = const VerificationMeta('id'); + @override + late final GeneratedColumn id = GeneratedColumn('id', aliasedName, false, + type: DriftSqlType.int, requiredDuringInsert: true); + static const VerificationMeta _dataMeta = const VerificationMeta('data'); + @override + late final GeneratedColumnWithTypeConverter data = GeneratedColumn( + 'data', aliasedName, false, + type: DriftSqlType.string, requiredDuringInsert: true) + .withConverter($EquipmentsTable.$converterdata); + @override + List get $columns => [id, data]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'equipments'; + @override + VerificationContext validateIntegrity(Insertable instance, + {bool isInserting = false}) { + final context = VerificationContext(); + final data = instance.toColumns(true); + if (data.containsKey('id')) { + context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); + } else if (isInserting) { + context.missing(_idMeta); + } + context.handle(_dataMeta, const VerificationResult.success()); + return context; + } + + @override + Set get $primaryKey => const {}; + @override + EquipmentTable map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return EquipmentTable( + id: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}id'])!, + data: $EquipmentsTable.$converterdata.fromSql( + attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}data'])!), + ); + } + + @override + $EquipmentsTable createAlias(String alias) { + return $EquipmentsTable(attachedDatabase, alias); + } + + static TypeConverter $converterdata = const EquipmentConverter(); +} + +class EquipmentTable extends DataClass implements Insertable { + final int id; + final Equipment data; + const EquipmentTable({required this.id, required this.data}); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['id'] = Variable(id); + { + map['data'] = Variable($EquipmentsTable.$converterdata.toSql(data)); + } + return map; + } + + EquipmentsCompanion toCompanion(bool nullToAbsent) { + return EquipmentsCompanion( + id: Value(id), + data: Value(data), + ); + } + + factory EquipmentTable.fromJson(Map json, {ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return EquipmentTable( + id: serializer.fromJson(json['id']), + data: serializer.fromJson(json['data']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'id': serializer.toJson(id), + 'data': serializer.toJson(data), + }; + } + + EquipmentTable copyWith({int? id, Equipment? data}) => EquipmentTable( + id: id ?? this.id, + data: data ?? this.data, + ); + @override + String toString() { + return (StringBuffer('EquipmentTable(') + ..write('id: $id, ') + ..write('data: $data') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash(id, data); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is EquipmentTable && other.id == this.id && other.data == this.data); +} + +class EquipmentsCompanion extends UpdateCompanion { + final Value id; + final Value data; + final Value rowid; + const EquipmentsCompanion({ + this.id = const Value.absent(), + this.data = const Value.absent(), + this.rowid = const Value.absent(), + }); + EquipmentsCompanion.insert({ + required int id, + required Equipment data, + this.rowid = const Value.absent(), + }) : id = Value(id), + data = Value(data); + static Insertable custom({ + Expression? id, + Expression? data, + Expression? rowid, + }) { + return RawValuesInsertable({ + if (id != null) 'id': id, + if (data != null) 'data': data, + if (rowid != null) 'rowid': rowid, + }); + } + + EquipmentsCompanion copyWith({Value? id, Value? data, Value? rowid}) { + return EquipmentsCompanion( + id: id ?? this.id, + data: data ?? this.data, + rowid: rowid ?? this.rowid, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (id.present) { + map['id'] = Variable(id.value); + } + if (data.present) { + map['data'] = Variable($EquipmentsTable.$converterdata.toSql(data.value)); + } + if (rowid.present) { + map['rowid'] = Variable(rowid.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('EquipmentsCompanion(') + ..write('id: $id, ') + ..write('data: $data, ') + ..write('rowid: $rowid') + ..write(')')) + .toString(); + } +} + +class $CategoriesTable extends Categories with TableInfo<$CategoriesTable, CategoryTable> { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + $CategoriesTable(this.attachedDatabase, [this._alias]); + static const VerificationMeta _idMeta = const VerificationMeta('id'); + @override + late final GeneratedColumn id = GeneratedColumn('id', aliasedName, false, + type: DriftSqlType.int, requiredDuringInsert: true); + static const VerificationMeta _dataMeta = const VerificationMeta('data'); + @override + late final GeneratedColumnWithTypeConverter data = + GeneratedColumn('data', aliasedName, false, + type: DriftSqlType.string, requiredDuringInsert: true) + .withConverter($CategoriesTable.$converterdata); + @override + List get $columns => [id, data]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'categories'; + @override + VerificationContext validateIntegrity(Insertable instance, + {bool isInserting = false}) { + final context = VerificationContext(); + final data = instance.toColumns(true); + if (data.containsKey('id')) { + context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); + } else if (isInserting) { + context.missing(_idMeta); + } + context.handle(_dataMeta, const VerificationResult.success()); + return context; + } + + @override + Set get $primaryKey => const {}; + @override + CategoryTable map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return CategoryTable( + id: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}id'])!, + data: $CategoriesTable.$converterdata.fromSql( + attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}data'])!), + ); + } + + @override + $CategoriesTable createAlias(String alias) { + return $CategoriesTable(attachedDatabase, alias); + } + + static TypeConverter $converterdata = const ExerciseCategoryConverter(); +} + +class CategoryTable extends DataClass implements Insertable { + final int id; + final ExerciseCategory data; + const CategoryTable({required this.id, required this.data}); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['id'] = Variable(id); + { + map['data'] = Variable($CategoriesTable.$converterdata.toSql(data)); + } + return map; + } + + CategoriesCompanion toCompanion(bool nullToAbsent) { + return CategoriesCompanion( + id: Value(id), + data: Value(data), + ); + } + + factory CategoryTable.fromJson(Map json, {ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return CategoryTable( + id: serializer.fromJson(json['id']), + data: serializer.fromJson(json['data']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'id': serializer.toJson(id), + 'data': serializer.toJson(data), + }; + } + + CategoryTable copyWith({int? id, ExerciseCategory? data}) => CategoryTable( + id: id ?? this.id, + data: data ?? this.data, + ); + @override + String toString() { + return (StringBuffer('CategoryTable(') + ..write('id: $id, ') + ..write('data: $data') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash(id, data); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is CategoryTable && other.id == this.id && other.data == this.data); +} + +class CategoriesCompanion extends UpdateCompanion { + final Value id; + final Value data; + final Value rowid; + const CategoriesCompanion({ + this.id = const Value.absent(), + this.data = const Value.absent(), + this.rowid = const Value.absent(), + }); + CategoriesCompanion.insert({ + required int id, + required ExerciseCategory data, + this.rowid = const Value.absent(), + }) : id = Value(id), + data = Value(data); + static Insertable custom({ + Expression? id, + Expression? data, + Expression? rowid, + }) { + return RawValuesInsertable({ + if (id != null) 'id': id, + if (data != null) 'data': data, + if (rowid != null) 'rowid': rowid, + }); + } + + CategoriesCompanion copyWith({Value? id, Value? data, Value? rowid}) { + return CategoriesCompanion( + id: id ?? this.id, + data: data ?? this.data, + rowid: rowid ?? this.rowid, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (id.present) { + map['id'] = Variable(id.value); + } + if (data.present) { + map['data'] = Variable($CategoriesTable.$converterdata.toSql(data.value)); + } + if (rowid.present) { + map['rowid'] = Variable(rowid.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('CategoriesCompanion(') + ..write('id: $id, ') + ..write('data: $data, ') + ..write('rowid: $rowid') + ..write(')')) + .toString(); + } +} + +class $LanguagesTable extends Languages with TableInfo<$LanguagesTable, LanguagesTable> { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + $LanguagesTable(this.attachedDatabase, [this._alias]); + static const VerificationMeta _idMeta = const VerificationMeta('id'); + @override + late final GeneratedColumn id = GeneratedColumn('id', aliasedName, false, + type: DriftSqlType.int, requiredDuringInsert: true); + static const VerificationMeta _dataMeta = const VerificationMeta('data'); + @override + late final GeneratedColumnWithTypeConverter data = GeneratedColumn( + 'data', aliasedName, false, + type: DriftSqlType.string, requiredDuringInsert: true) + .withConverter($LanguagesTable.$converterdata); + @override + List get $columns => [id, data]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'languages'; + @override + VerificationContext validateIntegrity(Insertable instance, + {bool isInserting = false}) { + final context = VerificationContext(); + final data = instance.toColumns(true); + if (data.containsKey('id')) { + context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); + } else if (isInserting) { + context.missing(_idMeta); + } + context.handle(_dataMeta, const VerificationResult.success()); + return context; + } + + @override + Set get $primaryKey => const {}; + @override + LanguagesTable map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return LanguagesTable( + id: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}id'])!, + data: $LanguagesTable.$converterdata.fromSql( + attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}data'])!), + ); + } + + @override + $LanguagesTable createAlias(String alias) { + return $LanguagesTable(attachedDatabase, alias); + } + + static TypeConverter $converterdata = const LanguageConverter(); +} + +class LanguagesTable extends DataClass implements Insertable { + final int id; + final Language data; + const LanguagesTable({required this.id, required this.data}); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['id'] = Variable(id); + { + map['data'] = Variable($LanguagesTable.$converterdata.toSql(data)); + } + return map; + } + + LanguagesCompanion toCompanion(bool nullToAbsent) { + return LanguagesCompanion( + id: Value(id), + data: Value(data), + ); + } + + factory LanguagesTable.fromJson(Map json, {ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return LanguagesTable( + id: serializer.fromJson(json['id']), + data: serializer.fromJson(json['data']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'id': serializer.toJson(id), + 'data': serializer.toJson(data), + }; + } + + LanguagesTable copyWith({int? id, Language? data}) => LanguagesTable( + id: id ?? this.id, + data: data ?? this.data, + ); + @override + String toString() { + return (StringBuffer('LanguagesTable(') + ..write('id: $id, ') + ..write('data: $data') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash(id, data); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is LanguagesTable && other.id == this.id && other.data == this.data); +} + +class LanguagesCompanion extends UpdateCompanion { + final Value id; + final Value data; + final Value rowid; + const LanguagesCompanion({ + this.id = const Value.absent(), + this.data = const Value.absent(), + this.rowid = const Value.absent(), + }); + LanguagesCompanion.insert({ + required int id, + required Language data, + this.rowid = const Value.absent(), + }) : id = Value(id), + data = Value(data); + static Insertable custom({ + Expression? id, + Expression? data, + Expression? rowid, + }) { + return RawValuesInsertable({ + if (id != null) 'id': id, + if (data != null) 'data': data, + if (rowid != null) 'rowid': rowid, + }); + } + + LanguagesCompanion copyWith({Value? id, Value? data, Value? rowid}) { + return LanguagesCompanion( + id: id ?? this.id, + data: data ?? this.data, + rowid: rowid ?? this.rowid, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (id.present) { + map['id'] = Variable(id.value); + } + if (data.present) { + map['data'] = Variable($LanguagesTable.$converterdata.toSql(data.value)); + } + if (rowid.present) { + map['rowid'] = Variable(rowid.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('LanguagesCompanion(') + ..write('id: $id, ') + ..write('data: $data, ') + ..write('rowid: $rowid') + ..write(')')) + .toString(); + } +} + +abstract class _$ExerciseDatabase extends GeneratedDatabase { + _$ExerciseDatabase(QueryExecutor e) : super(e); + late final $ExercisesTable exercises = $ExercisesTable(this); + late final $MusclesTable muscles = $MusclesTable(this); + late final $EquipmentsTable equipments = $EquipmentsTable(this); + late final $CategoriesTable categories = $CategoriesTable(this); + late final $LanguagesTable languages = $LanguagesTable(this); + @override + Iterable> get allTables => + allSchemaEntities.whereType>(); + @override + List get allSchemaEntities => + [exercises, muscles, equipments, categories, languages]; +} diff --git a/lib/database/exercises/type_converters.dart b/lib/database/exercises/type_converters.dart new file mode 100644 index 000000000..b494aa2aa --- /dev/null +++ b/lib/database/exercises/type_converters.dart @@ -0,0 +1,134 @@ +import 'dart:convert'; + +import 'package:drift/drift.dart'; +import 'package:wger/models/exercises/alias.dart'; +import 'package:wger/models/exercises/category.dart'; +import 'package:wger/models/exercises/comment.dart'; +import 'package:wger/models/exercises/equipment.dart'; +import 'package:wger/models/exercises/exercise.dart'; +import 'package:wger/models/exercises/image.dart'; +import 'package:wger/models/exercises/language.dart'; +import 'package:wger/models/exercises/muscle.dart'; +import 'package:wger/models/exercises/translation.dart'; +import 'package:wger/models/exercises/variation.dart'; +import 'package:wger/models/exercises/video.dart'; + +class ExerciseBaseConverter extends TypeConverter { + const ExerciseBaseConverter(); + + @override + Exercise fromSql(String fromDb) { + final Map baseData = json.decode(fromDb); + + final category = ExerciseCategory.fromJson(baseData['categories']); + final musclesPrimary = baseData['muscless'].map((e) => Muscle.fromJson(e)).toList(); + final musclesSecondary = baseData['musclesSecondary'].map((e) => Muscle.fromJson(e)).toList(); + final equipment = baseData['equipments'].map((e) => Equipment.fromJson(e)).toList(); + final images = baseData['images'].map((e) => ExerciseImage.fromJson(e)).toList(); + final videos = baseData['videos'].map((e) => Video.fromJson(e)).toList(); + + final List translations = []; + for (final exerciseData in baseData['translations']) { + final translation = Translation( + id: exerciseData['id'], + name: exerciseData['name'], + description: exerciseData['description'], + exerciseId: baseData['id'], + ); + translation.aliases = exerciseData['aliases'].map((e) => Alias.fromJson(e)).toList(); + translation.notes = exerciseData['notes'].map((e) => Comment.fromJson(e)).toList(); + translation.language = Language.fromJson(exerciseData['languageObj']); + translations.add(translation); + } + + final exerciseBase = Exercise( + id: baseData['id'], + uuid: baseData['uuid'], + created: null, + //creationDate: toDate(baseData['creation_date']), + musclesSecondary: musclesSecondary.cast(), + muscles: musclesPrimary.cast(), + equipment: equipment.cast(), + category: category, + images: images.cast(), + translations: translations, + videos: videos.cast