From a3aa6c41f79efd30c1b83774f3ad800c504e9839 Mon Sep 17 00:00:00 2001 From: CarleyDiaz-Bitwarden <103955722+CarleyDiaz-Bitwarden@users.noreply.github.com> Date: Fri, 24 Jun 2022 10:23:37 -0400 Subject: [PATCH] running lint, removing commented code --- apps/.vscode/launch.json | 15 +++++++++++++++ apps/browser/tsconfig.json | 21 +++++++++++++++++++++ apps/web/src/app/tools/import.component.ts | 12 ++++-------- 3 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 apps/.vscode/launch.json create mode 100644 apps/browser/tsconfig.json diff --git a/apps/.vscode/launch.json b/apps/.vscode/launch.json new file mode 100644 index 00000000000..177bc7dfad1 --- /dev/null +++ b/apps/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "pwa-chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + } + ] +} diff --git a/apps/browser/tsconfig.json b/apps/browser/tsconfig.json new file mode 100644 index 00000000000..5c35b45fde8 --- /dev/null +++ b/apps/browser/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "moduleResolution": "node", + "noImplicitAny": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "module": "es6", + "target": "ES2016", + "allowJs": true, + "sourceMap": true, + "baseUrl": ".", + "paths": { + "@bitwarden/common/*": ["../../libs/common/src/*"], + "@bitwarden/angular/*": ["../../libs/angular/src/*"] + } + }, + "angularCompilerOptions": { + "preserveWhitespaces": true + }, + "include": ["src"] +} diff --git a/apps/web/src/app/tools/import.component.ts b/apps/web/src/app/tools/import.component.ts index 95e63c74167..0876d4f7726 100644 --- a/apps/web/src/app/tools/import.component.ts +++ b/apps/web/src/app/tools/import.component.ts @@ -255,11 +255,7 @@ export class ImportComponent implements OnInit { } async showPasswordPrompt(fcontents: string, organizationId: string) { - // if (!(await this.enabled())) { - // return true; - // } - - const ref = this.modalService.open(this.component, { + const ref = await this.modalService.open(this.component, { allowMultipleModals: true, data: { fileContents: fcontents, @@ -267,9 +263,9 @@ export class ImportComponent implements OnInit { }, }); - // if (ref == null) { - // return false; - // } + if (ref == null) { + return false; + } const result = await ref.onClosedPromise(); return result === true;