style(ui): render the update status as a bordered chip

Pill shape with a brand-green tint, outline and dot so the status
reads as a badge next to the title instead of plain text.
This commit is contained in:
Levi committed 2026-09-19 21:41:56 +08:00
1 parent 1b4956b0ec
commit 8c728ffda7
1 file changed
+27 -19
@@ -13,26 +13,34 @@ class ExtensionUpdateStatus extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final palette = AppPalette.of(context); final palette = AppPalette.of(context);
final content = Row( final content = Container(
mainAxisSize: MainAxisSize.min, padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 3),
children: [ decoration: BoxDecoration(
Container( color: palette.brandSoft,
width: 6, borderRadius: BorderRadius.circular(999),
height: 6, border: Border.all(color: palette.brand.withValues(alpha: 0.35)),
decoration: BoxDecoration(color: palette.brand, shape: BoxShape.circle), ),
), child: Row(
if (label != null) ...[ mainAxisSize: MainAxisSize.min,
const SizedBox(width: 5), children: [
Flexible( Container(
child: Text( width: 6,
label!, height: 6,
maxLines: 1, decoration: BoxDecoration(color: palette.brand, shape: BoxShape.circle),
overflow: TextOverflow.ellipsis,
style: TextStyle(color: palette.textPrimary, fontSize: 11.5, fontWeight: FontWeight.w600),
),
), ),
if (label != null) ...[
const SizedBox(width: 5),
Flexible(
child: Text(
label!,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(color: palette.textPrimary, fontSize: 11.5, fontWeight: FontWeight.w600),
),
),
],
], ],
], ),
); );
if (onTap == null) return content; if (onTap == null) return content;
return MouseRegion( return MouseRegion(
@@ -41,7 +49,7 @@ class ExtensionUpdateStatus extends StatelessWidget {
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: onTap, onTap: onTap,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 6), padding: const EdgeInsets.symmetric(horizontal: 2, vertical: 4),
child: content, child: content,
), ),
), ),