Skip to content

Commit

Permalink
Fix crawler covers
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobaraujo7 committed Jan 20, 2024
1 parent b3a8bd3 commit 23d19c3
Show file tree
Hide file tree
Showing 29 changed files with 653 additions and 84 deletions.
3 changes: 3 additions & 0 deletions .env_local
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
IGDB_CLIENT_ID="secret"
IGDB_TOKEN="secret"
RAWQ_TOKEN="secret"
7 changes: 6 additions & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,13 @@ jobs:
env:
KEYSTORE: ${{ secrets.KEYSTORE }}

- name: Decode .env
run: echo "${{ secrets.FLUTTER_ENV }}" > ${{ github.workspace }}/.env
env:
FLUTTER_ENV: ${{ secrets.FLUTTER_ENV }}

- name: Build APK
run: flutter build apk --release --split-per-abi --flavor prod
run: flutter build apk --dart-define-from-file=.env --release --split-per-abi --flavor prod
env:
KEYSTORE_PASSWD: ${{ secrets.KEYSTORE_PASSWD }}
KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.pyc
*.swp
.DS_Store
.env
.atom/
.buildlog/
.history
Expand Down
15 changes: 9 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "[DEV] yuno",
"request": "launch",
"type": "dart",
"args": [
"--flavor", "dev"
"--flavor", "dev",
"--dart-define-from-file",
".env"
]
},
{
"name": "[DEV] yuno: Profile",
"request": "launch",
"type": "dart",
"args": [
"--flavor", "dev", "--profile"
"--flavor", "dev", "--profile",
"--dart-define-from-file",
".env"
]
},
{
"name": "[PROD] yuno",
"request": "launch",
"type": "dart",
"args": [
"--flavor", "prod"
"--flavor", "prod",
"--dart-define-from-file",
".env"
]
},
{
Expand Down
26 changes: 20 additions & 6 deletions lib/app/(public)/config/edit_platform_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:gap/gap.dart';
import 'package:routefly/routefly.dart';
import 'package:yuno/app/interactor/atoms/app_atom.dart';
import 'package:yuno/app/interactor/atoms/game_atom.dart';
import 'package:yuno/app/interactor/atoms/platform_atom.dart';
import 'package:yuno/app/interactor/models/app_model.dart';
import 'package:yuno/app/interactor/models/embeds/game.dart';

Expand Down Expand Up @@ -304,7 +305,7 @@ class _EditPlatformPageState extends State<EditPlatformPage> {
if (selectedDirectory != null) {
setState(() {
platform = platform.copyWith(
folder:selectedDirectory,
folder: selectedDirectory,
);
});
}
Expand Down Expand Up @@ -335,14 +336,27 @@ class _EditPlatformPageState extends State<EditPlatformPage> {
if (platform.id != -1) const Gap(17),
FloatingActionButton(
heroTag: 'save',
onPressed: () {
onPressed: () async {

final result = platform.validator();
if (result != null) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(result),
),
);
return;
}


Routefly.pop(context);

if (isEditing) {
updatePlatform(platform);
} else {
createPlatform(platform);
}
if (context.mounted) {
Routefly.pop(context);
await createPlatform(platform);
platform = platformsState.value.firstWhere((e) => e.category == platform.category);
await syncPlatform(platform);
}
},
child: const Icon(Icons.save),
Expand Down
17 changes: 14 additions & 3 deletions lib/app/(public)/config/widgets/platform_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import 'package:yuno/app/core/widgets/animated_floating_action_button.dart';
import 'package:yuno/app/interactor/atoms/platform_atom.dart';

import '../../../../routes.dart';
import '../../../core/widgets/animated_sync_button.dart';
import '../../../interactor/actions/platform_action.dart';

class PlatformWidget extends StatelessWidget {
final Animation<double> transitionAnimation;
Expand All @@ -22,6 +24,7 @@ class PlatformWidget extends StatelessWidget {

return Scaffold(
body: ListView.builder(
padding: const EdgeInsets.only(bottom: 100),
itemCount: platforms.length,
itemBuilder: (_, index) {
final platform = platforms[index];
Expand Down Expand Up @@ -56,13 +59,21 @@ class PlatformWidget extends StatelessWidget {
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
IconButton(
icon: const Icon(Icons.sync),
onPressed: () async {},
AnimatedSyncButton(
isSyncing: platformSyncState.value.contains(platform.id),
onPressed: () async {
if(isPlatformSyncing) {
return;
}
await syncPlatform(platform);
},
),
IconButton(
icon: const Icon(Icons.edit),
onPressed: () async {
if(isPlatformSyncing) {
return;
}
Routefly.push(
routePaths.config.editPlatform,
arguments: platform,
Expand Down
Loading

0 comments on commit 23d19c3

Please sign in to comment.