|
1 | | -import { HStack, Image, Spacer, Text, VStack, ZStack } from "@expo/ui/swift-ui"; |
| 1 | +import { Circle, HStack, Image, Spacer, Text, VStack, ZStack } from "@expo/ui/swift-ui"; |
2 | 2 | import type { ComponentProps } from "react"; |
3 | 3 | import { |
| 4 | + accessibilityElement, |
4 | 5 | accessibilityLabel, |
5 | 6 | activityBackgroundTint, |
6 | 7 | font, |
@@ -330,27 +331,43 @@ export function AgentActivity( |
330 | 331 | </VStack> |
331 | 332 | ), |
332 | 333 | compactLeading: renderLogo(14, tint, linkModifiers), |
333 | | - compactTrailing: ( |
| 334 | + compactTrailing: showCompactCount ? ( |
| 335 | + <ZStack |
| 336 | + modifiers={[ |
| 337 | + frame({ width: 28, height: 28 }), |
| 338 | + accessibilityElement("ignore"), |
| 339 | + accessibilityLabel(agentsLabel), |
| 340 | + ...linkModifiers, |
| 341 | + ]} |
| 342 | + > |
| 343 | + <Circle modifiers={[foregroundStyle(tint)]} /> |
| 344 | + <Text |
| 345 | + modifiers={[ |
| 346 | + font({ weight: "bold", size: 14 }), |
| 347 | + foregroundStyle("#000000"), |
| 348 | + lineLimit(1), |
| 349 | + minimumScaleFactor(0.75), |
| 350 | + frame({ width: 24, height: 28 }), |
| 351 | + ]} |
| 352 | + > |
| 353 | + {compactCountLabel} |
| 354 | + </Text> |
| 355 | + </ZStack> |
| 356 | + ) : ( |
334 | 357 | <Text |
335 | 358 | modifiers={[ |
336 | | - font({ |
337 | | - weight: showCompactCount ? "bold" : "semibold", |
338 | | - size: showCompactCount ? 14 : 11, |
339 | | - }), |
| 359 | + font({ weight: "semibold", size: 11 }), |
340 | 360 | foregroundStyle(tint), |
341 | 361 | lineLimit(1), |
342 | 362 | minimumScaleFactor(0.5), |
343 | | - ...(showCompactCount ? [accessibilityLabel(agentsLabel)] : []), |
344 | 363 | ...linkModifiers, |
345 | 364 | ]} |
346 | 365 | > |
347 | 366 | {attentionRow |
348 | 367 | ? attentionRow.phase === "waiting_for_approval" |
349 | 368 | ? "Approval" |
350 | 369 | : "Input" |
351 | | - : showCompactCount |
352 | | - ? compactCountLabel |
353 | | - : activeLabel} |
| 370 | + : activeLabel} |
354 | 371 | </Text> |
355 | 372 | ), |
356 | 373 | minimal: |
|
0 commit comments