mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-27656] Show error message when detecting Chromium v3 encryption, which isn't supported yet (#17156)
* Replace any-returns with types * Show an error message when a failure from the native call is returned --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com> Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
1be9e19fad
commit
3c2f44095a
@@ -3,6 +3,7 @@ import { Component } from "@angular/core";
|
||||
|
||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { DialogRef, AsyncActionsModule, ButtonModule, DialogModule } from "@bitwarden/components";
|
||||
import type { chromium_importer } from "@bitwarden/desktop-napi";
|
||||
import { ImportMetadataServiceAbstraction } from "@bitwarden/importer-core";
|
||||
import {
|
||||
ImportComponent,
|
||||
@@ -47,11 +48,14 @@ export class ImportDesktopComponent {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
|
||||
protected onLoadProfilesFromBrowser(browser: string): Promise<any[]> {
|
||||
protected onLoadProfilesFromBrowser(browser: string): Promise<chromium_importer.ProfileInfo[]> {
|
||||
return ipc.tools.chromiumImporter.getAvailableProfiles(browser);
|
||||
}
|
||||
|
||||
protected onImportFromBrowser(browser: string, profile: string): Promise<any[]> {
|
||||
protected onImportFromBrowser(
|
||||
browser: string,
|
||||
profile: string,
|
||||
): Promise<chromium_importer.LoginImportResult[]> {
|
||||
return ipc.tools.chromiumImporter.importLogins(browser, profile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,9 +5,12 @@ import type { chromium_importer } from "@bitwarden/desktop-napi";
|
||||
const chromiumImporter = {
|
||||
getMetadata: (): Promise<Record<string, chromium_importer.NativeImporterMetadata>> =>
|
||||
ipcRenderer.invoke("chromium_importer.getMetadata"),
|
||||
getAvailableProfiles: (browser: string): Promise<any[]> =>
|
||||
getAvailableProfiles: (browser: string): Promise<chromium_importer.ProfileInfo[]> =>
|
||||
ipcRenderer.invoke("chromium_importer.getAvailableProfiles", browser),
|
||||
importLogins: (browser: string, profileId: string): Promise<any[]> =>
|
||||
importLogins: (
|
||||
browser: string,
|
||||
profileId: string,
|
||||
): Promise<chromium_importer.LoginImportResult[]> =>
|
||||
ipcRenderer.invoke("chromium_importer.importLogins", browser, profileId),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user