mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
add typings for timeouts and window objects
This commit is contained in:
parent
e2267d29a3
commit
2f5a1f470a
@ -21,9 +21,9 @@ export class CurrentController {
|
||||
|
||||
constructor($scope: any, private cipherService: any,
|
||||
private platformUtilsService: PlatformUtilsService,
|
||||
private utilsService: UtilsService, private toastr: any, private $window: any, private $state: any,
|
||||
private $timeout: any, private autofillService: any, private $analytics: any, private i18nService: any,
|
||||
private $filter: any) {
|
||||
private utilsService: UtilsService, private toastr: any, private $window: ng.IWindowService,
|
||||
private $state: any, private $timeout: ng.ITimeoutService, private autofillService: any,
|
||||
private $analytics: any, private i18nService: any, private $filter: any) {
|
||||
this.i18n = i18nService;
|
||||
this.inSidebar = platformUtilsService.inSidebar($window);
|
||||
this.disableSearch = platformUtilsService.isEdge();
|
||||
|
@ -6,7 +6,7 @@ export class MainController implements ng.IController {
|
||||
animation: string;
|
||||
|
||||
constructor($scope: any, $transitions: any, $state: any, authService: any, toastr: any,
|
||||
i18nService: any, $analytics: any, utilsService: UtilsService, $window: any) {
|
||||
i18nService: any, $analytics: any, utilsService: UtilsService, $window: ng.IWindowService) {
|
||||
this.animation = '';
|
||||
this.xsBody = $window.screen.availHeight < 600;
|
||||
this.smBody = !this.xsBody && $window.screen.availHeight <= 800;
|
||||
|
@ -9,7 +9,7 @@ export class LockController {
|
||||
i18n: any;
|
||||
masterPassword: string;
|
||||
|
||||
constructor(public $state: any, public i18nService: any, private $timeout: any,
|
||||
constructor(public $state: any, public i18nService: any, private $timeout: ng.ITimeoutService,
|
||||
private platformUtilsService: PlatformUtilsService,
|
||||
public cryptoService: CryptoService, public toastr: any, public userService: any,
|
||||
public messagingService: MessagingService, public SweetAlert: any) {
|
||||
|
@ -5,7 +5,7 @@ export class AboutController {
|
||||
year: number;
|
||||
i18n: any;
|
||||
|
||||
constructor(i18nService: any) {
|
||||
constructor(private i18nService: any) {
|
||||
this.i18n = i18nService;
|
||||
this.year = (new Date()).getFullYear();
|
||||
this.version = chrome.runtime.getManifest().version;
|
||||
|
@ -3,7 +3,7 @@ import * as template from './credits.component.html';
|
||||
export class CreditsController {
|
||||
i18n: any;
|
||||
|
||||
constructor(i18nService: any, private $analytics: any) {
|
||||
constructor(private i18nService: any, private $analytics: any) {
|
||||
this.i18n = i18nService;
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ export class AddFolderController {
|
||||
|
||||
constructor(private folderService: any, private $state: any, private toastr: any,
|
||||
platformUtilsService: PlatformUtilsService, private $analytics: any, private i18nService: any,
|
||||
$timeout: any) {
|
||||
$timeout: ng.ITimeoutService) {
|
||||
$timeout(() => {
|
||||
platformUtilsService.initListSectionItemListeners(document, angular);
|
||||
document.getElementById('name').focus();
|
||||
|
@ -14,7 +14,7 @@ export class EditFolderController {
|
||||
|
||||
constructor($scope: any, $stateParams: any, private folderService: any, private toastr: any, private $state: any,
|
||||
private SweetAlert: any, platformUtilsService: PlatformUtilsService, private $analytics: any,
|
||||
private i18nService: any, $timeout: any) {
|
||||
private i18nService: any, $timeout: ng.ITimeoutService) {
|
||||
this.i18n = i18nService;
|
||||
|
||||
$timeout(() => {
|
||||
|
@ -6,7 +6,7 @@ export class PremiumController {
|
||||
price = '$10';
|
||||
|
||||
constructor(private i18nService: any, private tokenService: any, private apiService: any, private toastr: any,
|
||||
private SweetAlert: any, private $analytics: any, private $timeout: any) {
|
||||
private SweetAlert: any, private $analytics: any, private $timeout: ng.ITimeoutService) {
|
||||
this.i18n = i18nService;
|
||||
this.isPremium = tokenService.getPremium();
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ export class ExportController {
|
||||
constructor(private $state: any, private cryptoService: CryptoService,
|
||||
private toastr: any, private utilsService: UtilsService, private $analytics: any,
|
||||
private i18nService: any, private folderService: any, private cipherService: any,
|
||||
private $window: any, private userService: any) {
|
||||
private $window: ng.IWindowService, private userService: any) {
|
||||
this.i18n = i18nService;
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ export class ExportController {
|
||||
}
|
||||
|
||||
private downloadFile(csv: string): void {
|
||||
const csvBlob = new Blob([csv]);
|
||||
const csvBlob = new Blob([csv], { type: 'text/plain' });
|
||||
const fileName = this.makeFileName();
|
||||
|
||||
if (this.$window.navigator.msSaveOrOpenBlob) {
|
||||
@ -138,7 +138,7 @@ export class ExportController {
|
||||
this.$window.navigator.msSaveBlob(csvBlob, fileName);
|
||||
} else {
|
||||
const a = this.$window.document.createElement('a');
|
||||
a.href = this.$window.URL.createObjectURL(csvBlob, { type: 'text/plain' });
|
||||
a.href = this.$window.URL.createObjectURL(csvBlob);
|
||||
a.download = fileName;
|
||||
this.$window.document.body.appendChild(a);
|
||||
a.click();
|
||||
|
@ -14,7 +14,7 @@ export class PasswordGeneratorController {
|
||||
|
||||
constructor(private $state: any, private passwordGenerationService: any,
|
||||
private toastr: any, private platformUtilsService: PlatformUtilsService,
|
||||
private $analytics: any, private i18nService: any, private $timeout: any) {
|
||||
private $analytics: any, private i18nService: any, private $timeout: ng.ITimeoutService) {
|
||||
this.i18n = i18nService;
|
||||
|
||||
passwordGenerationService.getOptions().then((options: any) => {
|
||||
|
Loading…
Reference in New Issue
Block a user