mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-14 01:01:31 +01:00
[PM-2014] feat: show toast on passkey saved
This commit is contained in:
parent
2e5f9e58d3
commit
355a52f43f
@ -100,6 +100,7 @@ describe("WebauthnService", () => {
|
||||
|
||||
expect(result).toBe(true);
|
||||
expect(apiService.saveCredential).toHaveBeenCalled();
|
||||
expect(platformUtilsService.showToast).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -91,6 +91,11 @@ export class WebauthnService {
|
||||
request.token = credentialOptions.token;
|
||||
request.name = name;
|
||||
await this.apiService.saveCredential(request);
|
||||
this.platformUtilsService.showToast(
|
||||
"success",
|
||||
null,
|
||||
this.i18nService.t("passkeySaved", name)
|
||||
);
|
||||
this.refresh();
|
||||
return true;
|
||||
} catch (error) {
|
||||
|
@ -664,6 +664,15 @@
|
||||
"supportsEncryption": {
|
||||
"message": "supports encryption"
|
||||
},
|
||||
"passkeySaved": {
|
||||
"message": "$NAME$ saved",
|
||||
"placeholders": {
|
||||
"name": {
|
||||
"content": "$1",
|
||||
"example": "Personal yubikey"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tryAgain": {
|
||||
"message": "Try again"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user