Changed several strings

This commit is contained in:
Mrdabup 2024-07-15 02:08:17 -04:00
parent bfcee03185
commit 3953f80940
6 changed files with 19 additions and 12 deletions

View file

@ -66,7 +66,7 @@ class _ExpandingInputFabState extends State<ExpandingInputFab> {
}, },
splashRadius: 16, splashRadius: 16,
iconSize: 28, iconSize: 28,
icon: _isExtended ? const Icon(Icons.close) : const Icon(Icons.search), icon: _isExtended ? const Icon(Icons.close) : const Icon(Icons.person_search),
), ),
) )
], ],

View file

@ -21,7 +21,7 @@ class _FriendsListAppBarState extends State<FriendsListAppBar> with AutomaticKee
Widget build(BuildContext context) { Widget build(BuildContext context) {
super.build(context); super.build(context);
return AppBar( return AppBar(
title: const Text("recon"), title: const Text("OpenContacts"),
actions: [ actions: [
Consumer<MessagingClient>(builder: (context, client, _) { Consumer<MessagingClient>(builder: (context, client, _) {
return PopupMenuButton<OnlineStatus>( return PopupMenuButton<OnlineStatus>(
@ -85,7 +85,7 @@ class _FriendsListAppBarState extends State<FriendsListAppBar> with AutomaticKee
}, },
itemBuilder: (BuildContext context) => [ itemBuilder: (BuildContext context) => [
MenuItemDefinition( MenuItemDefinition(
name: "Find Users", name: "Add Users",
icon: Icons.person_add, icon: Icons.person_add,
onTap: () async { onTap: () async {
final mClient = Provider.of<MessagingClient>(context, listen: false); final mClient = Provider.of<MessagingClient>(context, listen: false);

View file

@ -56,7 +56,7 @@ class _UserSearchState extends State<UserSearch> {
final mClient = Provider.of<MessagingClient>(context, listen: false); final mClient = Provider.of<MessagingClient>(context, listen: false);
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: const Text("Find Users"), title: const Text("Add Users"),
), ),
body: SafeArea( body: SafeArea(
top: false, top: false,

View file

@ -27,7 +27,7 @@ class _LoginScreenState extends State<LoginScreen> {
late final FocusNode _totpFocusNode; late final FocusNode _totpFocusNode;
bool _isLoading = false; bool _isLoading = false;
bool _isUsernameEmail = false; bool _isEmailResetSend = false;
String _error = ""; String _error = "";
bool _needsTotp = false; bool _needsTotp = false;
@ -47,7 +47,7 @@ class _LoginScreenState extends State<LoginScreen> {
_totpFocusNode.dispose(); _totpFocusNode.dispose();
super.dispose(); super.dispose();
} }
RegExp emailReg = new RegExp( RegExp emailReg = RegExp(
r"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$", r"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$",
caseSensitive: false, caseSensitive: false,
@ -112,15 +112,22 @@ class _LoginScreenState extends State<LoginScreen> {
} }
} }
Future<void> passwordResetSubmit() async { Future<void> passwordResetSubmit() async {
if (_usernameController.text.contains(emailReg) || _passwordController.text.isEmpty) { if (_usernameController.text.isEmpty) {
setState(() { setState(() {
_error = "Please provide an email on the 'Username' textbox"; _error = "Please provide an email on the 'Username' textbox";
}); });
return; return;
}
if (_usernameController.text.contains(emailReg)) {
setState(() {
_error = "An email to reset your password has been requested to resonite.";
_isEmailResetSend = true;
});
return;
} }
setState(() { setState(() {
_error = ""; _error = "";
_isLoading = false; _isEmailResetSend = true;
}); });
/*try { /*try {
final authData = await ApiClient.tryLogin( final authData = await ApiClient.tryLogin(
@ -223,7 +230,7 @@ class _LoginScreenState extends State<LoginScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: const Text("recon"), title: const Text("OpenContacts"),
), ),
body: Builder(builder: (context) { body: Builder(builder: (context) {
return ListView( return ListView(
@ -292,7 +299,7 @@ class _LoginScreenState extends State<LoginScreen> {
), ),
Padding( Padding(
padding: const EdgeInsets.only(top: 16), padding: const EdgeInsets.only(top: 16),
child: _isUsernameEmail child: _isEmailResetSend
? const Center(child: CircularProgressIndicator()) ? const Center(child: CircularProgressIndicator())
: TextButton.icon( : TextButton.icon(
onPressed: passwordResetSubmit, onPressed: passwordResetSubmit,

View file

@ -95,7 +95,7 @@ class SettingsPage extends StatelessWidget {
child: Image.asset("assets/images/logo512.png"), child: Image.asset("assets/images/logo512.png"),
), ),
), ),
applicationLegalese: "Created by Nutcake with love <3", applicationLegalese: "ReCon by Nutcake, OpenContacts by ThatOneJackalGuy. Both apps made with <3",
); );
}, },
) )

View file

@ -54,7 +54,7 @@ class UpdateNotifier extends StatelessWidget {
.secondary .secondary
), ),
icon: const Icon(Icons.download), icon: const Icon(Icons.download),
label: const Text("Get it on Github"), label: const Text("Get it on Forgejo"),
), ),
], ],
), ),