2018-07-30 16:54:38 +02:00
|
|
|
import { Location } from '@angular/common';
|
|
|
|
import { Component } from '@angular/core';
|
|
|
|
import { ActivatedRoute } from '@angular/router';
|
|
|
|
|
2021-10-14 23:58:59 +02:00
|
|
|
import { first } from 'rxjs/operators';
|
|
|
|
|
2021-06-07 19:25:37 +02:00
|
|
|
import { CipherService } from 'jslib-common/abstractions/cipher.service';
|
|
|
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
|
|
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
2018-07-30 16:54:38 +02:00
|
|
|
|
|
|
|
import {
|
|
|
|
PasswordHistoryComponent as BasePasswordHistoryComponent,
|
2021-06-07 19:25:37 +02:00
|
|
|
} from 'jslib-angular/components/password-history.component';
|
2018-07-30 16:54:38 +02:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-password-history',
|
|
|
|
templateUrl: 'password-history.component.html',
|
|
|
|
})
|
|
|
|
export class PasswordHistoryComponent extends BasePasswordHistoryComponent {
|
2018-10-03 06:21:22 +02:00
|
|
|
constructor(cipherService: CipherService, platformUtilsService: PlatformUtilsService,
|
|
|
|
i18nService: I18nService, private location: Location,
|
|
|
|
private route: ActivatedRoute) {
|
|
|
|
super(cipherService, platformUtilsService, i18nService, window);
|
2018-07-30 16:54:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
async ngOnInit() {
|
2021-10-14 23:58:59 +02:00
|
|
|
this.route.queryParams.pipe(first()).subscribe(async params => {
|
2018-07-30 16:54:38 +02:00
|
|
|
if (params.cipherId) {
|
|
|
|
this.cipherId = params.cipherId;
|
|
|
|
} else {
|
|
|
|
this.close();
|
|
|
|
}
|
2019-03-06 20:31:50 +01:00
|
|
|
await this.init();
|
2018-07-30 16:54:38 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
close() {
|
|
|
|
this.location.back();
|
|
|
|
}
|
|
|
|
}
|