]> git.proxmox.com Git - flutter/proxmox_login_manager.git/commitdiff
tfa: use number keyboard input type for totp
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 5 Jul 2023 10:20:07 +0000 (12:20 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 5 Jul 2023 10:20:27 +0000 (12:20 +0200)
and try visiblePassword otherwise (i.e., recovery keys), which should
present a keyboard with both letters and the top-bar numberline
shown.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
lib/proxmox_tfa_form.dart

index 568a2356cc7458d8d8602888b001c3fafb9e4239..3d5a93bfc56806723a7958d4033fbedb3f824e33 100644 (file)
@@ -107,6 +107,9 @@ class _ProxmoxTfaFormState extends State<ProxmoxTfaForm> {
                                     decoration: InputDecoration(
                                         labelText: 'Code',
                                         icon: Icon(Icons.pin)),
+                                    keyboardType: _selected_tfa_kind == 'totp'
+                                        ? TextInputType.number
+                                        : TextInputType.visiblePassword,
                                     autofocus: true,
                                     onSubmitted: (value) => _submitTfaCode()),
                               ],