mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-22 16:29:09 +01:00
lint fixes
This commit is contained in:
parent
28bbbbd675
commit
78058c3591
@ -1,4 +1,4 @@
|
|||||||
import { Component, } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
import { ToasterService } from 'angular2-toaster';
|
import { ToasterService } from 'angular2-toaster';
|
||||||
@ -9,7 +9,7 @@ import { I18nService } from 'jslib/abstractions/i18n.service';
|
|||||||
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
TwoFactorOptionsComponent as BaseTwoFactorOptionsComponent
|
TwoFactorOptionsComponent as BaseTwoFactorOptionsComponent,
|
||||||
} from 'jslib/angular/components/two-factor-options.component';
|
} from 'jslib/angular/components/two-factor-options.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -60,7 +60,7 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.changeDetectorRef.detectChanges();
|
this.changeDetectorRef.detectChanges();
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.showNewWindowMessage = this.platformUtilsService.isSafari();
|
this.showNewWindowMessage = this.platformUtilsService.isSafari();
|
||||||
@ -70,8 +70,8 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var isDuo = this.selectedProviderType == TwoFactorProviderType.Duo ||
|
const isDuo = this.selectedProviderType === TwoFactorProviderType.Duo ||
|
||||||
this.selectedProviderType == TwoFactorProviderType.OrganizationDuo;
|
this.selectedProviderType === TwoFactorProviderType.OrganizationDuo;
|
||||||
if (!this.platformUtilsService.isSafari() || !isDuo) {
|
if (!this.platformUtilsService.isSafari() || !isDuo) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -86,7 +86,7 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
|||||||
type: 'duo',
|
type: 'duo',
|
||||||
host: params.Host,
|
host: params.Host,
|
||||||
signature: params.Signature,
|
signature: params.Signature,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
@ -106,7 +106,7 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
|||||||
window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
BrowserApi.tabSendMessage(sendSuccessToTab, {
|
BrowserApi.tabSendMessage(sendSuccessToTab, {
|
||||||
command: '2faPageData',
|
command: '2faPageData',
|
||||||
data: { type: 'success' }
|
data: { type: 'success' },
|
||||||
});
|
});
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
@ -19,8 +19,8 @@ import { TwoFactorComponent } from './accounts/two-factor.component';
|
|||||||
import { SettingsComponent } from './settings/settings.component';
|
import { SettingsComponent } from './settings/settings.component';
|
||||||
import { TabsComponent } from './tabs.component';
|
import { TabsComponent } from './tabs.component';
|
||||||
import { ExportComponent } from './tools/export.component';
|
import { ExportComponent } from './tools/export.component';
|
||||||
import { PasswordGeneratorComponent } from './tools/password-generator.component';
|
|
||||||
import { PasswordGeneratorHistoryComponent } from './tools/password-generator-history.component';
|
import { PasswordGeneratorHistoryComponent } from './tools/password-generator-history.component';
|
||||||
|
import { PasswordGeneratorComponent } from './tools/password-generator.component';
|
||||||
import { AddEditComponent } from './vault/add-edit.component';
|
import { AddEditComponent } from './vault/add-edit.component';
|
||||||
import { CiphersComponent } from './vault/ciphers.component';
|
import { CiphersComponent } from './vault/ciphers.component';
|
||||||
import { CurrentTabComponent } from './vault/current-tab.component';
|
import { CurrentTabComponent } from './vault/current-tab.component';
|
||||||
@ -161,8 +161,8 @@ const routes: Routes = [
|
|||||||
canActivate: [AuthGuardService],
|
canActivate: [AuthGuardService],
|
||||||
data: { state: 'tabs_settings' },
|
data: { state: 'tabs_settings' },
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -51,7 +51,7 @@ export class AppComponent implements OnInit {
|
|||||||
animation: 'slideUp',
|
animation: 'slideUp',
|
||||||
limit: 2,
|
limit: 2,
|
||||||
positionClass: 'toast-bottom-full-width',
|
positionClass: 'toast-bottom-full-width',
|
||||||
newestOnTop: false
|
newestOnTop: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
private lastActivity: number = null;
|
private lastActivity: number = null;
|
||||||
@ -110,7 +110,7 @@ export class AppComponent implements OnInit {
|
|||||||
|
|
||||||
BrowserApi.messageListener((window as any).bitwardenPopupMainMessageListener);
|
BrowserApi.messageListener((window as any).bitwardenPopupMainMessageListener);
|
||||||
|
|
||||||
this.router.events.subscribe(event => {
|
this.router.events.subscribe((event) => {
|
||||||
if (event instanceof NavigationEnd) {
|
if (event instanceof NavigationEnd) {
|
||||||
const url = event.urlAfterRedirects || event.url || '';
|
const url = event.urlAfterRedirects || event.url || '';
|
||||||
if (url.startsWith('/tabs/') && this.previousUrl.startsWith('/tabs/')) {
|
if (url.startsWith('/tabs/') && this.previousUrl.startsWith('/tabs/')) {
|
||||||
|
@ -27,6 +27,7 @@ import { SettingsComponent } from './settings/settings.component';
|
|||||||
import { TabsComponent } from './tabs.component';
|
import { TabsComponent } from './tabs.component';
|
||||||
import { ExportComponent } from './tools/export.component';
|
import { ExportComponent } from './tools/export.component';
|
||||||
import { PasswordGeneratorComponent } from './tools/password-generator.component';
|
import { PasswordGeneratorComponent } from './tools/password-generator.component';
|
||||||
|
// tslint:disable-next-line
|
||||||
import { PasswordGeneratorHistoryComponent } from './tools/password-generator-history.component';
|
import { PasswordGeneratorHistoryComponent } from './tools/password-generator-history.component';
|
||||||
import { AddEditComponent } from './vault/add-edit.component';
|
import { AddEditComponent } from './vault/add-edit.component';
|
||||||
import { CiphersComponent } from './vault/ciphers.component';
|
import { CiphersComponent } from './vault/ciphers.component';
|
||||||
|
@ -33,8 +33,6 @@ export class CiphersListComponent {
|
|||||||
|
|
||||||
cipherType = CipherType;
|
cipherType = CipherType;
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
selectCipher(c: CipherView) {
|
selectCipher(c: CipherView) {
|
||||||
this.onSelected.emit(c);
|
this.onSelected.emit(c);
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,8 @@ require('../scripts/duo.js');
|
|||||||
|
|
||||||
import { AppModule } from './app.module';
|
import { AppModule } from './app.module';
|
||||||
|
|
||||||
//if (!isDev()) {
|
// if (!isDev()) {
|
||||||
// enableProdMode();
|
// enableProdMode();
|
||||||
//}
|
// }
|
||||||
|
|
||||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||||
|
@ -15,8 +15,8 @@ import { BrowserApi } from '../../browser/browserApi';
|
|||||||
|
|
||||||
import { ApiService } from 'jslib/abstractions/api.service';
|
import { ApiService } from 'jslib/abstractions/api.service';
|
||||||
import { AppIdService } from 'jslib/abstractions/appId.service';
|
import { AppIdService } from 'jslib/abstractions/appId.service';
|
||||||
import { AuthService as AuthServiceAbstraction } from 'jslib/abstractions/auth.service';
|
|
||||||
import { AuditService } from 'jslib/abstractions/audit.service';
|
import { AuditService } from 'jslib/abstractions/audit.service';
|
||||||
|
import { AuthService as AuthServiceAbstraction } from 'jslib/abstractions/auth.service';
|
||||||
import { CipherService } from 'jslib/abstractions/cipher.service';
|
import { CipherService } from 'jslib/abstractions/cipher.service';
|
||||||
import { CollectionService } from 'jslib/abstractions/collection.service';
|
import { CollectionService } from 'jslib/abstractions/collection.service';
|
||||||
import { CryptoService } from 'jslib/abstractions/crypto.service';
|
import { CryptoService } from 'jslib/abstractions/crypto.service';
|
||||||
@ -108,12 +108,12 @@ export function initFactory(i18nService: I18nService, storageService: StorageSer
|
|||||||
{
|
{
|
||||||
provide: PlatformUtilsService,
|
provide: PlatformUtilsService,
|
||||||
useFactory: getBgService<PlatformUtilsService>('platformUtilsService'),
|
useFactory: getBgService<PlatformUtilsService>('platformUtilsService'),
|
||||||
deps: []
|
deps: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provide: PasswordGenerationService,
|
provide: PasswordGenerationService,
|
||||||
useFactory: getBgService<PasswordGenerationService>('passwordGenerationService'),
|
useFactory: getBgService<PasswordGenerationService>('passwordGenerationService'),
|
||||||
deps: []
|
deps: [],
|
||||||
},
|
},
|
||||||
{ provide: ApiService, useFactory: getBgService<ApiService>('apiService'), deps: [] },
|
{ provide: ApiService, useFactory: getBgService<ApiService>('apiService'), deps: [] },
|
||||||
{ provide: SyncService, useFactory: getBgService<SyncService>('syncService'), deps: [] },
|
{ provide: SyncService, useFactory: getBgService<SyncService>('syncService'), deps: [] },
|
||||||
|
@ -27,12 +27,12 @@ export class ExportComponent extends BaseExportComponent {
|
|||||||
platformUtilsService, window);
|
platformUtilsService, window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
close() {
|
||||||
|
this.location.back();
|
||||||
|
}
|
||||||
|
|
||||||
protected saved() {
|
protected saved() {
|
||||||
super.saved();
|
super.saved();
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
close() {
|
|
||||||
this.location.back();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration
|
|||||||
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
PasswordGeneratorHistoryComponent as BasePasswordGeneratorHistoryComponent
|
PasswordGeneratorHistoryComponent as BasePasswordGeneratorHistoryComponent,
|
||||||
} from 'jslib/angular/components/password-generator-history.component';
|
} from 'jslib/angular/components/password-generator-history.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -13,7 +13,7 @@ import { StateService } from 'jslib/abstractions/state.service';
|
|||||||
import { CipherView } from 'jslib/models/view/cipherView';
|
import { CipherView } from 'jslib/models/view/cipherView';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
PasswordGeneratorComponent as BasePasswordGeneratorComponent
|
PasswordGeneratorComponent as BasePasswordGeneratorComponent,
|
||||||
} from 'jslib/angular/components/password-generator.component';
|
} from 'jslib/angular/components/password-generator.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -15,9 +15,9 @@ import {
|
|||||||
|
|
||||||
import { BrowserApi } from '../../browser/browserApi';
|
import { BrowserApi } from '../../browser/browserApi';
|
||||||
|
|
||||||
import { FolderService } from 'jslib/abstractions/folder.service';
|
|
||||||
import { CollectionService } from 'jslib/abstractions/collection.service';
|
|
||||||
import { CipherService } from 'jslib/abstractions/cipher.service';
|
import { CipherService } from 'jslib/abstractions/cipher.service';
|
||||||
|
import { CollectionService } from 'jslib/abstractions/collection.service';
|
||||||
|
import { FolderService } from 'jslib/abstractions/folder.service';
|
||||||
import { I18nService } from 'jslib/abstractions/i18n.service';
|
import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||||
import { StateService } from 'jslib/abstractions/state.service';
|
import { StateService } from 'jslib/abstractions/state.service';
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ export class CiphersComponent extends BaseCiphersComponent implements OnInit, On
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.changeDetectorRef.detectChanges();
|
this.changeDetectorRef.detectChanges();
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ export class CiphersComponent extends BaseCiphersComponent implements OnInit, On
|
|||||||
}
|
}
|
||||||
|
|
||||||
async launchCipher(cipher: CipherView) {
|
async launchCipher(cipher: CipherView) {
|
||||||
if (cipher.type != CipherType.Login || !cipher.login.canLaunch) {
|
if (cipher.type !== CipherType.Login || !cipher.login.canLaunch) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ import { SyncService } from 'jslib/abstractions/sync.service';
|
|||||||
import { AutofillService } from '../../services/abstractions/autofill.service';
|
import { AutofillService } from '../../services/abstractions/autofill.service';
|
||||||
|
|
||||||
import { PopupUtilsService } from '../services/popup-utils.service';
|
import { PopupUtilsService } from '../services/popup-utils.service';
|
||||||
import { setTimeout } from 'timers';
|
|
||||||
|
|
||||||
const BroadcasterSubscriptionId = 'CurrentTabComponent';
|
const BroadcasterSubscriptionId = 'CurrentTabComponent';
|
||||||
|
|
||||||
@ -81,7 +80,6 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'syncCompleted':
|
case 'syncCompleted':
|
||||||
console.log('sync complete : ' + message.successfully);
|
|
||||||
if (message.successfully) {
|
if (message.successfully) {
|
||||||
await this.load();
|
await this.load();
|
||||||
}
|
}
|
||||||
@ -91,7 +89,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.changeDetectorRef.detectChanges();
|
this.changeDetectorRef.detectChanges();
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!this.syncService.syncInProgress) {
|
if (!this.syncService.syncInProgress) {
|
||||||
|
@ -16,12 +16,12 @@ import { BrowserApi } from '../../browser/browserApi';
|
|||||||
|
|
||||||
import { CipherType } from 'jslib/enums/cipherType';
|
import { CipherType } from 'jslib/enums/cipherType';
|
||||||
|
|
||||||
import { CollectionView } from 'jslib/models/view/collectionView';
|
|
||||||
import { CipherView } from 'jslib/models/view/cipherView';
|
import { CipherView } from 'jslib/models/view/cipherView';
|
||||||
|
import { CollectionView } from 'jslib/models/view/collectionView';
|
||||||
import { FolderView } from 'jslib/models/view/folderView';
|
import { FolderView } from 'jslib/models/view/folderView';
|
||||||
|
|
||||||
import { CollectionService } from 'jslib/abstractions/collection.service';
|
|
||||||
import { CipherService } from 'jslib/abstractions/cipher.service';
|
import { CipherService } from 'jslib/abstractions/cipher.service';
|
||||||
|
import { CollectionService } from 'jslib/abstractions/collection.service';
|
||||||
import { FolderService } from 'jslib/abstractions/folder.service';
|
import { FolderService } from 'jslib/abstractions/folder.service';
|
||||||
import { StateService } from 'jslib/abstractions/state.service';
|
import { StateService } from 'jslib/abstractions/state.service';
|
||||||
import { SyncService } from 'jslib/abstractions/sync.service';
|
import { SyncService } from 'jslib/abstractions/sync.service';
|
||||||
@ -78,7 +78,7 @@ export class GroupingsComponent extends BaseGroupingsComponent implements OnInit
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.changeDetectorRef.detectChanges();
|
this.changeDetectorRef.detectChanges();
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.route.queryParams.subscribe(async (params) => {
|
this.route.queryParams.subscribe(async (params) => {
|
||||||
@ -197,7 +197,7 @@ export class GroupingsComponent extends BaseGroupingsComponent implements OnInit
|
|||||||
}
|
}
|
||||||
|
|
||||||
async launchCipher(cipher: CipherView) {
|
async launchCipher(cipher: CipherView) {
|
||||||
if (cipher.type != CipherType.Login || !cipher.login.canLaunch) {
|
if (cipher.type !== CipherType.Login || !cipher.login.canLaunch) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@ import { BrowserApi } from '../browser/browserApi';
|
|||||||
|
|
||||||
import { DeviceType } from 'jslib/enums/deviceType';
|
import { DeviceType } from 'jslib/enums/deviceType';
|
||||||
|
|
||||||
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
|
||||||
import { MessagingService } from 'jslib/abstractions/messaging.service';
|
import { MessagingService } from 'jslib/abstractions/messaging.service';
|
||||||
|
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||||
|
|
||||||
import { UtilsService } from 'jslib/services/utils.service';
|
import { UtilsService } from 'jslib/services/utils.service';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user