mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
lazy load history changes
This commit is contained in:
parent
5adc7556c2
commit
34e2cc2e39
@ -8,7 +8,7 @@
|
|||||||
<div class="title">{{$ctrl.i18n.passwordHistory}}</div>
|
<div class="title">{{$ctrl.i18n.passwordHistory}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="list">
|
<div class="list" ng-if="$ctrl.loaded">
|
||||||
<div class="list-grouped" ng-if="$ctrl.history.length !== 0">
|
<div class="list-grouped" ng-if="$ctrl.history.length !== 0">
|
||||||
<div class="list-grouped-item condensed wrap"
|
<div class="list-grouped-item condensed wrap"
|
||||||
ng-repeat="item in $ctrl.history | orderBy: 'date':true track by $index">
|
ng-repeat="item in $ctrl.history | orderBy: 'date':true track by $index">
|
||||||
@ -27,4 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="page-loading" ng-if="!$ctrl.loaded">
|
||||||
|
<i class="fa fa-lg fa-spinner fa-spin"></i>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,11 +10,16 @@ export class PasswordGeneratorHistoryController {
|
|||||||
editState: any;
|
editState: any;
|
||||||
addState: any;
|
addState: any;
|
||||||
i18n: any;
|
i18n: any;
|
||||||
|
loaded: boolean = false;
|
||||||
|
|
||||||
constructor(private $state: any, private passwordGenerationService: PasswordGenerationService,
|
constructor(private $state: any, private passwordGenerationService: PasswordGenerationService,
|
||||||
private toastr: any, private $analytics: any, private i18nService: any) {
|
private toastr: any, private $analytics: any, private i18nService: any) {
|
||||||
this.i18n = i18nService;
|
this.i18n = i18nService;
|
||||||
this.history = passwordGenerationService.getHistory();
|
|
||||||
|
passwordGenerationService.getHistory().then((history) => {
|
||||||
|
this.history = history;
|
||||||
|
this.loaded = true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$onInit() {
|
$onInit() {
|
||||||
|
Loading…
Reference in New Issue
Block a user