mirror of
https://github.com/inventree/inventree-app.git
synced 2026-06-10 08:27:15 +00:00
User info (#826)
* Enhanced user information in "about" view * Add user info to nav drawer * Update release notes
This commit is contained in:
+46
-13
@@ -93,19 +93,7 @@ class InvenTreeAboutWidget extends StatelessWidget {
|
||||
: L10().notConnected,
|
||||
),
|
||||
leading: Icon(TablerIcons.globe),
|
||||
trailing: InvenTreeAPI().isConnected()
|
||||
? Icon(TablerIcons.circle_check, color: COLOR_SUCCESS)
|
||||
: Icon(TablerIcons.circle_x, color: COLOR_DANGER),
|
||||
),
|
||||
);
|
||||
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().username),
|
||||
subtitle: Text(InvenTreeAPI().username),
|
||||
leading: InvenTreeAPI().username.isNotEmpty
|
||||
? Icon(TablerIcons.user)
|
||||
: Icon(TablerIcons.user_cancel, color: COLOR_DANGER),
|
||||
trailing: Icon(TablerIcons.circle_check, color: COLOR_SUCCESS),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -141,6 +129,51 @@ class InvenTreeAboutWidget extends StatelessWidget {
|
||||
leading: Icon(TablerIcons.plug),
|
||||
),
|
||||
);
|
||||
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(
|
||||
L10().userDetails,
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().username),
|
||||
subtitle: Text(InvenTreeAPI().username),
|
||||
leading: InvenTreeAPI().username.isNotEmpty
|
||||
? Icon(TablerIcons.user)
|
||||
: Icon(TablerIcons.user_cancel, color: COLOR_DANGER),
|
||||
),
|
||||
);
|
||||
|
||||
final String email = InvenTreeAPI().userEmail;
|
||||
|
||||
if (email.isNotEmpty) {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().email),
|
||||
subtitle: Text(email),
|
||||
leading: Icon(TablerIcons.at),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
final String firstName = InvenTreeAPI().userFirstName;
|
||||
final String lastName = InvenTreeAPI().userLastName;
|
||||
final String fullName = "$firstName $lastName".trim();
|
||||
|
||||
if (fullName.isNotEmpty) {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().name),
|
||||
subtitle: Text(fullName),
|
||||
leading: Icon(TablerIcons.id_badge),
|
||||
),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
|
||||
Reference in New Issue
Block a user