formatting fixes

This commit is contained in:
Ben Allfree
2026-02-22 11:34:37 -08:00
parent c284e571b0
commit 4975b5366e
5 changed files with 84 additions and 49 deletions
+32 -14
View File
@@ -367,15 +367,22 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
shape: BoxShape.circle, shape: BoxShape.circle,
), ),
child: Icon( child: Icon(
(message.status == ChannelMessageStatus.sent && displayPath.isNotEmpty) (message.status ==
ChannelMessageStatus.sent &&
displayPath.isNotEmpty)
? Icons.check_circle ? Icons.check_circle
: message.status == ChannelMessageStatus.failed : message.status ==
ChannelMessageStatus.failed
? Icons.cancel ? Icons.cancel
: Icons.cloud, : Icons.cloud,
size: 14, size: 14,
color: (message.status == ChannelMessageStatus.sent && displayPath.isNotEmpty) color:
(message.status ==
ChannelMessageStatus.sent &&
displayPath.isNotEmpty)
? Colors.green ? Colors.green
: message.status == ChannelMessageStatus.failed : message.status ==
ChannelMessageStatus.failed
? Colors.red ? Colors.red
: Colors.white70, : Colors.white70,
), ),
@@ -402,8 +409,10 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
defaultToHttps: false, defaultToHttps: false,
), ),
linkifiers: const [UrlLinkifier()], linkifiers: const [UrlLinkifier()],
onOpen: (link) => onOpen: (link) => LinkHandler.handleLinkTap(
LinkHandler.handleLinkTap(context, link.url), context,
link.url,
),
), ),
), ),
if (!enableTracing && isOutgoing) ...[ if (!enableTracing && isOutgoing) ...[
@@ -411,15 +420,22 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
Padding( Padding(
padding: const EdgeInsets.only(bottom: 2), padding: const EdgeInsets.only(bottom: 2),
child: Icon( child: Icon(
(message.status == ChannelMessageStatus.sent && displayPath.isNotEmpty) (message.status ==
ChannelMessageStatus.sent &&
displayPath.isNotEmpty)
? Icons.check_circle ? Icons.check_circle
: message.status == ChannelMessageStatus.failed : message.status ==
ChannelMessageStatus.failed
? Icons.cancel ? Icons.cancel
: Icons.cloud, : Icons.cloud,
size: 14, size: 14,
color: (message.status == ChannelMessageStatus.sent && displayPath.isNotEmpty) color:
(message.status ==
ChannelMessageStatus.sent &&
displayPath.isNotEmpty)
? Colors.green ? Colors.green
: message.status == ChannelMessageStatus.failed : message.status ==
ChannelMessageStatus.failed
? Colors.red ? Colors.red
: Colors.grey, : Colors.grey,
), ),
@@ -915,7 +931,8 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
onKeyEvent: (node, event) { onKeyEvent: (node, event) {
if (event is KeyDownEvent && if (event is KeyDownEvent &&
(event.logicalKey == LogicalKeyboardKey.enter || (event.logicalKey == LogicalKeyboardKey.enter ||
event.logicalKey == LogicalKeyboardKey.numpadEnter)) { event.logicalKey ==
LogicalKeyboardKey.numpadEnter)) {
_sendMessage(); _sendMessage();
return KeyEventResult.handled; return KeyEventResult.handled;
} }
@@ -932,9 +949,10 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
backgroundColor: Theme.of( backgroundColor: Theme.of(
context, context,
).colorScheme.surfaceContainerHighest, ).colorScheme.surfaceContainerHighest,
fallbackTextColor: Theme.of( fallbackTextColor: Theme.of(context)
context, .colorScheme
).colorScheme.onSurface.withValues(alpha: 0.6), .onSurface
.withValues(alpha: 0.6),
maxSize: 160, maxSize: 160,
), ),
), ),
+27 -10
View File
@@ -346,7 +346,8 @@ class _ChatScreenState extends State<ChatScreen> {
onKeyEvent: (node, event) { onKeyEvent: (node, event) {
if (event is KeyDownEvent && if (event is KeyDownEvent &&
(event.logicalKey == LogicalKeyboardKey.enter || (event.logicalKey == LogicalKeyboardKey.enter ||
event.logicalKey == LogicalKeyboardKey.numpadEnter)) { event.logicalKey ==
LogicalKeyboardKey.numpadEnter)) {
_sendMessage(connector); _sendMessage(connector);
return KeyEventResult.handled; return KeyEventResult.handled;
} }
@@ -1290,19 +1291,28 @@ class _MessageBubble extends StatelessWidget {
child: Container( child: Container(
padding: const EdgeInsets.all(2), padding: const EdgeInsets.all(2),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.black.withValues(alpha: 0.3), color: Colors.black.withValues(
alpha: 0.3,
),
shape: BoxShape.circle, shape: BoxShape.circle,
), ),
child: Icon( child: Icon(
(message.status == MessageStatus.delivered && message.pathBytes.isNotEmpty) (message.status ==
MessageStatus.delivered &&
message.pathBytes.isNotEmpty)
? Icons.check_circle ? Icons.check_circle
: message.status == MessageStatus.failed : message.status ==
MessageStatus.failed
? Icons.cancel ? Icons.cancel
: Icons.cloud, : Icons.cloud,
size: 14, size: 14,
color: (message.status == MessageStatus.delivered && message.pathBytes.isNotEmpty) color:
(message.status ==
MessageStatus.delivered &&
message.pathBytes.isNotEmpty)
? Colors.green ? Colors.green
: message.status == MessageStatus.failed : message.status ==
MessageStatus.failed
? Colors.red ? Colors.red
: Colors.white70, : Colors.white70,
), ),
@@ -1328,8 +1338,10 @@ class _MessageBubble extends StatelessWidget {
defaultToHttps: false, defaultToHttps: false,
), ),
linkifiers: const [UrlLinkifier()], linkifiers: const [UrlLinkifier()],
onOpen: (link) => onOpen: (link) => LinkHandler.handleLinkTap(
LinkHandler.handleLinkTap(context, link.url), context,
link.url,
),
), ),
), ),
if (!enableTracing && isOutgoing) ...[ if (!enableTracing && isOutgoing) ...[
@@ -1337,13 +1349,18 @@ class _MessageBubble extends StatelessWidget {
Padding( Padding(
padding: const EdgeInsets.only(bottom: 2), padding: const EdgeInsets.only(bottom: 2),
child: Icon( child: Icon(
(message.status == MessageStatus.delivered && message.pathBytes.isNotEmpty) (message.status ==
MessageStatus.delivered &&
message.pathBytes.isNotEmpty)
? Icons.check_circle ? Icons.check_circle
: message.status == MessageStatus.failed : message.status == MessageStatus.failed
? Icons.cancel ? Icons.cancel
: Icons.cloud, : Icons.cloud,
size: 14, size: 14,
color: (message.status == MessageStatus.delivered && message.pathBytes.isNotEmpty) color:
(message.status ==
MessageStatus.delivered &&
message.pathBytes.isNotEmpty)
? Colors.green ? Colors.green
: message.status == MessageStatus.failed : message.status == MessageStatus.failed
? Colors.red ? Colors.red
+1 -3
View File
@@ -64,9 +64,7 @@ class ChromeRequiredScreen extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.blue.withValues(alpha: 0.1), color: Colors.blue.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(30), borderRadius: BorderRadius.circular(30),
border: Border.all( border: Border.all(color: Colors.blue.withValues(alpha: 0.3)),
color: Colors.blue.withValues(alpha: 0.3),
),
), ),
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
+4 -2
View File
@@ -112,9 +112,11 @@ class _ScannerScreenState extends State<ScannerScreen> {
if (isScanning) { if (isScanning) {
connector.stopScan(); connector.stopScan();
} else { } else {
unawaited(connector.startScan().catchError((e) { unawaited(
connector.startScan().catchError((e) {
debugPrint("Scanner screen startScan error: $e"); debugPrint("Scanner screen startScan error: $e");
})); }),
);
} }
}, },
icon: isScanning icon: isScanning