1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-24 16:49:26 +01:00

cipher view revision dates

This commit is contained in:
Kyle Spearrin 2018-07-27 23:37:36 -04:00
parent 2fcc3c51b8
commit 0b29dc10bf

View File

@ -30,6 +30,7 @@ export class CipherView implements View {
fields: FieldView[]; fields: FieldView[];
passwordHistory: PasswordHistoryView[]; passwordHistory: PasswordHistoryView[];
collectionIds: string[]; collectionIds: string[];
revisionDate: Date;
constructor(c?: Cipher) { constructor(c?: Cipher) {
if (!c) { if (!c) {
@ -45,6 +46,7 @@ export class CipherView implements View {
this.type = c.type; this.type = c.type;
this.localData = c.localData; this.localData = c.localData;
this.collectionIds = c.collectionIds; this.collectionIds = c.collectionIds;
this.revisionDate = c.revisionDate;
} }
get subTitle(): string { get subTitle(): string {
@ -79,4 +81,13 @@ export class CipherView implements View {
get login_username(): string { get login_username(): string {
return this.login != null ? this.login.username : null; 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;
}
} }