Browse Source
* Casing fixes from the original port of the code * Add static createClientInfo and export * Add way to transform retrieve accounts into csv format Create ExportAccount model accountsToExportedCsvString can transform and export csv * Make calls needed for UI class async/awaitable * Add helpers for SSO on the UserTypeContext * Add additional error handling case * Fixes for SSO login --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>add-gitlens-settings
9 changed files with 116 additions and 49 deletions
@ -1 +1,2 @@
@@ -1 +1,2 @@
|
||||
export { ClientInfo } from "./models"; |
||||
export { Vault } from "./vault"; |
||||
|
||||
@ -1,7 +1,13 @@
@@ -1,7 +1,13 @@
|
||||
import { Utils } from "@bitwarden/common/platform/misc/utils"; |
||||
|
||||
import { Platform } from "../enums"; |
||||
|
||||
export class ClientInfo { |
||||
platform: Platform; |
||||
id: string; |
||||
description: string; |
||||
|
||||
static createClientInfo(): ClientInfo { |
||||
return { platform: Platform.Desktop, id: Utils.newGuid(), description: "Importer" }; |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
import { Account } from "./account"; |
||||
|
||||
export class ExportedAccount { |
||||
url: string; |
||||
username: string; |
||||
password: string; |
||||
totp: string; |
||||
extra: string; |
||||
name: string; |
||||
grouping: string; |
||||
fav: number; |
||||
|
||||
constructor(account: Account) { |
||||
this.url = account.url; |
||||
this.username = account.username; |
||||
this.password = account.password; |
||||
this.totp = account.totp; |
||||
this.extra = account.notes; |
||||
this.name = account.name; |
||||
this.grouping = account.path === "(none)" ? null : account.path; |
||||
this.fav = account.isFavorite ? 1 : 0; |
||||
} |
||||
} |
||||
Loading…
Reference in new issue