mirror of
https://github.com/bitwarden/browser
synced 2026-02-28 02:23:25 +00:00
[PM-3810] Unify Passkeys view (#6335)
* Removed standalone fido2key view, update login view to show created date when a fido2key is present, reverted icon component to previous state without fido2key type, removed filters to handle standalone fido2key as login type * Allow duplication * Removed launchable behaviours from fido2 key view * Reworked desktop views from standalone fido2keys to unified fido2keys in the login * Reworked web views from standalone fido2keys to unified fido2keys in the login * Fixed test case to not create standalone fido2keys * Updated views to use fido2key creation date * removed unused locale * moved logic from template to class * Removed fido2key ciphertype * Removed fido2key ciphertype references
This commit is contained in:
@@ -3,5 +3,4 @@ export enum CipherType {
|
||||
SecureNote = 2,
|
||||
Card = 3,
|
||||
Identity = 4,
|
||||
Fido2Key = 5,
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import { Cipher } from "../domain/cipher";
|
||||
|
||||
import { AttachmentView } from "./attachment.view";
|
||||
import { CardView } from "./card.view";
|
||||
import { Fido2KeyView } from "./fido2-key.view";
|
||||
import { FieldView } from "./field.view";
|
||||
import { IdentityView } from "./identity.view";
|
||||
import { LoginView } from "./login.view";
|
||||
@@ -36,7 +35,6 @@ export class CipherView implements View, InitializerMetadata {
|
||||
identity = new IdentityView();
|
||||
card = new CardView();
|
||||
secureNote = new SecureNoteView();
|
||||
fido2Key = new Fido2KeyView();
|
||||
attachments: AttachmentView[] = null;
|
||||
fields: FieldView[] = null;
|
||||
passwordHistory: PasswordHistoryView[] = null;
|
||||
|
||||
@@ -20,14 +20,6 @@ export class Fido2KeyView extends ItemView {
|
||||
return this.userDisplayName;
|
||||
}
|
||||
|
||||
get canLaunch(): boolean {
|
||||
return this.rpId != null;
|
||||
}
|
||||
|
||||
get launchUri(): string {
|
||||
return this.canLaunch ? `https://${this.rpId}` : null;
|
||||
}
|
||||
|
||||
static fromJSON(obj: Partial<Jsonify<Fido2KeyView>>): Fido2KeyView {
|
||||
const creationDate = obj.creationDate != null ? new Date(obj.creationDate) : null;
|
||||
return Object.assign(new Fido2KeyView(), obj, {
|
||||
|
||||
@@ -760,12 +760,8 @@ function createCipherView(
|
||||
fido2KeyView.keyValue ??
|
||||
"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgTC-7XDZipXbaVBlnkjlBgO16ZmqBZWejK2iYo6lV0dehRANCAASOcM2WduNq1DriRYN7ZekvZz-bRhA-qNT4v0fbp5suUFJyWmgOQ0bybZcLXHaerK5Ep1JiSrQcewtQNgLtry7f";
|
||||
|
||||
if (cipher.type === CipherType.Login) {
|
||||
cipher.login = new LoginView();
|
||||
cipher.login.fido2Keys = [fido2KeyView];
|
||||
} else {
|
||||
cipher.fido2Key = fido2KeyView;
|
||||
}
|
||||
cipher.login = new LoginView();
|
||||
cipher.login.fido2Keys = [fido2KeyView];
|
||||
|
||||
return cipher;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user