Fix conflicts and issues.
This commit is contained in:
@@ -8,6 +8,7 @@ import 'package:material_design_icons_flutter/material_design_icons_flutter.dart
|
||||
import 'package:thingsboard_app/constants/assets_path.dart';
|
||||
import 'package:thingsboard_app/core/context/tb_context.dart';
|
||||
import 'package:thingsboard_app/core/context/tb_context_widget.dart';
|
||||
import 'package:thingsboard_app/generated/l10n.dart';
|
||||
import 'package:thingsboard_app/widgets/tb_progress_indicator.dart';
|
||||
import 'package:thingsboard_client/thingsboard_client.dart';
|
||||
|
||||
@@ -67,11 +68,12 @@ class _LoginPageState extends TbPageState<LoginPage> {
|
||||
ThingsboardImage.thingsBoardWithTitle,
|
||||
height: 25,
|
||||
color: Theme.of(context).primaryColor,
|
||||
semanticsLabel: 'ThingsBoard Logo')
|
||||
semanticsLabel:
|
||||
'${S.of(context).logoDefaultValue}')
|
||||
]),
|
||||
SizedBox(height: 32),
|
||||
Row(children: [
|
||||
Text('Login to your account',
|
||||
Text('${S.of(context).loginNotification}',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 28,
|
||||
@@ -91,7 +93,7 @@ class _LoginPageState extends TbPageState<LoginPage> {
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16),
|
||||
child: Text('OR'),
|
||||
child: Text('${S.of(context).OR}'),
|
||||
),
|
||||
Flexible(child: Divider())
|
||||
],
|
||||
@@ -108,14 +110,16 @@ class _LoginPageState extends TbPageState<LoginPage> {
|
||||
validator:
|
||||
FormBuilderValidators.compose([
|
||||
FormBuilderValidators.required(
|
||||
errorText: 'Email is required.'),
|
||||
errorText:
|
||||
'${S.of(context).emailRequireText}'),
|
||||
FormBuilderValidators.email(
|
||||
errorText:
|
||||
'Invalid email format.')
|
||||
'${S.of(context).emailInvalidText}')
|
||||
]),
|
||||
decoration: InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
labelText: 'Email'),
|
||||
labelText:
|
||||
'${S.of(context).email}'),
|
||||
),
|
||||
SizedBox(height: 28),
|
||||
ValueListenableBuilder(
|
||||
@@ -130,7 +134,7 @@ class _LoginPageState extends TbPageState<LoginPage> {
|
||||
.compose([
|
||||
FormBuilderValidators.required(
|
||||
errorText:
|
||||
'Password is required.')
|
||||
'${S.of(context).passwordRequireText}')
|
||||
]),
|
||||
decoration: InputDecoration(
|
||||
suffixIcon: IconButton(
|
||||
@@ -145,7 +149,8 @@ class _LoginPageState extends TbPageState<LoginPage> {
|
||||
},
|
||||
),
|
||||
border: OutlineInputBorder(),
|
||||
labelText: 'Password'),
|
||||
labelText:
|
||||
'${S.of(context).password}'),
|
||||
);
|
||||
})
|
||||
],
|
||||
@@ -158,7 +163,7 @@ class _LoginPageState extends TbPageState<LoginPage> {
|
||||
_forgotPassword();
|
||||
},
|
||||
child: Text(
|
||||
'Forgot Password?',
|
||||
'${S.of(context).passwordForgotText}',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
@@ -172,7 +177,7 @@ class _LoginPageState extends TbPageState<LoginPage> {
|
||||
),
|
||||
Spacer(),
|
||||
ElevatedButton(
|
||||
child: Text('Log In'),
|
||||
child: Text('${S.of(context).login}'),
|
||||
style: ElevatedButton.styleFrom(
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 16)),
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:form_builder_validators/form_builder_validators.dart';
|
||||
import 'package:thingsboard_app/core/auth/login/login_page_background.dart';
|
||||
import 'package:thingsboard_app/core/context/tb_context.dart';
|
||||
import 'package:thingsboard_app/core/context/tb_context_widget.dart';
|
||||
import 'package:thingsboard_app/generated/l10n.dart';
|
||||
import 'package:thingsboard_app/widgets/tb_app_bar.dart';
|
||||
import 'package:thingsboard_app/widgets/tb_progress_indicator.dart';
|
||||
|
||||
@@ -31,7 +32,7 @@ class _ResetPasswordRequestPageState
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: TbAppBar(
|
||||
tbContext,
|
||||
title: Text('Reset password'),
|
||||
title: Text('${S.of(context).passwordReset}'),
|
||||
),
|
||||
body: Stack(children: [
|
||||
SizedBox.expand(
|
||||
@@ -45,7 +46,7 @@ class _ResetPasswordRequestPageState
|
||||
children: [
|
||||
SizedBox(height: 16),
|
||||
Text(
|
||||
'Enter the email associated with your account and we\'ll send an email with password reset link',
|
||||
'${S.of(context).passwordResetText}',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Color(0xFFAFAFAF),
|
||||
@@ -58,17 +59,20 @@ class _ResetPasswordRequestPageState
|
||||
autofocus: true,
|
||||
validator: FormBuilderValidators.compose([
|
||||
FormBuilderValidators.required(
|
||||
errorText: 'Email is required.'),
|
||||
errorText:
|
||||
'${S.of(context).emailRequireText}'),
|
||||
FormBuilderValidators.email(
|
||||
errorText: 'Invalid email format.')
|
||||
errorText:
|
||||
'${S.of(context).emailInvalidText}')
|
||||
]),
|
||||
decoration: InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
labelText: 'Email *'),
|
||||
labelText: '${S.of(context).email} *'),
|
||||
),
|
||||
Spacer(),
|
||||
ElevatedButton(
|
||||
child: Text('Request password reset'),
|
||||
child: Text(
|
||||
'${S.of(context).requestPasswordReset}'),
|
||||
style: ElevatedButton.styleFrom(
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 16)),
|
||||
@@ -104,7 +108,8 @@ class _ResetPasswordRequestPageState
|
||||
await Future.delayed(Duration(milliseconds: 300));
|
||||
await tbClient.sendResetPasswordLink(email);
|
||||
_isLoadingNotifier.value = false;
|
||||
showSuccessNotification('Password reset link was successfully sent!');
|
||||
showSuccessNotification(
|
||||
'${S.of(context).passwordResetLinkSuccessfullySentNotification}');
|
||||
} catch (e) {
|
||||
_isLoadingNotifier.value = false;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:thingsboard_app/core/context/tb_context.dart';
|
||||
import 'package:thingsboard_app/core/context/tb_context_widget.dart';
|
||||
import 'package:thingsboard_app/generated/l10n.dart';
|
||||
import 'package:thingsboard_app/utils/utils.dart';
|
||||
import 'package:thingsboard_client/thingsboard_client.dart';
|
||||
|
||||
@@ -54,15 +55,15 @@ mixin EntitiesBase<T, P> on HasTbContext {
|
||||
Key? getKey(T entity) => null;
|
||||
|
||||
Widget buildEntityListCard(BuildContext context, T entity) {
|
||||
return Text('Not implemented!');
|
||||
return Text('${S.of(context).notImplemented}');
|
||||
}
|
||||
|
||||
Widget buildEntityListWidgetCard(BuildContext context, T entity) {
|
||||
return Text('Not implemented!');
|
||||
return Text('${S.of(context).notImplemented}');
|
||||
}
|
||||
|
||||
Widget buildEntityGridCard(BuildContext context, T entity) {
|
||||
return Text('Not implemented!');
|
||||
return Text('${S.of(context).notImplemented}');
|
||||
}
|
||||
|
||||
double? gridChildAspectRatio() => null;
|
||||
@@ -337,7 +338,7 @@ abstract class BaseEntitiesState<T, P>
|
||||
Widget noItemsFoundIndicatorBuilder(BuildContext context) {
|
||||
return FirstPageExceptionIndicator(
|
||||
title: widget.noItemsFoundText,
|
||||
message: 'The list is currently empty.',
|
||||
message: '${S.of(context).listIsEmptyText}',
|
||||
onTryAgain: widget.searchMode ? null : () => pagingController.refresh(),
|
||||
);
|
||||
}
|
||||
@@ -391,8 +392,8 @@ class FirstPageExceptionIndicator extends StatelessWidget {
|
||||
Icons.refresh,
|
||||
color: Colors.white,
|
||||
),
|
||||
label: const Text(
|
||||
'Try Again',
|
||||
label: Text(
|
||||
'${S.of(context).tryAgain}',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Colors.white,
|
||||
|
||||
Reference in New Issue
Block a user