mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 07:13:32 +00:00
[PS-1194] Display Creation Date in Clients (#3181)
* Add CreationDate to common libs * Add CreationDate to Browser * Add CreationDate to CLI * Add CreationDate to Desktop * Add CreationDate to Web * Update tests Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
This commit is contained in:
@@ -30,6 +30,7 @@ export class CipherData {
|
||||
attachments?: AttachmentData[];
|
||||
passwordHistory?: PasswordHistoryData[];
|
||||
collectionIds?: string[];
|
||||
creationDate: string;
|
||||
deletedDate: string;
|
||||
reprompt: CipherRepromptType;
|
||||
|
||||
@@ -50,6 +51,7 @@ export class CipherData {
|
||||
this.name = response.name;
|
||||
this.notes = response.notes;
|
||||
this.collectionIds = collectionIds != null ? collectionIds : response.collectionIds;
|
||||
this.creationDate = response.creationDate;
|
||||
this.deletedDate = response.deletedDate;
|
||||
this.reprompt = response.reprompt;
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ export class Cipher extends Domain {
|
||||
fields: Field[];
|
||||
passwordHistory: Password[];
|
||||
collectionIds: string[];
|
||||
creationDate: Date;
|
||||
deletedDate: Date;
|
||||
reprompt: CipherRepromptType;
|
||||
|
||||
@@ -72,6 +73,7 @@ export class Cipher extends Domain {
|
||||
this.revisionDate = obj.revisionDate != null ? new Date(obj.revisionDate) : null;
|
||||
this.collectionIds = obj.collectionIds;
|
||||
this.localData = localData;
|
||||
this.creationDate = obj.creationDate != null ? new Date(obj.creationDate) : null;
|
||||
this.deletedDate = obj.deletedDate != null ? new Date(obj.deletedDate) : null;
|
||||
this.reprompt = obj.reprompt;
|
||||
|
||||
@@ -200,6 +202,7 @@ export class Cipher extends Domain {
|
||||
c.revisionDate = this.revisionDate != null ? this.revisionDate.toISOString() : null;
|
||||
c.type = this.type;
|
||||
c.collectionIds = this.collectionIds;
|
||||
c.creationDate = this.creationDate != null ? this.creationDate.toISOString() : null;
|
||||
c.deletedDate = this.deletedDate != null ? this.deletedDate.toISOString() : null;
|
||||
c.reprompt = this.reprompt;
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ export class CipherResponse extends BaseResponse {
|
||||
attachments: AttachmentResponse[];
|
||||
passwordHistory: PasswordHistoryResponse[];
|
||||
collectionIds: string[];
|
||||
creationDate: string;
|
||||
deletedDate: string;
|
||||
reprompt: CipherRepromptType;
|
||||
|
||||
@@ -50,6 +51,7 @@ export class CipherResponse extends BaseResponse {
|
||||
this.organizationUseTotp = this.getResponseProperty("OrganizationUseTotp");
|
||||
this.revisionDate = this.getResponseProperty("RevisionDate");
|
||||
this.collectionIds = this.getResponseProperty("CollectionIds");
|
||||
this.creationDate = this.getResponseProperty("CreationDate");
|
||||
this.deletedDate = this.getResponseProperty("DeletedDate");
|
||||
|
||||
const login = this.getResponseProperty("Login");
|
||||
|
||||
@@ -36,6 +36,7 @@ export class CipherView implements View {
|
||||
passwordHistory: PasswordHistoryView[] = null;
|
||||
collectionIds: string[] = null;
|
||||
revisionDate: Date = null;
|
||||
creationDate: Date = null;
|
||||
deletedDate: Date = null;
|
||||
reprompt: CipherRepromptType = CipherRepromptType.None;
|
||||
|
||||
@@ -55,6 +56,7 @@ export class CipherView implements View {
|
||||
this.localData = c.localData;
|
||||
this.collectionIds = c.collectionIds;
|
||||
this.revisionDate = c.revisionDate;
|
||||
this.creationDate = c.creationDate;
|
||||
this.deletedDate = c.deletedDate;
|
||||
// Old locally stored ciphers might have reprompt == null. If so set it to None.
|
||||
this.reprompt = c.reprompt ?? CipherRepromptType.None;
|
||||
|
||||
Reference in New Issue
Block a user