Merge branch 'master' into feat/data-persistence
# Conflicts: # lib/main.dart # lib/providers/exercises.dart # lib/widgets/workouts/day.dart # pubspec.lock # pubspec.yaml
7
.github/dependabot.yml
vendored
@@ -9,4 +9,9 @@ updates:
|
||||
- package-ecosystem: "pub"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
interval: "weekly"
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
44
.github/workflows/build-release.yml
vendored
@@ -4,27 +4,15 @@ on:
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: wger
|
||||
|
||||
jobs:
|
||||
deploy_android:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout application code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: wger
|
||||
|
||||
- name: Checkout flathub repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: wger-project/test
|
||||
path: flathub
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v1
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 17.x
|
||||
|
||||
@@ -34,7 +22,7 @@ jobs:
|
||||
ruby-version: 3
|
||||
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v1
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: stable
|
||||
flutter-version: 3.16.x
|
||||
@@ -83,28 +71,28 @@ jobs:
|
||||
WGER_API_KEY: ${{ secrets.WGER_API_KEY }}
|
||||
|
||||
- name: Upload build to Play Store
|
||||
uses: maierj/fastlane-action@v2.2.1
|
||||
uses: maierj/fastlane-action@v3.0.0
|
||||
with:
|
||||
lane: production
|
||||
subdirectory: wger
|
||||
|
||||
- name: Make Github release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: ${{ env.VERSION }}
|
||||
files: |
|
||||
wger/build/app/outputs/bundle/release/app-release.aab
|
||||
wger/flatpak/scripts/flatpak_generator_exports/wger-linux-x86_64.tar.gz
|
||||
wger/flatpak/scripts/flatpak_generator_exports/wger-linux-x86_64.sha256
|
||||
build/app/outputs/bundle/release/app-release.aab
|
||||
flatpak/scripts/flatpak_generator_exports/wger-linux-x86_64.tar.gz
|
||||
flatpak/scripts/flatpak_generator_exports/wger-linux-x86_64.sha256
|
||||
|
||||
- name: Generate flathub manifest
|
||||
run: |
|
||||
cd flatpak/scripts
|
||||
dart pub get
|
||||
dart manifest_generator.dart --meta ../flatpak_meta.json --github
|
||||
cp flatpak_generator_exports/de.wger.flutter.json ../../../flathub
|
||||
mkdir ../../flathub
|
||||
cp flatpak_generator_exports/de.wger.flutter.json ../../flathub
|
||||
|
||||
- name: Push config to flathub repository
|
||||
- name: Push updated config to flathub repository
|
||||
uses: cpina/github-action-push-to-another-repository@main
|
||||
env:
|
||||
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
|
||||
@@ -124,12 +112,14 @@ jobs:
|
||||
# would not work, as it would trigger this workflow again. So as
|
||||
# a workaround, we use the v-tag to trigger this workflow, add a new
|
||||
# one without the v and push it.
|
||||
- name: Commit pubspec version and delete branch
|
||||
- name: Commit pubspec version and delete tag
|
||||
run: |
|
||||
git config user.name Github-actions
|
||||
git config user.name Github-Actions
|
||||
git config user.email github-actions@github.com
|
||||
git add .
|
||||
git checkout -b release-${{ env.VERSION }}
|
||||
git add pubspec.yaml
|
||||
git commit -m "Bump version to $( flutter pub run cider version )"
|
||||
git tag ${{ env.VERSION }}
|
||||
git push origin HEAD:master --tags
|
||||
git push origin --delete ${{ env.VERSION_V }}
|
||||
git push ${{ env.VERSION }}
|
||||
git push --delete ${{ env.VERSION_V }}
|
||||
git push
|
||||
4
.github/workflows/ci.yml
vendored
@@ -13,10 +13,10 @@ jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Flutter
|
||||
uses: subosito/flutter-action@v1
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
flutter-version: '3.16.x'
|
||||
|
||||
4
.github/workflows/linter.yml
vendored
@@ -14,10 +14,10 @@ jobs:
|
||||
steps:
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v1
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
flutter-version: '3.16.x'
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
- artchiee - <https://github.com/artchiee>
|
||||
- Tejas Bir Singh - <https://github.com/tejasbirsingh>
|
||||
- Abhishek Saini - <https://github.com/Abhisheksainii>
|
||||
- Shey Alnasrawi - <https://github.com/Milksheyke>
|
||||
|
||||
## Translators
|
||||
|
||||
|
||||
33
README.md
@@ -8,11 +8,11 @@ If you want to contribute, hop on the Discord server and say hi!
|
||||
|
||||
|
||||
<p>
|
||||
<img src="https://raw.githubusercontent.com/wger-project/flutter/master/fastlane/metadata/android/en-US/images/phoneScreenshots/01%20-%20dashboard.png" width="200" />
|
||||
<img src="https://raw.githubusercontent.com/wger-project/flutter/master/fastlane/metadata/android/en-US/images/phoneScreenshots/01%20-%20dashboard.png" width="200" alt="" />
|
||||
|
||||
<img src="https://raw.githubusercontent.com/wger-project/flutter/master/fastlane/metadata/android/en-US/images/phoneScreenshots/04%20-%20measurements.png" width="200" />
|
||||
<img src="https://raw.githubusercontent.com/wger-project/flutter/master/fastlane/metadata/android/en-US/images/phoneScreenshots/04%20-%20measurements.png" width="200" alt="" />
|
||||
|
||||
<img src="https://raw.githubusercontent.com/wger-project/flutter/master/fastlane/metadata/android/en-US/images/phoneScreenshots/05%20-%20nutritional%20plan.png" width="200" />
|
||||
<img src="https://raw.githubusercontent.com/wger-project/flutter/master/fastlane/metadata/android/en-US/images/phoneScreenshots/05%20-%20nutritional%20plan.png" width="200" alt="" />
|
||||
</p>
|
||||
|
||||
## 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:
|
||||
<https://flutter.dev/docs/get-started/install>.
|
||||
|
||||
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 <http://localhost:8000/de/user/api-key>
|
||||
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/).
|
||||
|
||||
[](https://hosted.weblate.org/engage/wger/)
|
||||
|
||||
@@ -86,7 +87,7 @@ If you're not sure if something is a bug or not, feel free to file a bug anyway.
|
||||
|
||||
* **Discord:** <https://discord.gg/rPWFv6W>
|
||||
* **Issue tracker:** <https://github.com/wger-project/flutter/issues>
|
||||
* **Twitter:** <https://twitter.com/wger_project>
|
||||
* **Mastodon:** <https://fosstodon.org/@wger>
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="de.wger.flutter">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="de.wger.flutter">
|
||||
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
|
||||
calls FlutterMain.startInitialization(this); in its onCreate method.
|
||||
In most cases you can leave this as-is, but you if you want to provide
|
||||
@@ -7,6 +8,7 @@
|
||||
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
@@ -14,24 +16,40 @@
|
||||
</intent>
|
||||
</queries>
|
||||
|
||||
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="false" android:xlargeScreens="false" />
|
||||
<supports-screens
|
||||
android:smallScreens="true"
|
||||
android:normalScreens="true"
|
||||
android:largeScreens="true"
|
||||
android:xlargeScreens="true" />
|
||||
|
||||
<application
|
||||
android:name="${applicationName}"
|
||||
android:label="wger"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
>
|
||||
android:networkSecurityConfig="@xml/network_security_config">
|
||||
|
||||
<meta-data android:name="wger.api_key" android:value="${WGER_API_KEY}" />
|
||||
<meta-data android:name="wger.check_min_app_version" android:value="true" />
|
||||
<meta-data
|
||||
android:name="wger.api_key"
|
||||
android:value="${WGER_API_KEY}" />
|
||||
<meta-data
|
||||
android:name="wger.check_min_app_version"
|
||||
android:value="true" />
|
||||
|
||||
<activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" />
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme" />
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
@@ -41,6 +59,8 @@
|
||||
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data android:name="flutterEmbedding" android:value="2" />
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
</manifest>
|
||||
|
Before Width: | Height: | Size: 173 KiB After Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 751 KiB After Width: | Height: | Size: 653 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 104 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 236 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 314 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 309 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 414 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 755 KiB After Width: | Height: | Size: 656 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 105 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 238 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 313 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 311 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 412 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 751 KiB After Width: | Height: | Size: 653 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 109 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 236 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 313 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 309 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 412 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 171 KiB After Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 751 KiB After Width: | Height: | Size: 653 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 104 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 237 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 314 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 309 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 415 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 175 KiB After Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 748 KiB After Width: | Height: | Size: 650 KiB |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 236 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 314 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 310 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 414 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 746 KiB After Width: | Height: | Size: 649 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 40 KiB |