1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-28 12:45:45 +01:00

control when password history shows

This commit is contained in:
Kyle Spearrin 2018-07-30 22:02:01 -04:00
parent bc768b773b
commit 8b8bd88adf
3 changed files with 9 additions and 8 deletions

2
jslib

@ -1 +1 @@
Subproject commit cfa4664b3182840ec3f8dac6da8e8562d11468d3 Subproject commit 13769a7fcba0d6ba67519b78e590019573776993

View File

@ -367,17 +367,16 @@
</div> </div>
</div> </div>
<ng-container *ngIf="editMode"> <ng-container *ngIf="editMode">
<h3 class="mt-4">{{'other' | i18n}}</h3> <div class="small text-muted mt-4">
<div class="small text-muted">
<div> <div>
<b class="font-weight-semibold">{{'dateUpdated' | i18n}}:</b> <b class="font-weight-semibold">{{'dateUpdated' | i18n}}:</b>
{{cipher.revisionDate | date:'medium'}} {{cipher.revisionDate | date:'medium'}}
</div> </div>
<div *ngIf="passwordRevisionDate"> <div *ngIf="showRevisionDate">
<b class="font-weight-semibold">{{'datePasswordUpdated' | i18n}}:</b> <b class="font-weight-semibold">{{'datePasswordUpdated' | i18n}}:</b>
{{passwordRevisionDate | date:'medium'}} {{cipher.passwordRevisionDisplayDate | date:'medium'}}
</div> </div>
<div *ngIf="cipher.hasPasswordHistory"> <div *ngIf="hasPasswordHistory">
<b class="font-weight-semibold">{{'passwordHistory' | i18n}}:</b> <b class="font-weight-semibold">{{'passwordHistory' | i18n}}:</b>
<a href="#" appStopClick (click)="viewHistory()" title="{{'view' | i18n}}"> <a href="#" appStopClick (click)="viewHistory()" title="{{'view' | i18n}}">
{{cipher.passwordHistory.length}} {{cipher.passwordHistory.length}}

View File

@ -33,7 +33,8 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit {
totpDash: number; totpDash: number;
totpSec: number; totpSec: number;
totpLow: boolean; totpLow: boolean;
passwordRevisionDate: Date; showRevisionDate = false;
hasPasswordHistory = false;
viewingPasswordHistory = false; viewingPasswordHistory = false;
protected totpInterval: number; protected totpInterval: number;
@ -50,7 +51,8 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit {
async ngOnInit() { async ngOnInit() {
await super.load(); await super.load();
this.passwordRevisionDate = this.cipher.passwordRevisionDisplayDate; this.showRevisionDate = this.cipher.passwordRevisionDisplayDate != null;
this.hasPasswordHistory = this.cipher.hasPasswordHistory;
this.cleanUp(); this.cleanUp();
this.isPremium = this.tokenService.getPremium(); this.isPremium = this.tokenService.getPremium();