From 078111a4fc07ba254c55e92faf5f7a46ed5d2927 Mon Sep 17 00:00:00 2001 From: Thomas Rittson Date: Wed, 13 Jan 2021 18:40:10 +1000 Subject: [PATCH] Fix formatting and style --- src/popup/app-routing.module.ts | 2 +- src/popup/app.module.ts | 2 +- .../settings/excluded-domains.component.ts | 17 +++++++++-------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/popup/app-routing.module.ts b/src/popup/app-routing.module.ts index d4d37b07bd..96090c98f3 100644 --- a/src/popup/app-routing.module.ts +++ b/src/popup/app-routing.module.ts @@ -23,6 +23,7 @@ import { SsoComponent } from './accounts/sso.component'; import { PasswordGeneratorHistoryComponent } from './generator/password-generator-history.component'; import { PasswordGeneratorComponent } from './generator/password-generator.component'; import { PrivateModeComponent } from './private-mode.component'; +import { ExcludedDomainsComponent } from './settings/excluded-domains.component'; import { ExportComponent } from './settings/export.component'; import { FolderAddEditComponent } from './settings/folder-add-edit.component'; import { FoldersComponent } from './settings/folders.component'; @@ -40,7 +41,6 @@ import { GroupingsComponent } from './vault/groupings.component'; import { PasswordHistoryComponent } from './vault/password-history.component'; import { ShareComponent } from './vault/share.component'; import { ViewComponent } from './vault/view.component'; -import { ExcludedDomainsComponent } from './settings/excluded-domains.component'; const routes: Routes = [ { diff --git a/src/popup/app.module.ts b/src/popup/app.module.ts index 3b6bc204c2..63e8c92c32 100644 --- a/src/popup/app.module.ts +++ b/src/popup/app.module.ts @@ -29,6 +29,7 @@ import { AppComponent } from './app.component'; import { PasswordGeneratorHistoryComponent } from './generator/password-generator-history.component'; import { PasswordGeneratorComponent } from './generator/password-generator.component'; import { PrivateModeComponent } from './private-mode.component'; +import { ExcludedDomainsComponent } from './settings/excluded-domains.component'; import { ExportComponent } from './settings/export.component'; import { FolderAddEditComponent } from './settings/folder-add-edit.component'; import { FoldersComponent } from './settings/folders.component'; @@ -46,7 +47,6 @@ import { GroupingsComponent } from './vault/groupings.component'; import { PasswordHistoryComponent } from './vault/password-history.component'; import { ShareComponent } from './vault/share.component'; import { ViewComponent } from './vault/view.component'; -import { ExcludedDomainsComponent } from './settings/excluded-domains.component'; import { A11yTitleDirective } from 'jslib/angular/directives/a11y-title.directive'; import { ApiActionDirective } from 'jslib/angular/directives/api-action.directive'; diff --git a/src/popup/settings/excluded-domains.component.ts b/src/popup/settings/excluded-domains.component.ts index 5be9939e87..b09d8570dd 100644 --- a/src/popup/settings/excluded-domains.component.ts +++ b/src/popup/settings/excluded-domains.component.ts @@ -1,18 +1,19 @@ import { Component, + OnDestroy, OnInit, - NgZone, - OnDestroy + NgZone } from '@angular/core'; import { Router } from '@angular/router'; import { I18nService } from 'jslib/abstractions/i18n.service'; +import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; import { StorageService } from 'jslib/abstractions/storage.service'; import { ConstantsService } from 'jslib/services/constants.service'; -import { BrowserApi } from '../../browser/browserApi'; import { BroadcasterService } from 'jslib/angular/services/broadcaster.service'; + +import { BrowserApi } from '../../browser/browserApi'; import { Utils } from 'jslib/misc/utils'; -import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; interface ExcludedDomain { uri: string, @@ -40,7 +41,7 @@ export class ExcludedDomainsComponent implements OnInit, OnDestroy { const savedDomains = await this.storageService.get(ConstantsService.neverDomainsKey); if (savedDomains) { for (const uri of Object.keys(savedDomains)) { - this.excludedDomains.push({uri: uri, showCurrentUris: false}) + this.excludedDomains.push({ uri: uri, showCurrentUris: false }) } } @@ -68,7 +69,7 @@ export class ExcludedDomainsComponent implements OnInit, OnDestroy { } async addUri() { - this.excludedDomains.push({uri: '', showCurrentUris: false}) + this.excludedDomains.push({ uri: '', showCurrentUris: false }) } async removeUri(i: number) { @@ -76,7 +77,7 @@ export class ExcludedDomainsComponent implements OnInit, OnDestroy { } async submit() { - const savedDomains: {[name: string]: null} = {}; + const savedDomains: { [name: string]: null } = {}; for (const domain of this.excludedDomains) { if (domain.uri && domain.uri !== '') { const validDomain = Utils.getHostname(domain.uri); @@ -108,4 +109,4 @@ export class ExcludedDomainsComponent implements OnInit, OnDestroy { this.currentUris = Array.from(uriSet); } } -} \ No newline at end of file +}