mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-23 10:11:52 +03:00
PIV: Show Private Key: <none> when key is missing
This commit is contained in:
parent
91397d264a
commit
5f2b9772cb
@ -55,6 +55,7 @@
|
||||
"item": {}
|
||||
}
|
||||
},
|
||||
"s_none": null,
|
||||
|
||||
"s_about": "Über",
|
||||
"s_algorithm": null,
|
||||
|
@ -55,6 +55,7 @@
|
||||
"item": {}
|
||||
}
|
||||
},
|
||||
"s_none": "<none>",
|
||||
|
||||
"s_about": "About",
|
||||
"s_algorithm": "Algorithm",
|
||||
|
@ -55,6 +55,7 @@
|
||||
"item": {}
|
||||
}
|
||||
},
|
||||
"s_none": null,
|
||||
|
||||
"s_about": "À propos",
|
||||
"s_algorithm": "Algorithme",
|
||||
|
@ -55,6 +55,7 @@
|
||||
"item": {}
|
||||
}
|
||||
},
|
||||
"s_none": null,
|
||||
|
||||
"s_about": "情報",
|
||||
"s_algorithm": "アルゴリズム",
|
||||
|
@ -55,6 +55,7 @@
|
||||
"item": {}
|
||||
}
|
||||
},
|
||||
"s_none": null,
|
||||
|
||||
"s_about": "O aplikacji",
|
||||
"s_algorithm": "Algorytm",
|
||||
|
@ -90,8 +90,10 @@ class _InfoTable extends ConsumerWidget {
|
||||
class CertInfoTable extends ConsumerWidget {
|
||||
final CertInfo? certInfo;
|
||||
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
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
@ -107,6 +109,8 @@ class CertInfoTable extends ConsumerWidget {
|
||||
metadata.keyType.getDisplayName(l10n),
|
||||
keys.slotMetadataKeyType
|
||||
),
|
||||
if (metadata == null && alwaysIncludePrivate)
|
||||
l10n.s_private_key: (l10n.s_none, keys.slotMetadataKeyType),
|
||||
if (certInfo != null) ...{
|
||||
l10n.s_public_key: (
|
||||
certInfo.keyType?.getDisplayName(l10n) ?? l10n.s_unknown_type,
|
||||
|
@ -141,8 +141,11 @@ class _PivScreenState extends ConsumerState<PivScreen> {
|
||||
const SizedBox(height: 16),
|
||||
if (selected.certInfo != null ||
|
||||
selected.metadata != null) ...[
|
||||
CertInfoTable(selected.certInfo,
|
||||
selected.metadata),
|
||||
CertInfoTable(
|
||||
selected.certInfo,
|
||||
selected.metadata,
|
||||
alwaysIncludePrivate: true,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
if (selected.certInfo == null)
|
||||
|
@ -87,7 +87,11 @@ class SlotDialog extends ConsumerWidget {
|
||||
if (certInfo != null || metadata != null) ...[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 16),
|
||||
child: CertInfoTable(certInfo, metadata),
|
||||
child: CertInfoTable(
|
||||
certInfo,
|
||||
metadata,
|
||||
alwaysIncludePrivate: true,
|
||||
),
|
||||
),
|
||||
],
|
||||
if (certInfo == null) ...[
|
||||
|
Loading…
Reference in New Issue
Block a user