Add viewed history, diagnostics, tag chips and SWF viewer
This commit is contained in:
@@ -7,12 +7,14 @@ class ProviderHealthTile extends StatelessWidget {
|
||||
const ProviderHealthTile({
|
||||
required this.config,
|
||||
required this.health,
|
||||
required this.diagnostics,
|
||||
required this.onCheck,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final ContentProviderConfig config;
|
||||
final ProviderHealth? health;
|
||||
final ProviderDiagnostics? diagnostics;
|
||||
final VoidCallback onCheck;
|
||||
|
||||
@override
|
||||
@@ -22,11 +24,19 @@ class ProviderHealthTile extends StatelessWidget {
|
||||
title: Text(config.name),
|
||||
subtitle: Text(
|
||||
[
|
||||
'${config.apiType} | ${config.enabled ? 'enabled' : 'disabled'} | priority ${config.priority}',
|
||||
if (health != null) 'Ping ${health!.pingMs} ms',
|
||||
if (health?.apiVersion != null) 'API ${health!.apiVersion}',
|
||||
if (health?.lastCheckedAt != null)
|
||||
'Checked ${health!.lastCheckedAt}',
|
||||
if (diagnostics != null)
|
||||
'Last search: ${diagnostics!.lastResultCount} posts at ${diagnostics!.lastSearchAt}',
|
||||
if (diagnostics?.lastErrorMessage != null)
|
||||
diagnostics!.lastErrorMessage!,
|
||||
if (health?.errorMessage != null) health!.errorMessage!,
|
||||
].join('\n'),
|
||||
maxLines: 7,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
leading: ProviderStatusBadge(health: health),
|
||||
trailing: IconButton(
|
||||
|
||||
Reference in New Issue
Block a user