Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
cipher view revision dates
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Jul 28, 2018
1 parent 2fcc3c5 commit 0b29dc1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/models/view/cipherView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export class CipherView implements View {
fields: FieldView[];
passwordHistory: PasswordHistoryView[];
collectionIds: string[];
revisionDate: Date;

constructor(c?: Cipher) {
if (!c) {
Expand All @@ -45,6 +46,7 @@ export class CipherView implements View {
this.type = c.type;
this.localData = c.localData;
this.collectionIds = c.collectionIds;
this.revisionDate = c.revisionDate;
}

get subTitle(): string {
Expand Down Expand Up @@ -79,4 +81,13 @@ export class CipherView implements View {
get login_username(): string {
return this.login != null ? this.login.username : null;
}

get passwordRevisionDisplayDate(): Date {
if (this.login == null) {
return null;
} else if (this.login.password == null || this.login.password === '') {
return null;
}
return this.login.passwordRevisionDate != null ? this.login.passwordRevisionDate : this.revisionDate;
}
}

0 comments on commit 0b29dc1

Please sign in to comment.