mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-26 10:33:15 +03:00
Show number of passkeys used
This commit is contained in:
parent
029c85909c
commit
b46ae6082e
@ -40,6 +40,8 @@ class FidoState with _$FidoState {
|
||||
info['options']['credMgmt'] == true ||
|
||||
info['options']['credentialMgmtPreview'] == true;
|
||||
|
||||
int? get remainingCreds => info['remaining_disc_creds'];
|
||||
|
||||
bool? get bioEnroll => info['options']['bioEnroll'];
|
||||
|
||||
bool get alwaysUv => info['options']['alwaysUv'] == true;
|
||||
|
@ -141,7 +141,7 @@ class _FidoLockedPage extends ConsumerWidget {
|
||||
: alwaysUv
|
||||
? l10n.l_pin_change_required_desc
|
||||
: l10n.l_register_sk_on_websites,
|
||||
footnote: isBio ? null : l10n.l_non_passkeys_note,
|
||||
footnote: isBio ? null : l10n.p_non_passkeys_note,
|
||||
keyActionsBuilder: hasActions ? _buildActions : null,
|
||||
keyActionsBadge: passkeysShowActionsNotifier(state),
|
||||
);
|
||||
@ -153,7 +153,7 @@ class _FidoLockedPage extends ConsumerWidget {
|
||||
capabilities: const [Capability.fido2],
|
||||
header: l10n.l_ready_to_use,
|
||||
message: l10n.l_register_sk_on_websites,
|
||||
footnote: l10n.l_non_passkeys_note,
|
||||
footnote: l10n.p_non_passkeys_note,
|
||||
keyActionsBuilder: hasActions ? _buildActions : null,
|
||||
keyActionsBadge: passkeysShowActionsNotifier(state),
|
||||
);
|
||||
@ -241,7 +241,7 @@ class _FidoUnlockedPageState extends ConsumerState<_FidoUnlockedPage> {
|
||||
capabilities: const [Capability.fido2],
|
||||
header: l10n.l_no_discoverable_accounts,
|
||||
message: l10n.l_register_sk_on_websites,
|
||||
footnote: l10n.l_non_passkeys_note,
|
||||
footnote: l10n.p_non_passkeys_note,
|
||||
keyActionsBuilder: hasActions
|
||||
? (context) =>
|
||||
passkeysBuildActions(context, widget.node, widget.state)
|
||||
@ -255,10 +255,13 @@ class _FidoUnlockedPageState extends ConsumerState<_FidoUnlockedPage> {
|
||||
return _buildLoadingPage(context);
|
||||
}
|
||||
final credentials = data.value;
|
||||
|
||||
final filteredCredentials =
|
||||
ref.watch(filteredFidoCredentialsProvider(credentials.toList()));
|
||||
|
||||
final remainingCreds = widget.state.remainingCreds;
|
||||
final maxCreds =
|
||||
remainingCreds != null ? remainingCreds + credentials.length : 25;
|
||||
|
||||
if (credentials.isEmpty) {
|
||||
return MessagePage(
|
||||
title: l10n.s_passkeys,
|
||||
@ -287,7 +290,7 @@ class _FidoUnlockedPageState extends ConsumerState<_FidoUnlockedPage> {
|
||||
passkeysBuildActions(context, widget.node, widget.state)
|
||||
: null,
|
||||
keyActionsBadge: passkeysShowActionsNotifier(widget.state),
|
||||
footnote: l10n.l_non_passkeys_note,
|
||||
footnote: l10n.p_non_passkeys_note,
|
||||
);
|
||||
}
|
||||
|
||||
@ -337,7 +340,8 @@ class _FidoUnlockedPageState extends ConsumerState<_FidoUnlockedPage> {
|
||||
builder: (context) => AppPage(
|
||||
title: l10n.s_passkeys,
|
||||
capabilities: const [Capability.fido2],
|
||||
footnote: l10n.l_non_passkeys_note,
|
||||
footnote:
|
||||
'${l10n.p_passkeys_used(credentials.length, maxCreds)} ${l10n.p_non_passkeys_note}',
|
||||
headerSliver: Focus(
|
||||
canRequestFocus: false,
|
||||
onKeyEvent: (node, event) {
|
||||
|
@ -422,13 +422,19 @@
|
||||
"l_ready_to_use": "Bereit zur Verwendung",
|
||||
"l_register_sk_on_websites": "Als Sicherheitsschlüssel auf Webseiten registrieren",
|
||||
"l_no_discoverable_accounts": "Keine erkennbaren Konten",
|
||||
"l_non_passkeys_note": null,
|
||||
"p_non_passkeys_note": null,
|
||||
"s_delete_passkey": null,
|
||||
"l_delete_passkey_desc": null,
|
||||
"s_passkey_deleted": null,
|
||||
"p_warning_delete_passkey": null,
|
||||
"s_search_passkeys": null,
|
||||
|
||||
"p_passkeys_used": null,
|
||||
"@p_passkeys_used": {
|
||||
"placeholders": {
|
||||
"used": {},
|
||||
"max": {}
|
||||
}
|
||||
},
|
||||
"@_fingerprints": {},
|
||||
"l_fingerprint": "Fingerabdruck: {label}",
|
||||
"@l_fingerprint": {
|
||||
|
@ -422,13 +422,19 @@
|
||||
"l_ready_to_use": "Ready to use",
|
||||
"l_register_sk_on_websites": "Register as a Security Key on websites",
|
||||
"l_no_discoverable_accounts": "No passkeys stored",
|
||||
"l_non_passkeys_note": "Non-passkey credentials may exist, but can not be listed",
|
||||
"p_non_passkeys_note": "Non-passkey credentials may exist, but can not be listed.",
|
||||
"s_delete_passkey": "Delete passkey",
|
||||
"l_delete_passkey_desc": "Remove the passkey from the YubiKey",
|
||||
"s_passkey_deleted": "Passkey deleted",
|
||||
"p_warning_delete_passkey": "This will delete the passkey from your YubiKey.",
|
||||
"s_search_passkeys": "Search passkeys",
|
||||
|
||||
"p_passkeys_used": "{used} of {max} passkeys used.",
|
||||
"@p_passkeys_used": {
|
||||
"placeholders": {
|
||||
"used": {},
|
||||
"max": {}
|
||||
}
|
||||
},
|
||||
"@_fingerprints": {},
|
||||
"l_fingerprint": "Fingerprint: {label}",
|
||||
"@l_fingerprint": {
|
||||
|
@ -422,13 +422,19 @@
|
||||
"l_ready_to_use": "Prêt à l'emploi",
|
||||
"l_register_sk_on_websites": "Enregistrer comme clé de sécurité sur les sites internet",
|
||||
"l_no_discoverable_accounts": "Aucune Passkey détectée",
|
||||
"l_non_passkeys_note": null,
|
||||
"p_non_passkeys_note": null,
|
||||
"s_delete_passkey": "Supprimer une Passkey",
|
||||
"l_delete_passkey_desc": "Supprimer la Passkey de votre YubiKey",
|
||||
"s_passkey_deleted": "Passkey supprimée",
|
||||
"p_warning_delete_passkey": "Cette action supprimera cette Passkey de votre YubiKey.",
|
||||
"s_search_passkeys": null,
|
||||
|
||||
"p_passkeys_used": null,
|
||||
"@p_passkeys_used": {
|
||||
"placeholders": {
|
||||
"used": {},
|
||||
"max": {}
|
||||
}
|
||||
},
|
||||
"@_fingerprints": {},
|
||||
"l_fingerprint": "Empreinte: {label}",
|
||||
"@l_fingerprint": {
|
||||
|
@ -422,13 +422,19 @@
|
||||
"l_ready_to_use": "すぐに使用可能",
|
||||
"l_register_sk_on_websites": "Webサイトにセキュリティキーとして登録する",
|
||||
"l_no_discoverable_accounts": "パスキーは保存されていません",
|
||||
"l_non_passkeys_note": null,
|
||||
"p_non_passkeys_note": null,
|
||||
"s_delete_passkey": "パスキーを削除",
|
||||
"l_delete_passkey_desc": "YubiKeyからパスキーの削除",
|
||||
"s_passkey_deleted": "パスキーが削除されました",
|
||||
"p_warning_delete_passkey": "これにより、YubiKeyからパスキーが削除されます",
|
||||
"s_search_passkeys": null,
|
||||
|
||||
"p_passkeys_used": null,
|
||||
"@p_passkeys_used": {
|
||||
"placeholders": {
|
||||
"used": {},
|
||||
"max": {}
|
||||
}
|
||||
},
|
||||
"@_fingerprints": {},
|
||||
"l_fingerprint": "指紋:{label}",
|
||||
"@l_fingerprint": {
|
||||
|
@ -422,13 +422,19 @@
|
||||
"l_ready_to_use": "Gotowe do użycia",
|
||||
"l_register_sk_on_websites": "Zarejestruj jako klucz bezpieczeństwa na stronach internetowych",
|
||||
"l_no_discoverable_accounts": "Nie wykryto kont",
|
||||
"l_non_passkeys_note": "Mogą istnieć inne dane uwierzytelniające, ale nie mogą być wyświetlane",
|
||||
"p_non_passkeys_note": null,
|
||||
"s_delete_passkey": "Usuń klucz dostępu",
|
||||
"l_delete_passkey_desc": "Usuń klucz dostępu z klucza YubiKey",
|
||||
"s_passkey_deleted": "Usunięto klucz dostępu",
|
||||
"p_warning_delete_passkey": "Spowoduje to usunięcie klucza dostępu z klucza YubiKey.",
|
||||
"s_search_passkeys": null,
|
||||
|
||||
"p_passkeys_used": null,
|
||||
"@p_passkeys_used": {
|
||||
"placeholders": {
|
||||
"used": {},
|
||||
"max": {}
|
||||
}
|
||||
},
|
||||
"@_fingerprints": {},
|
||||
"l_fingerprint": "Odcisk palca: {label}",
|
||||
"@l_fingerprint": {
|
||||
|
Loading…
Reference in New Issue
Block a user