1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

[PM-10791] Set favorite on import from ProtonPass (#10480)

* Update import test data with new fields
Add new fields to the types file

* Set favorites when importing from ProtonPass

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
Daniel James Smith
2024-08-19 12:27:00 +02:00
committed by GitHub
parent a3d2bb60d1
commit 3ef1080754
4 changed files with 22 additions and 1 deletions

View File

@@ -43,6 +43,7 @@ export class ProtonPassJsonImporter extends BaseImporter implements Importer {
const cipher = this.initLoginCipher();
cipher.name = this.getValueOrDefault(item.data.metadata.name, "--");
cipher.notes = this.getValueOrDefault(item.data.metadata.note);
cipher.favorite = item.pinned;
switch (item.data.type) {
case "login": {

View File

@@ -24,6 +24,7 @@ export type ProtonPassItem = {
contentFormatVersion: number;
createTime: number;
modifyTime: number;
pinned: boolean;
};
export enum ProtonPassItemState {
@@ -34,6 +35,7 @@ export enum ProtonPassItemState {
export type ProtonPassItemData = {
metadata: ProtonPassItemMetadata;
extraFields: ProtonPassItemExtraField[];
platformSpecific?: any;
type: "login" | "alias" | "creditCard" | "note";
content: ProtonPassLoginItemContent | ProtonPassCreditCardItemContent;
};
@@ -60,6 +62,7 @@ export type ProtonPassLoginItemContent = {
password?: string;
urls?: string[];
totpUri?: string;
passkeys: [];
itemUsername?: string;
};