mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-25 21:51:30 +01:00
[PM-2014] feat: change toast depending on existing passkeys
This commit is contained in:
parent
72f10bab65
commit
3249504ae2
@ -59,7 +59,7 @@
|
|||||||
{{ "tryAgain" | i18n }}
|
{{ "tryAgain" | i18n }}
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="currentStep === 'credentialNaming'">
|
<ng-container *ngIf="currentStep === 'credentialNaming'">
|
||||||
{{ ((hasPasskeys$ | async) ? "save" : "turnOn ") | i18n }}
|
{{ ((hasPasskeys$ | async) ? "save" : "enable") | i18n }}
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" bitButton bitFormButton buttonType="secondary" bitDialogClose>
|
<button type="button" bitButton bitFormButton buttonType="secondary" bitDialogClose>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { DialogConfig, DialogRef } from "@angular/cdk/dialog";
|
import { DialogConfig, DialogRef } from "@angular/cdk/dialog";
|
||||||
import { Component, OnInit } from "@angular/core";
|
import { Component, OnInit } from "@angular/core";
|
||||||
import { FormBuilder, Validators } from "@angular/forms";
|
import { FormBuilder, Validators } from "@angular/forms";
|
||||||
import { map, Observable } from "rxjs";
|
import { firstValueFrom, map, Observable } from "rxjs";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
||||||
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
|
||||||
@ -144,7 +144,19 @@ export class CreateCredentialDialogComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.platformUtilsService.showToast("success", null, this.i18nService.t("passkeySaved", name));
|
if (firstValueFrom(this.hasPasskeys$)) {
|
||||||
|
this.platformUtilsService.showToast(
|
||||||
|
"success",
|
||||||
|
null,
|
||||||
|
this.i18nService.t("passkeySaved", name)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.platformUtilsService.showToast(
|
||||||
|
"success",
|
||||||
|
null,
|
||||||
|
this.i18nService.t("loginWithPasskeyEnabled")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this.dialogRef.close(CreateCredentialDialogResult.Success);
|
this.dialogRef.close(CreateCredentialDialogResult.Success);
|
||||||
}
|
}
|
||||||
|
@ -664,6 +664,9 @@
|
|||||||
"supportsEncryption": {
|
"supportsEncryption": {
|
||||||
"message": "supports encryption"
|
"message": "supports encryption"
|
||||||
},
|
},
|
||||||
|
"loginWithPasskeyEnabled": {
|
||||||
|
"message": "Log in with passkey turned on"
|
||||||
|
},
|
||||||
"passkeySaved": {
|
"passkeySaved": {
|
||||||
"message": "$NAME$ saved",
|
"message": "$NAME$ saved",
|
||||||
"placeholders": {
|
"placeholders": {
|
||||||
|
Loading…
Reference in New Issue
Block a user