view password history

This commit is contained in:
Kyle Spearrin 2018-07-30 08:48:48 -04:00
parent a25f6dee73
commit ed8aaa5505
3 changed files with 18 additions and 1 deletions

View File

@ -377,6 +377,18 @@
<b class="font-weight-semibold">{{'datePasswordUpdated' | i18n}}:</b>
{{passwordRevisionDate | date:'medium'}}
</div>
<div *ngIf="cipher.hasPasswordHistory">
<b class="font-weight-semibold">{{'passwordHistory' | i18n}}:</b>
<a href="#" appStopClick (click)="viewHistory()" title="{{'view' | i18n}}">
{{cipher.passwordHistory.length}}
</a>
</div>
<div class="ml-3" *ngIf="viewingPasswordHistory">
<div *ngFor="let ph of cipher.passwordHistory">
{{ph.lastUsedDate | date:'short'}} -
<span class="text-monospace ml-2">{{ph.password}}</span>
</div>
</div>
</div>
</ng-container>
</div>

View File

@ -34,6 +34,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit {
totpSec: number;
totpLow: boolean;
passwordRevisionDate: Date;
viewingPasswordHistory = false;
protected totpInterval: number;
@ -109,6 +110,10 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit {
this.messagingService.send('upgradeOrganization', { organizationId: this.cipher.organizationId });
}
viewHistory() {
this.viewingPasswordHistory = !this.viewingPasswordHistory;
}
protected cleanUp() {
if (this.totpInterval) {
window.clearInterval(this.totpInterval);

View File

@ -2383,7 +2383,7 @@
"description": "ex. Date this item was updated"
},
"datePasswordUpdated": {
"message": "Password updated",
"message": "Password Updated",
"description": "ex. Date this password was updated"
}
}