Перевёл страницу входа
This commit is contained in:
parent
35712844c8
commit
d9e0f9bdfd
1 changed files with 15 additions and 15 deletions
|
|
@ -47,8 +47,8 @@ class LoginPageController extends GetxController {
|
|||
});
|
||||
} else {
|
||||
Get.snackbar(
|
||||
"Login failed",
|
||||
resp.statusMessage ?? "Unknown error",
|
||||
"Ошибка входа",
|
||||
resp.statusMessage ?? "Неизвестная ошибка",
|
||||
);
|
||||
}
|
||||
} on DioError catch (e) {
|
||||
|
|
@ -57,19 +57,19 @@ class LoginPageController extends GetxController {
|
|||
final error = errorData["error"];
|
||||
if (error != null) {
|
||||
Get.snackbar(
|
||||
"Login failed",
|
||||
"Ошибка входа",
|
||||
"$error",
|
||||
);
|
||||
}
|
||||
} else {
|
||||
Get.snackbar(
|
||||
"Login failed",
|
||||
"Ошибка входа",
|
||||
"$e",
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
Get.snackbar(
|
||||
"Login failed",
|
||||
"Ошибка входа",
|
||||
"$e",
|
||||
);
|
||||
}
|
||||
|
|
@ -109,14 +109,14 @@ class LoginPage extends GetView<LoginPageController> {
|
|||
TextFormField(
|
||||
enabled: !controller.submitted,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Endpoint',
|
||||
hintText: 'Enter Tuuli Endpoint',
|
||||
labelText: 'Адрес бэкенда',
|
||||
hintText: 'Введите адрес бэкенда Tuuli',
|
||||
),
|
||||
initialValue: ApiController.to.endPoint,
|
||||
onChanged: (value) => controller.endpoint = value,
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Please enter Tuuli Endpoint';
|
||||
return 'Пожалуйста, введите адрес бэкенда Tuuli';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
|
@ -124,13 +124,13 @@ class LoginPage extends GetView<LoginPageController> {
|
|||
TextFormField(
|
||||
enabled: !controller.submitted,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Login',
|
||||
hintText: 'Enter your username',
|
||||
labelText: 'Логин',
|
||||
hintText: 'Введите логин',
|
||||
),
|
||||
onChanged: (value) => controller.username = value,
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Please enter your Login';
|
||||
return 'Пожалуйста, введите логин';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
|
@ -139,13 +139,13 @@ class LoginPage extends GetView<LoginPageController> {
|
|||
obscureText: true,
|
||||
enabled: !controller.submitted,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Password',
|
||||
hintText: 'Enter your password',
|
||||
labelText: 'Пароль',
|
||||
hintText: 'Введите пароль',
|
||||
),
|
||||
onChanged: (value) => controller.password = value,
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Please enter your password';
|
||||
return 'Пожалуйста, введите пароль';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
|
@ -156,7 +156,7 @@ class LoginPage extends GetView<LoginPageController> {
|
|||
!controller.isFormValid || controller.submitted
|
||||
? null
|
||||
: () => controller.submitForm(),
|
||||
child: const Text('Login'),
|
||||
child: const Text('Войти'),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue