feat: add contact UI helpers and path editor for routing management

- Implemented contactTypeIcon and contactTypeColor functions for better UI representation of contact types.
- Created colorForName and firstCharacterOrEmoji functions to enhance contact display.
- Developed PathEditorSheet widget for managing contact paths with a user-friendly interface.
- Introduced RoutingSheet for managing contact routing modes and displaying path history.
- Added a script for generating proof of concept (PoC) payloads for clipboard contact import validation.
This commit is contained in:
zjs81
2026-06-11 00:07:12 -07:00
parent 743ef7f124
commit cba1e5950c
86 changed files with 8149 additions and 6379 deletions
+7 -20
View File
@@ -67,10 +67,12 @@ class QuickSwitchBar extends StatelessWidget {
destinations: [
NavigationDestination(
icon: _buildIconWithBadge(
context,
const Icon(Icons.people_outline),
contactsUnreadCount,
),
selectedIcon: _buildIconWithBadge(
context,
const Icon(Icons.people),
contactsUnreadCount,
),
@@ -78,10 +80,12 @@ class QuickSwitchBar extends StatelessWidget {
),
NavigationDestination(
icon: _buildIconWithBadge(
context,
const Icon(Icons.tag),
channelsUnreadCount,
),
selectedIcon: _buildIconWithBadge(
context,
const Icon(Icons.tag),
channelsUnreadCount,
),
@@ -101,26 +105,9 @@ class QuickSwitchBar extends StatelessWidget {
);
}
Widget _buildIconWithBadge(Icon icon, int count) {
Widget _buildIconWithBadge(BuildContext context, Icon icon, int count) {
if (count <= 0) return icon;
return Stack(
clipBehavior: Clip.none,
children: [
icon,
Positioned(
right: -2,
top: -2,
child: Container(
width: 8,
height: 8,
decoration: const BoxDecoration(
color: Colors.redAccent,
shape: BoxShape.circle,
),
),
),
],
);
final label = count > 99 ? '99+' : '$count';
return Badge(label: Text(label), child: icon);
}
}