Added Icons and removed some details

This commit is contained in:
Mrdabup 2024-10-11 14:50:25 -04:00
parent 60e8e428e8
commit 3c04c7a7f3
5 changed files with 11 additions and 39 deletions

View file

@ -29,3 +29,4 @@ class FriendOnlineStatusIndicator extends StatelessWidget {
); );
} }
} }
// TODO: Re-invent the fucking wheel aparently

View file

@ -84,7 +84,7 @@ class _FriendsListAppBarState extends State<FriendsListAppBar> with AutomaticKee
await itemDef.onTap(); await itemDef.onTap();
}, },
itemBuilder: (BuildContext context) => [ itemBuilder: (BuildContext context) => [
MenuItemDefinition( /*MenuItemDefinition(
name: "Add Users", name: "Add Users",
icon: Icons.person_add, icon: Icons.person_add,
onTap: () async { onTap: () async {
@ -98,7 +98,8 @@ class _FriendsListAppBarState extends State<FriendsListAppBar> with AutomaticKee
), ),
); );
}, },
), ),*/
//TODO: Add users API
MenuItemDefinition( MenuItemDefinition(
name: "My Profile", name: "My Profile",
icon: Icons.person, icon: Icons.person,

View file

@ -50,7 +50,7 @@ class _UserListTileState extends State<UserListTile> {
icon: _localAdded ? const Icon(Icons.person_remove) : const Icon(Icons.person_add), icon: _localAdded ? const Icon(Icons.person_remove) : const Icon(Icons.person_add),
style: style, style: style,
onPressed: _loading ? null : () async { onPressed: _loading ? null : () async {
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text("Sorry, this feature is not yet available"))); ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text("Sorry, this feature is unavailable.")));
return; return;
setState(() { setState(() {
_loading = true; _loading = true;

View file

@ -59,7 +59,7 @@ class _SessionListState extends State<SessionList> with AutomaticKeepAliveClient
? const DefaultErrorWidget( ? const DefaultErrorWidget(
title: "No Sessions Found", title: "No Sessions Found",
message: "Try to adjust your filters", message: "Try to adjust your filters",
iconOverride: Icons.public_off, iconOverride: Icons.question_mark,
) )
: Padding( : Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0), padding: const EdgeInsets.symmetric(horizontal: 8.0),

View file

@ -143,22 +143,6 @@ class _SessionViewState extends State<SessionView> {
leadingText: "Details:", leadingText: "Details:",
showLine: false, showLine: false,
), ),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"Host: ",
style: Theme.of(context).textTheme.labelLarge,
),
Text(
session.hostUsername,
style: Theme.of(context).textTheme.labelLarge,
),
],
),
),
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0), padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Row( child: Row(
@ -175,22 +159,6 @@ class _SessionViewState extends State<SessionView> {
], ],
), ),
), ),
Padding(
padding: const EdgeInsets.only(left: 16.0, right: 16.0, bottom: 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"Headless: ",
style: Theme.of(context).textTheme.labelLarge,
),
Text(
session.headlessHost ? "Yes" : "No",
style: Theme.of(context).textTheme.labelMedium,
),
],
),
),
ListSectionHeader( ListSectionHeader(
leadingText: "Users", leadingText: "Users",
trailingText: trailingText:
@ -204,12 +172,14 @@ class _SessionViewState extends State<SessionView> {
session.sessionUsers session.sessionUsers
.map((user) => ListTile( .map((user) => ListTile(
dense: true, dense: true,
leading: user.username == session.hostUsername && session.headlessHost
? const Icon(Icons.dns, color: Color(0xFF294D5C))
: user.username == session.hostUsername && !session.headlessHost
? const Icon(Icons.star, color: Color(0xFFE69E50))
: const Icon(Icons.person),
title: Text( title: Text(
user.username, user.username,
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: TextStyle(
color: user.username == session.hostUsername ? Color.fromARGB(255, 230, 158, 80) : Color.fromARGB(255, 209, 209, 209),
)
), ),
subtitle: Text( subtitle: Text(
user.isPresent ? "Active" : "Inactive", user.isPresent ? "Active" : "Inactive",