mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 08:46:18 +01:00
Visually mark expired cert
This commit is contained in:
parent
d29007691a
commit
01551d36fc
2 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:clock/clock.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:copy_with/copy_with.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
|
@ -72,6 +72,8 @@ class _ItemView extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final now = clock.now();
|
||||
final isExpired = now.isAfter(cert.endValidity);
|
||||
return ListTile(
|
||||
title: Text(cert.host),
|
||||
subtitle: Column(
|
||||
|
@ -107,6 +109,8 @@ class _ItemView extends StatelessWidget {
|
|||
),
|
||||
],
|
||||
),
|
||||
tileColor:
|
||||
isExpired ? Theme.of(context).colorScheme.errorContainer : null,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue