mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
[PM-3343] Capture TOTP QR codes from websites in the browser extension (#5985)
* Implement totp capture for browser extensions
This commit is contained in:
@@ -49,6 +49,7 @@ export class EmergencyAddEditCipherComponent extends BaseAddEditComponent {
|
||||
logService: LogService,
|
||||
sendApiService: SendApiService,
|
||||
dialogService: DialogService,
|
||||
window: Window,
|
||||
datePipe: DatePipe,
|
||||
) {
|
||||
super(
|
||||
@@ -69,6 +70,7 @@ export class EmergencyAddEditCipherComponent extends BaseAddEditComponent {
|
||||
passwordRepromptService,
|
||||
sendApiService,
|
||||
dialogService,
|
||||
window,
|
||||
datePipe,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit, On
|
||||
passwordRepromptService: PasswordRepromptService,
|
||||
sendApiService: SendApiService,
|
||||
dialogService: DialogService,
|
||||
window: Window,
|
||||
datePipe: DatePipe,
|
||||
) {
|
||||
super(
|
||||
@@ -79,6 +80,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit, On
|
||||
organizationService,
|
||||
sendApiService,
|
||||
dialogService,
|
||||
window,
|
||||
datePipe,
|
||||
);
|
||||
}
|
||||
@@ -142,9 +144,9 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit, On
|
||||
this.platformUtilsService.launchUri(uri.launchUri);
|
||||
}
|
||||
|
||||
copy(value: string, typeI18nKey: string, aType: string) {
|
||||
async copy(value: string, typeI18nKey: string, aType: string): Promise<boolean> {
|
||||
if (value == null) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
this.platformUtilsService.copyToClipboard(value, { window: window });
|
||||
@@ -166,6 +168,8 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit, On
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
async generatePassword(): Promise<boolean> {
|
||||
|
||||
@@ -51,6 +51,7 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||
organizationService: OrganizationService,
|
||||
sendApiService: SendApiService,
|
||||
dialogService: DialogService,
|
||||
window: Window,
|
||||
datePipe: DatePipe,
|
||||
) {
|
||||
super(
|
||||
@@ -71,6 +72,7 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||
passwordRepromptService,
|
||||
sendApiService,
|
||||
dialogService,
|
||||
window,
|
||||
datePipe,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user