]> git.proxmox.com Git - flutter/proxmox_login_manager.git/commitdiff
add message if no account is configured
authorTim Marx <t.marx@proxmox.com>
Tue, 25 Aug 2020 09:52:37 +0000 (11:52 +0200)
committerTim Marx <t.marx@proxmox.com>
Tue, 25 Aug 2020 09:52:37 +0000 (11:52 +0200)
Signed-off-by: Tim Marx <t.marx@proxmox.com>
lib/proxmox_login_selector.dart

index 12a3995c942a86fbad9bea79fe1bffda0b2911f5..fbfcbdf3314f807776e3c1f5f58190538ca5eca8 100644 (file)
@@ -49,6 +49,12 @@ class _ProxmoxLoginSelectorState extends State<ProxmoxLoginSelector> {
         body: FutureBuilder<ProxmoxLoginStorage>(
             future: loginStorage,
             builder: (context, snapshot) {
+              if (snapshot.hasData && (snapshot.data.logins?.isEmpty ?? true)) {
+                return Center(
+                  child: Text('Add an account'),
+                );
+              }
+
               return ListView(
                 children: snapshot.data?.logins
                         ?.map((l) => ListTile(