Browse Source

Highlight expired links as warning

Neeraj Gupta 2 years ago
parent
commit
694a23126c

+ 3 - 1
lib/ui/components/captioned_text_widget.dart

@@ -7,12 +7,14 @@ class CaptionedTextWidget extends StatelessWidget {
   final TextStyle? textStyle;
   final bool makeTextBold;
   final Color? textColor;
+  final Color? subTitleColor;
   const CaptionedTextWidget({
     required this.title,
     this.subTitle,
     this.textStyle,
     this.makeTextBold = false,
     this.textColor,
+    this.subTitleColor,
     Key? key,
   }) : super(key: key);
 
@@ -41,7 +43,7 @@ class CaptionedTextWidget extends StatelessWidget {
                         ? TextSpan(
                             text: ' \u2022 $subTitle',
                             style: enteTextTheme.small.copyWith(
-                              color: enteColorScheme.textMuted,
+                              color: subTitleColor ?? enteColorScheme.textMuted,
                             ),
                           )
                         : const TextSpan(text: ''),

+ 1 - 0
lib/ui/sharing/manage_links_widget.dart

@@ -85,6 +85,7 @@ class _ManageSharedLinkWidgetState extends State<ManageSharedLinkWidget> {
                       subTitle: (validTill == 0
                           ? "Never"
                           : (hasLinkExpired ? "Expired" : "Enabled")),
+                      subTitleColor: hasLinkExpired ? warning500 : null,
                     ),
                     trailingIcon: Icons.chevron_right,
                     menuItemColor: enteColorScheme.fillFaint,