1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-22 16:29:09 +01:00

lint fixes

This commit is contained in:
Kyle Spearrin 2018-04-10 23:49:46 -04:00
parent 28bbbbd675
commit 78058c3591
15 changed files with 34 additions and 37 deletions

View File

@ -1,4 +1,4 @@
import { Component, } from '@angular/core';
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { ToasterService } from 'angular2-toaster';
@ -9,7 +9,7 @@ import { I18nService } from 'jslib/abstractions/i18n.service';
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
import {
TwoFactorOptionsComponent as BaseTwoFactorOptionsComponent
TwoFactorOptionsComponent as BaseTwoFactorOptionsComponent,
} from 'jslib/angular/components/two-factor-options.component';
@Component({

View File

@ -60,7 +60,7 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
}
this.changeDetectorRef.detectChanges();
})
});
});
this.showNewWindowMessage = this.platformUtilsService.isSafari();
@ -70,8 +70,8 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
return;
}
var isDuo = this.selectedProviderType == TwoFactorProviderType.Duo ||
this.selectedProviderType == TwoFactorProviderType.OrganizationDuo;
const isDuo = this.selectedProviderType === TwoFactorProviderType.Duo ||
this.selectedProviderType === TwoFactorProviderType.OrganizationDuo;
if (!this.platformUtilsService.isSafari() || !isDuo) {
return;
}
@ -86,7 +86,7 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
type: 'duo',
host: params.Host,
signature: params.Signature,
}
},
});
}, 500);
}
@ -106,7 +106,7 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
window.setTimeout(() => {
BrowserApi.tabSendMessage(sendSuccessToTab, {
command: '2faPageData',
data: { type: 'success' }
data: { type: 'success' },
});
}, 1000);
}

View File

@ -19,8 +19,8 @@ import { TwoFactorComponent } from './accounts/two-factor.component';
import { SettingsComponent } from './settings/settings.component';
import { TabsComponent } from './tabs.component';
import { ExportComponent } from './tools/export.component';
import { PasswordGeneratorComponent } from './tools/password-generator.component';
import { PasswordGeneratorHistoryComponent } from './tools/password-generator-history.component';
import { PasswordGeneratorComponent } from './tools/password-generator.component';
import { AddEditComponent } from './vault/add-edit.component';
import { CiphersComponent } from './vault/ciphers.component';
import { CurrentTabComponent } from './vault/current-tab.component';
@ -161,8 +161,8 @@ const routes: Routes = [
canActivate: [AuthGuardService],
data: { state: 'tabs_settings' },
},
]
}
],
},
];
@NgModule({

View File

@ -51,7 +51,7 @@ export class AppComponent implements OnInit {
animation: 'slideUp',
limit: 2,
positionClass: 'toast-bottom-full-width',
newestOnTop: false
newestOnTop: false,
});
private lastActivity: number = null;
@ -110,7 +110,7 @@ export class AppComponent implements OnInit {
BrowserApi.messageListener((window as any).bitwardenPopupMainMessageListener);
this.router.events.subscribe(event => {
this.router.events.subscribe((event) => {
if (event instanceof NavigationEnd) {
const url = event.urlAfterRedirects || event.url || '';
if (url.startsWith('/tabs/') && this.previousUrl.startsWith('/tabs/')) {

View File

@ -27,6 +27,7 @@ import { SettingsComponent } from './settings/settings.component';
import { TabsComponent } from './tabs.component';
import { ExportComponent } from './tools/export.component';
import { PasswordGeneratorComponent } from './tools/password-generator.component';
// tslint:disable-next-line
import { PasswordGeneratorHistoryComponent } from './tools/password-generator-history.component';
import { AddEditComponent } from './vault/add-edit.component';
import { CiphersComponent } from './vault/ciphers.component';

View File

@ -33,8 +33,6 @@ export class CiphersListComponent {
cipherType = CipherType;
constructor() { }
selectCipher(c: CipherView) {
this.onSelected.emit(c);
}

View File

@ -8,8 +8,8 @@ require('../scripts/duo.js');
import { AppModule } from './app.module';
//if (!isDev()) {
// if (!isDev()) {
// enableProdMode();
//}
// }
platformBrowserDynamic().bootstrapModule(AppModule);

View File

@ -15,8 +15,8 @@ import { BrowserApi } from '../../browser/browserApi';
import { ApiService } from 'jslib/abstractions/api.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 { AuthService as AuthServiceAbstraction } from 'jslib/abstractions/auth.service';
import { CipherService } from 'jslib/abstractions/cipher.service';
import { CollectionService } from 'jslib/abstractions/collection.service';
import { CryptoService } from 'jslib/abstractions/crypto.service';
@ -108,12 +108,12 @@ export function initFactory(i18nService: I18nService, storageService: StorageSer
{
provide: PlatformUtilsService,
useFactory: getBgService<PlatformUtilsService>('platformUtilsService'),
deps: []
deps: [],
},
{
provide: PasswordGenerationService,
useFactory: getBgService<PasswordGenerationService>('passwordGenerationService'),
deps: []
deps: [],
},
{ provide: ApiService, useFactory: getBgService<ApiService>('apiService'), deps: [] },
{ provide: SyncService, useFactory: getBgService<SyncService>('syncService'), deps: [] },

View File

@ -27,12 +27,12 @@ export class ExportComponent extends BaseExportComponent {
platformUtilsService, window);
}
close() {
this.location.back();
}
protected saved() {
super.saved();
this.close();
}
close() {
this.location.back();
}
}

View File

@ -9,7 +9,7 @@ import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
import {
PasswordGeneratorHistoryComponent as BasePasswordGeneratorHistoryComponent
PasswordGeneratorHistoryComponent as BasePasswordGeneratorHistoryComponent,
} from 'jslib/angular/components/password-generator-history.component';
@Component({

View File

@ -13,7 +13,7 @@ import { StateService } from 'jslib/abstractions/state.service';
import { CipherView } from 'jslib/models/view/cipherView';
import {
PasswordGeneratorComponent as BasePasswordGeneratorComponent
PasswordGeneratorComponent as BasePasswordGeneratorComponent,
} from 'jslib/angular/components/password-generator.component';
@Component({

View File

@ -15,9 +15,9 @@ import {
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 { CollectionService } from 'jslib/abstractions/collection.service';
import { FolderService } from 'jslib/abstractions/folder.service';
import { I18nService } from 'jslib/abstractions/i18n.service';
import { StateService } from 'jslib/abstractions/state.service';
@ -124,7 +124,7 @@ export class CiphersComponent extends BaseCiphersComponent implements OnInit, On
}
this.changeDetectorRef.detectChanges();
})
});
});
}
@ -144,7 +144,7 @@ export class CiphersComponent extends BaseCiphersComponent implements OnInit, On
}
async launchCipher(cipher: CipherView) {
if (cipher.type != CipherType.Login || !cipher.login.canLaunch) {
if (cipher.type !== CipherType.Login || !cipher.login.canLaunch) {
return;
}

View File

@ -26,7 +26,6 @@ import { SyncService } from 'jslib/abstractions/sync.service';
import { AutofillService } from '../../services/abstractions/autofill.service';
import { PopupUtilsService } from '../services/popup-utils.service';
import { setTimeout } from 'timers';
const BroadcasterSubscriptionId = 'CurrentTabComponent';
@ -81,7 +80,6 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
}
break;
case 'syncCompleted':
console.log('sync complete : ' + message.successfully);
if (message.successfully) {
await this.load();
}
@ -91,7 +89,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
}
this.changeDetectorRef.detectChanges();
})
});
});
if (!this.syncService.syncInProgress) {

View File

@ -16,12 +16,12 @@ import { BrowserApi } from '../../browser/browserApi';
import { CipherType } from 'jslib/enums/cipherType';
import { CollectionView } from 'jslib/models/view/collectionView';
import { CipherView } from 'jslib/models/view/cipherView';
import { CollectionView } from 'jslib/models/view/collectionView';
import { FolderView } from 'jslib/models/view/folderView';
import { CollectionService } from 'jslib/abstractions/collection.service';
import { CipherService } from 'jslib/abstractions/cipher.service';
import { CollectionService } from 'jslib/abstractions/collection.service';
import { FolderService } from 'jslib/abstractions/folder.service';
import { StateService } from 'jslib/abstractions/state.service';
import { SyncService } from 'jslib/abstractions/sync.service';
@ -78,7 +78,7 @@ export class GroupingsComponent extends BaseGroupingsComponent implements OnInit
}
this.changeDetectorRef.detectChanges();
})
});
});
this.route.queryParams.subscribe(async (params) => {
@ -197,7 +197,7 @@ export class GroupingsComponent extends BaseGroupingsComponent implements OnInit
}
async launchCipher(cipher: CipherView) {
if (cipher.type != CipherType.Login || !cipher.login.canLaunch) {
if (cipher.type !== CipherType.Login || !cipher.login.canLaunch) {
return;
}

View File

@ -4,8 +4,8 @@ import { BrowserApi } from '../browser/browserApi';
import { DeviceType } from 'jslib/enums/deviceType';
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
import { MessagingService } from 'jslib/abstractions/messaging.service';
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
import { UtilsService } from 'jslib/services/utils.service';