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();
},
itemBuilder: (BuildContext context) => [
MenuItemDefinition(
/*MenuItemDefinition(
name: "Add Users",
icon: Icons.person_add,
onTap: () async {
@ -98,7 +98,8 @@ class _FriendsListAppBarState extends State<FriendsListAppBar> with AutomaticKee
),
);
},
),
),*/
//TODO: Add users API
MenuItemDefinition(
name: "My Profile",
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),
style: style,
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;
setState(() {
_loading = true;

View file

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

View file

@ -143,22 +143,6 @@ class _SessionViewState extends State<SessionView> {
leadingText: "Details:",
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: const EdgeInsets.symmetric(horizontal: 16.0),
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(
leadingText: "Users",
trailingText:
@ -204,12 +172,14 @@ class _SessionViewState extends State<SessionView> {
session.sessionUsers
.map((user) => ListTile(
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(
user.username,
textAlign: TextAlign.start,
style: TextStyle(
color: user.username == session.hostUsername ? Color.fromARGB(255, 230, 158, 80) : Color.fromARGB(255, 209, 209, 209),
)
),
subtitle: Text(
user.isPresent ? "Active" : "Inactive",