mirror of
https://github.com/bitwarden/clients.git
synced 2025-12-22 13:17:30 +00:00
Delete unused models (#18063)
These were used prior to the extension refresh work. Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
44b31fdade
commit
3bd9ee1925
2
.github/whitelist-capital-letters.txt
vendored
2
.github/whitelist-capital-letters.txt
vendored
@@ -19,8 +19,6 @@
|
||||
./apps/cli/stores/chocolatey/tools/VERIFICATION.txt
|
||||
./apps/browser/store/windows/AppxManifest.xml
|
||||
./apps/browser/src/background/nativeMessaging.background.ts
|
||||
./apps/browser/src/models/browserComponentState.ts
|
||||
./apps/browser/src/models/browserGroupingsComponentState.ts
|
||||
./apps/browser/src/models/biometricErrors.ts
|
||||
./apps/browser/src/browser/safariApp.ts
|
||||
./apps/browser/src/safari/desktop/ViewController.swift
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
// FIXME: Update this file to be type safe and remove this and next line
|
||||
// @ts-strict-ignore
|
||||
import { Jsonify } from "type-fest";
|
||||
|
||||
export class BrowserComponentState {
|
||||
scrollY: number;
|
||||
searchText: string;
|
||||
|
||||
static fromJSON(json: Jsonify<BrowserComponentState>) {
|
||||
if (json == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Object.assign(new BrowserComponentState(), json);
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
// FIXME: Update this file to be type safe and remove this and next line
|
||||
// @ts-strict-ignore
|
||||
import { CollectionView } from "@bitwarden/admin-console/common";
|
||||
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||
import { DeepJsonify } from "@bitwarden/common/types/deep-jsonify";
|
||||
import { CipherType } from "@bitwarden/common/vault/enums";
|
||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||
import { FolderView } from "@bitwarden/common/vault/models/view/folder.view";
|
||||
|
||||
import { BrowserComponentState } from "./browserComponentState";
|
||||
|
||||
export class BrowserGroupingsComponentState extends BrowserComponentState {
|
||||
favoriteCiphers: CipherView[];
|
||||
noFolderCiphers: CipherView[];
|
||||
ciphers: CipherView[];
|
||||
collectionCounts: Map<string, number>;
|
||||
folderCounts: Map<string, number>;
|
||||
typeCounts: Map<CipherType, number>;
|
||||
folders: FolderView[];
|
||||
collections: CollectionView[];
|
||||
deletedCount: number;
|
||||
|
||||
toJSON() {
|
||||
return Utils.merge(this, {
|
||||
collectionCounts: Utils.mapToRecord(this.collectionCounts),
|
||||
folderCounts: Utils.mapToRecord(this.folderCounts),
|
||||
typeCounts: Utils.mapToRecord(this.typeCounts),
|
||||
});
|
||||
}
|
||||
|
||||
static fromJSON(json: DeepJsonify<BrowserGroupingsComponentState>) {
|
||||
if (json == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Object.assign(new BrowserGroupingsComponentState(), json, {
|
||||
favoriteCiphers: json.favoriteCiphers?.map((c) => CipherView.fromJSON(c)),
|
||||
noFolderCiphers: json.noFolderCiphers?.map((c) => CipherView.fromJSON(c)),
|
||||
ciphers: json.ciphers?.map((c) => CipherView.fromJSON(c)),
|
||||
collectionCounts: Utils.recordToMap(json.collectionCounts),
|
||||
folderCounts: Utils.recordToMap(json.folderCounts),
|
||||
typeCounts: Utils.recordToMap(json.typeCounts),
|
||||
folders: json.folders?.map((f) => FolderView.fromJSON(f)),
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user