From c85890fcc680e921ffdc3fdcebe7c42198b05108 Mon Sep 17 00:00:00 2001 From: Yannick Mauray Date: Wed, 3 Jul 2024 19:23:07 +0200 Subject: [PATCH] fix: don't try to connect via SSH with empty username --- lib/src/pages/manager.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/pages/manager.dart b/lib/src/pages/manager.dart index 91b3599..6213562 100644 --- a/lib/src/pages/manager.dart +++ b/lib/src/pages/manager.dart @@ -472,7 +472,10 @@ class _ManagerState extends State with PreferencesMixin { child: Text(context.t('Cancel')), ), TextButton( - onPressed: () => Navigator.pop(context, true), + onPressed: () { + if (usernameController.text.isEmpty) return; + Navigator.of(context).pop(true); + }, child: Text(context.t('Connect')), ), ],