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:
committed by
GitHub
parent
a3d2bb60d1
commit
3ef1080754
@@ -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": {
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user