Dominik Csapak [Mon, 20 Dec 2021 11:35:09 +0000 (12:35 +0100)]
TFA: improve color-readabillity for input
with the recent changes, the input field was invisible, adapting like
the login dialog - note this is still not using the correct colors that
the actual main app theme defines, as its always derived from the dark
default theme now.
Thomas Lamprecht [Thu, 10 Jun 2021 09:54:15 +0000 (11:54 +0200)]
TFA: fix awaiting TOTP verification page
The cast to the FutureOr<> type confuses dart/flutter nowadays:
flutter: type 'Future<dynamic>' is not a subtype of type 'FutureOr<ProxmoxApiClient>' in type cast
flutter: #0 _ProxmoxLoginPageState._onLoginButtonPressed (package:proxmox_login_manager/proxmox_login_form.dart:406:12)
<asynchronous suspension>
just drop it.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Fri, 12 Mar 2021 14:12:26 +0000 (15:12 +0100)]
migrate to sound null safety
tried to strike a balance between auto migration and checking what
can actually get null, or improve that by promoting some variables.
Learnt that for class fields dart cannot promote nullable fields to
null-safe after a if (field == null) return 'early'; check, so we
need to introduce a intermediate varibable and check on that - a bit
of a bummer..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 23 Sep 2020 08:20:16 +0000 (10:20 +0200)]
fix issue when 443 port is used
The reason for this issue was that the dart Uri.hasPort[0] property
is queried when checking if the passed URL has no port added and thus
the implied 8006 port should be added. For https and port 443 the
port is detected as "default" and omitted, thus this is always false
for that, argh!
Just use a simple regex on the original trimmed origin text.
IPv6 must be wrapped in brackets so [::1] or [::1]:443 is also
correctly detected.