Merge pull request #6 from inventree/master
Some checks failed
Android / build (push) Has been cancelled
CI / test (push) Has been cancelled
iOS / build (push) Has been cancelled

update to version 22.7
This commit is contained in:
Hendrik Rauh 2026-03-29 16:08:47 +02:00 committed by GitHub
commit 84e8ccc43a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 257 additions and 48 deletions

View file

@ -298,6 +298,9 @@ class _ProfileEditState extends State<ProfileEditWidget> {
String name = "";
String server = "";
bool? serverStatus;
bool serverChecking = false;
@override
Widget build(BuildContext context) {
return Scaffold(
@ -411,6 +414,49 @@ class _ProfileEditState extends State<ProfileEditWidget> {
return null;
},
),
Divider(),
SizedBox(
width: double.infinity,
child: ElevatedButton.icon(
label: Text(L10().connectionCheck),
icon: serverStatus == true
? Icon(TablerIcons.circle_check, color: COLOR_SUCCESS)
: serverStatus == false
? Icon(TablerIcons.circle_x, color: COLOR_DANGER)
: Icon(TablerIcons.question_mark, color: COLOR_WARNING),
onPressed: serverChecking
? null
: () async {
if (serverChecking) {
return;
}
if (!formKey.currentState!.validate()) {
return;
}
if (mounted) {
setState(() {
serverStatus = null;
serverChecking = true;
});
}
formKey.currentState!.save();
InvenTreeAPI().checkServer(server: server).then((
result,
) {
if (mounted) {
setState(() {
serverStatus = result;
serverChecking = false;
});
}
});
},
),
),
],
),
padding: EdgeInsets.all(16),