This commit is contained in:
Dain Nilsson 2024-03-26 15:49:59 +01:00
commit bb973bb508
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8
8 changed files with 20 additions and 4 deletions

View File

@ -55,6 +55,7 @@
"item": {} "item": {}
} }
}, },
"s_none": null,
"s_about": "Über", "s_about": "Über",
"s_algorithm": null, "s_algorithm": null,

View File

@ -55,6 +55,7 @@
"item": {} "item": {}
} }
}, },
"s_none": "<none>",
"s_about": "About", "s_about": "About",
"s_algorithm": "Algorithm", "s_algorithm": "Algorithm",

View File

@ -55,6 +55,7 @@
"item": {} "item": {}
} }
}, },
"s_none": null,
"s_about": "À propos", "s_about": "À propos",
"s_algorithm": "Algorithme", "s_algorithm": "Algorithme",

View File

@ -55,6 +55,7 @@
"item": {} "item": {}
} }
}, },
"s_none": null,
"s_about": "情報", "s_about": "情報",
"s_algorithm": "アルゴリズム", "s_algorithm": "アルゴリズム",

View File

@ -55,6 +55,7 @@
"item": {} "item": {}
} }
}, },
"s_none": null,
"s_about": "O aplikacji", "s_about": "O aplikacji",
"s_algorithm": "Algorytm", "s_algorithm": "Algorytm",

View File

@ -90,8 +90,10 @@ class _InfoTable extends ConsumerWidget {
class CertInfoTable extends ConsumerWidget { class CertInfoTable extends ConsumerWidget {
final CertInfo? certInfo; final CertInfo? certInfo;
final SlotMetadata? metadata; final SlotMetadata? metadata;
final bool alwaysIncludePrivate;
const CertInfoTable(this.certInfo, this.metadata, {super.key}); const CertInfoTable(this.certInfo, this.metadata,
{super.key, this.alwaysIncludePrivate = false});
@override @override
Widget build(BuildContext context, WidgetRef ref) { Widget build(BuildContext context, WidgetRef ref) {
@ -107,6 +109,8 @@ class CertInfoTable extends ConsumerWidget {
metadata.keyType.getDisplayName(l10n), metadata.keyType.getDisplayName(l10n),
keys.slotMetadataKeyType keys.slotMetadataKeyType
), ),
if (metadata == null && alwaysIncludePrivate)
l10n.s_private_key: (l10n.s_none, keys.slotMetadataKeyType),
if (certInfo != null) ...{ if (certInfo != null) ...{
l10n.s_public_key: ( l10n.s_public_key: (
certInfo.keyType?.getDisplayName(l10n) ?? l10n.s_unknown_type, certInfo.keyType?.getDisplayName(l10n) ?? l10n.s_unknown_type,

View File

@ -141,8 +141,11 @@ class _PivScreenState extends ConsumerState<PivScreen> {
const SizedBox(height: 16), const SizedBox(height: 16),
if (selected.certInfo != null || if (selected.certInfo != null ||
selected.metadata != null) ...[ selected.metadata != null) ...[
CertInfoTable(selected.certInfo, CertInfoTable(
selected.metadata), selected.certInfo,
selected.metadata,
alwaysIncludePrivate: true,
),
const SizedBox(height: 16), const SizedBox(height: 16),
], ],
if (selected.certInfo == null) if (selected.certInfo == null)

View File

@ -87,7 +87,11 @@ class SlotDialog extends ConsumerWidget {
if (certInfo != null || metadata != null) ...[ if (certInfo != null || metadata != null) ...[
Padding( Padding(
padding: const EdgeInsets.only(bottom: 16), padding: const EdgeInsets.only(bottom: 16),
child: CertInfoTable(certInfo, metadata), child: CertInfoTable(
certInfo,
metadata,
alwaysIncludePrivate: true,
),
), ),
], ],
if (certInfo == null) ...[ if (certInfo == null) ...[