mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-25 05:52:40 +03:00
PIV bio additions
Disable dialog buttons when busy. Show MATCH status in details view.
This commit is contained in:
parent
b2c432416e
commit
e0c0b2ae2d
@ -500,6 +500,7 @@
|
||||
}
|
||||
},
|
||||
"@_fingerprints": {},
|
||||
"s_biometrics": null,
|
||||
"l_fingerprint": "Fingerabdruck: {label}",
|
||||
"@l_fingerprint": {
|
||||
"placeholders": {
|
||||
|
@ -500,6 +500,7 @@
|
||||
}
|
||||
},
|
||||
"@_fingerprints": {},
|
||||
"s_biometrics": "Biometrics",
|
||||
"l_fingerprint": "Fingerprint: {label}",
|
||||
"@l_fingerprint": {
|
||||
"placeholders": {
|
||||
|
@ -500,6 +500,7 @@
|
||||
}
|
||||
},
|
||||
"@_fingerprints": {},
|
||||
"s_biometrics": null,
|
||||
"l_fingerprint": "Empreinte digitale\u00a0: {label}",
|
||||
"@l_fingerprint": {
|
||||
"placeholders": {
|
||||
|
@ -500,6 +500,7 @@
|
||||
}
|
||||
},
|
||||
"@_fingerprints": {},
|
||||
"s_biometrics": null,
|
||||
"l_fingerprint": "指紋:{label}",
|
||||
"@l_fingerprint": {
|
||||
"placeholders": {
|
||||
|
@ -500,6 +500,7 @@
|
||||
}
|
||||
},
|
||||
"@_fingerprints": {},
|
||||
"s_biometrics": null,
|
||||
"l_fingerprint": "Odcisk palca: {label}",
|
||||
"@l_fingerprint": {
|
||||
"placeholders": {
|
||||
|
@ -99,6 +99,7 @@ const appListItem95 = Key('$_prefix.95.applistitem');
|
||||
|
||||
// SlotMetadata body keys
|
||||
const slotMetadataKeyType = Key('$_prefix.slotMetadata.keyType');
|
||||
const slotMetadataBiometrics = Key('$_prefix.slotMetadata.biometrics');
|
||||
|
||||
// CertInfo body keys
|
||||
const certInfoKeyType = Key('$_prefix.certInfo.keyType');
|
||||
|
@ -28,9 +28,10 @@ class CertInfoTable extends ConsumerWidget {
|
||||
final CertInfo? certInfo;
|
||||
final SlotMetadata? metadata;
|
||||
final bool alwaysIncludePrivate;
|
||||
final bool supportsBio;
|
||||
|
||||
const CertInfoTable(this.certInfo, this.metadata,
|
||||
{super.key, this.alwaysIncludePrivate = false});
|
||||
{super.key, this.alwaysIncludePrivate = false, this.supportsBio = false});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
@ -46,6 +47,14 @@ class CertInfoTable extends ConsumerWidget {
|
||||
metadata.keyType.getDisplayName(l10n),
|
||||
keys.slotMetadataKeyType
|
||||
),
|
||||
if (metadata != null && supportsBio)
|
||||
l10n.s_biometrics: (
|
||||
[PinPolicy.matchAlways, PinPolicy.matchOnce]
|
||||
.contains(metadata.pinPolicy)
|
||||
? l10n.s_enabled
|
||||
: l10n.s_disabled,
|
||||
keys.slotMetadataBiometrics
|
||||
),
|
||||
if (metadata == null && alwaysIncludePrivate)
|
||||
l10n.s_private_key: (l10n.s_none, keys.slotMetadataKeyType),
|
||||
if (certInfo != null) ...{
|
||||
|
@ -249,11 +249,13 @@ class _GenerateKeyDialogState extends ConsumerState<GenerateKeyDialog> {
|
||||
FilterChip(
|
||||
label: Text(l10n.s_allow_fingerprint),
|
||||
selected: _allowMatch,
|
||||
onSelected: (value) {
|
||||
setState(() {
|
||||
_allowMatch = value;
|
||||
});
|
||||
},
|
||||
onSelected: _generating
|
||||
? null
|
||||
: (value) {
|
||||
setState(() {
|
||||
_allowMatch = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
]),
|
||||
Padding(
|
||||
|
@ -315,11 +315,13 @@ class _ImportFileDialogState extends ConsumerState<ImportFileDialog> {
|
||||
FilterChip(
|
||||
label: Text(l10n.s_allow_fingerprint),
|
||||
selected: _allowMatch,
|
||||
onSelected: (value) {
|
||||
setState(() {
|
||||
_allowMatch = value;
|
||||
});
|
||||
},
|
||||
onSelected: _importing
|
||||
? null
|
||||
: (value) {
|
||||
setState(() {
|
||||
_allowMatch = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
]
|
||||
|
@ -158,6 +158,7 @@ class _PivScreenState extends ConsumerState<PivScreen> {
|
||||
selected.metadata,
|
||||
alwaysIncludePrivate:
|
||||
pivState.supportsMetadata,
|
||||
supportsBio: pivState.supportsBio,
|
||||
),
|
||||
if (selected.certInfo == null)
|
||||
const SizedBox(height: 16)
|
||||
|
@ -98,6 +98,7 @@ class SlotDialog extends ConsumerWidget {
|
||||
certInfo,
|
||||
metadata,
|
||||
alwaysIncludePrivate: pivState.supportsMetadata,
|
||||
supportsBio: pivState.supportsBio,
|
||||
),
|
||||
if (certInfo == null) const SizedBox(height: 16),
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user