Skip to content

Commit

Permalink
feat: multiple improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Turtlepaw committed Oct 31, 2024
1 parent c5f5a79 commit b5c33e7
Show file tree
Hide file tree
Showing 14 changed files with 508 additions and 310 deletions.
Binary file added images/Bingo_WIP_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Onboarding.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/components/debug_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';

import '../utils/sharedLogger.dart';
import 'challenges/confirmDialog.dart';
import 'dialog/confirmDialog.dart';

class DebugPanel extends StatelessWidget {
const DebugPanel({super.key});
Expand Down
74 changes: 74 additions & 0 deletions lib/components/dialog/changePassword.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';

class ChangePasswordDialog extends StatefulWidget {
const ChangePasswordDialog({super.key});

@override
_ChangePasswordState createState() => _ChangePasswordState();
}

class _ChangePasswordState extends State<ChangePasswordDialog> {
bool _isLoading = false;

@override
Widget build(BuildContext context) {
var theme = Theme.of(context);
final color = theme.colorScheme.onSurface;
final destructiveButtonStyle = ButtonStyle(
backgroundColor: WidgetStateProperty.all(theme.colorScheme.error )
);

return Dialog(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: const EdgeInsets.only(top: 5, left: 10, bottom: 10),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Column(
children: [
Icon(Symbols.mark_email_read_rounded, size: 40, color: color,),
const SizedBox(height: 10,),
Text(
"We've sent an email",
style: theme.textTheme.headlineSmall,
),
],
),
const SizedBox(height: 3,),
MarkdownBody(
data: "We've sent an email to change your password, don't forget to check your spam folder.",
styleSheet: MarkdownStyleSheet(
p: theme.textTheme.bodyLarge,
textAlign: WrapAlignment.center,
),
// style: theme.textTheme.bodyLarge,
// textAlign: TextAlign.center,
),
],
)),
const SizedBox(height: 5),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
FilledButton(
onPressed: (){
Navigator.of(context).pop();
}, child: const Text("Got it"))
],
)
],
),
));
}

void _handleClose() {
return Navigator.of(context).pop();
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions lib/login.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:fitness_challenges/components/debug_panel.dart';
import 'package:fitness_challenges/components/loader.dart';
import 'package:fitness_challenges/utils/challengeManager.dart';
import 'package:fitness_challenges/utils/sharedLogger.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -106,6 +107,8 @@ class _LoginPageState extends State<LoginPage> {
),
);

Provider.of<ChallengeProvider>(context).reloadChallenges(context);

logger.debug("Successfully logged in");
context.go("/home");
}
Expand Down Expand Up @@ -313,6 +316,7 @@ class _LoginPageState extends State<LoginPage> {
Text(
"Sign in with username",
style: theme.textTheme.headlineMedium,
textAlign: TextAlign.center,
),
const SizedBox(height: 5),
Padding(
Expand Down
6 changes: 3 additions & 3 deletions lib/routes/challenge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import 'package:pocketbase/pocketbase.dart';
import 'package:provider/provider.dart';
import 'package:relative_time/relative_time.dart';

import '../components/challenges/codeDialog.dart';
import '../components/challenges/confirmDialog.dart';
import '../components/challenges/userDialog.dart';
import '../components/dialog/codeDialog.dart';
import '../components/dialog/confirmDialog.dart';
import '../components/dialog/userDialog.dart';
import '../types/collections.dart';
import '../utils/bingo/data.dart';
import '../utils/challengeManager.dart';
Expand Down
Loading

0 comments on commit b5c33e7

Please sign in to comment.