forked from bitwarden/desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
119 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<div class="modal fade"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-body"> | ||
<div class="box"> | ||
<div class="box-header"> | ||
{{'passwordHistory' | i18n}} | ||
</div> | ||
<div class="box-content condensed"> | ||
<div class="box-content-row box-content-row-flex" *ngFor="let h of history"> | ||
<div class="row-main"> | ||
<span class="text monospaced"> | ||
{{h.password}} | ||
</span> | ||
<span class="detail">{{h.date | date:'medium'}}</span> | ||
</div> | ||
<div class="action-buttons"> | ||
<a class="row-btn" href="#" appStopClick title="{{'copyPassword' | i18n}}" | ||
(click)="copy(h.password)"> | ||
<i class="fa fa-lg fa-clipboard"></i> | ||
</a> | ||
</div> | ||
</div> | ||
<div class="box-content-row" *ngIf="!history.length"> | ||
{{'noItemsInList' | i18n}} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" data-dismiss="modal">{{'close' | i18n}}</button> | ||
<div class="right"> | ||
<button appBlurClick type="button" (click)="clear()" class="danger" title="{{'clear' | i18n}}"> | ||
<i class="fa fa-trash-o fa-lg fa-fw"></i> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import * as template from './password-generator-history.component.html'; | ||
|
||
import { Angulartics2 } from 'angulartics2'; | ||
|
||
import { | ||
Component, | ||
OnInit, | ||
} from '@angular/core'; | ||
|
||
import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration.service'; | ||
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; | ||
|
||
import { PasswordHistory } from 'jslib/models/domain/passwordHistory'; | ||
|
||
@Component({ | ||
selector: 'app-password-generator-history', | ||
template: template, | ||
}) | ||
export class PasswordGeneratorHistoryComponent implements OnInit { | ||
history: PasswordHistory[]; | ||
|
||
constructor(private passwordGenerationService: PasswordGenerationService, private analytics: Angulartics2, | ||
private platformUtilsService: PlatformUtilsService) { } | ||
|
||
async ngOnInit() { | ||
this.history = await this.passwordGenerationService.getHistory(); | ||
} | ||
|
||
clear() { | ||
this.history = []; | ||
this.passwordGenerationService.clear(); | ||
} | ||
|
||
copy(password: string) { | ||
this.analytics.eventTrack.next({ action: 'Copied Historical Password' }); | ||
this.platformUtilsService.copyToClipboard(password); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters