1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-13 01:58:44 +02: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[];
passwordHistory: PasswordHistoryView[];
collectionIds: string[];
revisionDate: Date;
constructor(c?: Cipher) {
if (!c) {
@ -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 {
@ -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;
}
}