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