* [PATCH pve_flutter_frontend 1/2] fix: ui: show empty message if there are no tokens or groups
2026-04-22 8:55 [PATCH pve_flutter_frontend 0/2] fix: broken functionality flagged by google play console Shan Shaji
@ 2026-04-22 8:55 ` Shan Shaji
2026-04-22 8:55 ` [PATCH pve_flutter_frontend 2/2] cleanup: run `dart format` to fix formatting of the main_layout file Shan Shaji
2026-04-22 9:04 ` applied: [PATCH pve_flutter_frontend 0/2] fix: broken functionality flagged by google play console Dominik Csapak
2 siblings, 0 replies; 4+ messages in thread
From: Shan Shaji @ 2026-04-22 8:55 UTC (permalink / raw)
To: pve-devel
The tokens and groups tab bar view widgets were showing a blank page.
This was flagged by play console as a broken functionality. To fix the
issue if there are no groups or tokens show an empty message in body of
the widgets.
Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
lib/pages/main_layout_slim.dart | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/lib/pages/main_layout_slim.dart b/lib/pages/main_layout_slim.dart
index 4229ef4..c65f744 100644
--- a/lib/pages/main_layout_slim.dart
+++ b/lib/pages/main_layout_slim.dart
@@ -936,6 +936,14 @@ class MobileAccessManagement extends StatelessWidget {
: null,
);
}),
+ if (aState.tokens.isEmpty)
+ Align(
+ child: Text(
+ "No Tokens",
+ style: Theme.of(context).textTheme.bodyLarge,
+ ),
+ )
+ else
ListView.builder(
itemCount: aState.tokens.length,
itemBuilder: (context, index) {
@@ -951,6 +959,14 @@ class MobileAccessManagement extends StatelessWidget {
subtitle: Text('Expires: $expireDate'),
);
}),
+ if (aState.groups.isEmpty)
+ Align(
+ child: Text(
+ "No Groups",
+ style: Theme.of(context).textTheme.bodyLarge,
+ ),
+ )
+ else
ListView.builder(
itemCount: aState.groups.length,
itemBuilder: (context, index) {
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH pve_flutter_frontend 2/2] cleanup: run `dart format` to fix formatting of the main_layout file
2026-04-22 8:55 [PATCH pve_flutter_frontend 0/2] fix: broken functionality flagged by google play console Shan Shaji
2026-04-22 8:55 ` [PATCH pve_flutter_frontend 1/2] fix: ui: show empty message if there are no tokens or groups Shan Shaji
@ 2026-04-22 8:55 ` Shan Shaji
2026-04-22 9:04 ` applied: [PATCH pve_flutter_frontend 0/2] fix: broken functionality flagged by google play console Dominik Csapak
2 siblings, 0 replies; 4+ messages in thread
From: Shan Shaji @ 2026-04-22 8:55 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
lib/pages/main_layout_slim.dart | 139 ++++++++++++++++----------------
1 file changed, 70 insertions(+), 69 deletions(-)
diff --git a/lib/pages/main_layout_slim.dart b/lib/pages/main_layout_slim.dart
index c65f744..8355309 100644
--- a/lib/pages/main_layout_slim.dart
+++ b/lib/pages/main_layout_slim.dart
@@ -944,21 +944,21 @@ class MobileAccessManagement extends StatelessWidget {
),
)
else
- ListView.builder(
- itemCount: aState.tokens.length,
- itemBuilder: (context, index) {
- final token = aState.tokens[index];
- var expireDate = 'never';
- if (token.expire != null &&
- token.expire?.millisecondsSinceEpoch != 0) {
- expireDate = DateFormat.yMd().format(token.expire!);
- }
+ ListView.builder(
+ itemCount: aState.tokens.length,
+ itemBuilder: (context, index) {
+ final token = aState.tokens[index];
+ var expireDate = 'never';
+ if (token.expire != null &&
+ token.expire?.millisecondsSinceEpoch != 0) {
+ expireDate = DateFormat.yMd().format(token.expire!);
+ }
- return ListTile(
- title: Text('${token.userid} ${token.tokenid}'),
- subtitle: Text('Expires: $expireDate'),
- );
- }),
+ return ListTile(
+ title: Text('${token.userid} ${token.tokenid}'),
+ subtitle: Text('Expires: $expireDate'),
+ );
+ }),
if (aState.groups.isEmpty)
Align(
child: Text(
@@ -967,64 +967,65 @@ class MobileAccessManagement extends StatelessWidget {
),
)
else
- ListView.builder(
- itemCount: aState.groups.length,
- itemBuilder: (context, index) {
- final group = aState.groups[index];
- final users = (group.users?.isNotEmpty ?? false)
- ? group.users!.split(',')
- : [];
- return ListTile(
- title: Text(group.groupid),
- subtitle: Text(group.comment ?? ''),
- trailing: const Icon(Icons.arrow_right),
- onTap: () => showModalBottomSheet(
- shape: const RoundedRectangleBorder(
- borderRadius: BorderRadius.vertical(
- top: Radius.circular(10))),
- context: context,
- builder: (context) {
- return SizedBox(
- height: MediaQuery.of(context).size.height * 0.5,
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- Padding(
- padding:
- const EdgeInsets.fromLTRB(0, 5, 0, 5),
- child: Align(
- alignment: Alignment.topCenter,
- child: Container(
- width: 40,
- height: 3,
- color: Colors.black,
- ),
- ),
- ),
- ListTile(
- title:
- Text('Group members (${users.length})'),
- ),
- const Divider(),
- Expanded(
- child: Padding(
- padding: const EdgeInsets.all(14.0),
- child: ListView.builder(
- itemCount: users.length,
- itemBuilder: (context, index) =>
- ListTile(
- title: Text(users[index]),
+ ListView.builder(
+ itemCount: aState.groups.length,
+ itemBuilder: (context, index) {
+ final group = aState.groups[index];
+ final users = (group.users?.isNotEmpty ?? false)
+ ? group.users!.split(',')
+ : [];
+ return ListTile(
+ title: Text(group.groupid),
+ subtitle: Text(group.comment ?? ''),
+ trailing: const Icon(Icons.arrow_right),
+ onTap: () => showModalBottomSheet(
+ shape: const RoundedRectangleBorder(
+ borderRadius: BorderRadius.vertical(
+ top: Radius.circular(10))),
+ context: context,
+ builder: (context) {
+ return SizedBox(
+ height:
+ MediaQuery.of(context).size.height * 0.5,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: <Widget>[
+ Padding(
+ padding:
+ const EdgeInsets.fromLTRB(0, 5, 0, 5),
+ child: Align(
+ alignment: Alignment.topCenter,
+ child: Container(
+ width: 40,
+ height: 3,
+ color: Colors.black,
),
),
),
- )
- ],
- ),
- );
- },
- ),
- );
- }),
+ ListTile(
+ title: Text(
+ 'Group members (${users.length})'),
+ ),
+ const Divider(),
+ Expanded(
+ child: Padding(
+ padding: const EdgeInsets.all(14.0),
+ child: ListView.builder(
+ itemCount: users.length,
+ itemBuilder: (context, index) =>
+ ListTile(
+ title: Text(users[index]),
+ ),
+ ),
+ ),
+ )
+ ],
+ ),
+ );
+ },
+ ),
+ );
+ }),
ListView.builder(
itemCount: aState.roles.length,
itemBuilder: (context, index) {
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread