From 600c8de129aa7cfae5216a59ce78a98d1c9b20db Mon Sep 17 00:00:00 2001 From: Shane Melton Date: Wed, 7 Aug 2024 12:57:05 -0700 Subject: [PATCH] [PM-10100] Remove auto password generation (#10355) * [PM-10100] Remove initial password generation on new Login ciphers * [PM-10100] Update password help text * [PM-10100] Fix linter --- apps/browser/src/_locales/en/messages.json | 11 ++++++++++ .../browser-cipher-form-generation.service.ts | 3 --- apps/web/src/locales/en/messages.json | 20 +++++++++++++++++++ .../cipher-form-generation.service.ts | 6 ------ .../cipher-form-generator.component.ts | 4 ++-- .../login-details-section.component.html | 10 ++++++++++ .../login-details-section.component.spec.ts | 8 -------- .../login-details-section.component.ts | 8 +++++++- .../default-cipher-form-generation.service.ts | 4 ---- 9 files changed, 50 insertions(+), 24 deletions(-) diff --git a/apps/browser/src/_locales/en/messages.json b/apps/browser/src/_locales/en/messages.json index 49d7ae0f3a0..69600b5da7c 100644 --- a/apps/browser/src/_locales/en/messages.json +++ b/apps/browser/src/_locales/en/messages.json @@ -1815,6 +1815,17 @@ "useThisUsername": { "message": "Use this username" }, + "securePasswordGenerated": { + "message": "Secure password generated! Don't forget to also update your password on the website." + }, + "useGeneratorHelpTextPartOne": { + "message": "Use the generator", + "description": "This will be used as part of a larger sentence, broken up to include the generator icon. The full sentence will read 'Use the generator [GENERATOR_ICON] to create a strong unique password'" + }, + "useGeneratorHelpTextPartTwo": { + "message": "to create a strong unique password", + "description": "This will be used as part of a larger sentence, broken up to include the generator icon. The full sentence will read 'Use the generator [GENERATOR_ICON] to create a strong unique password'" + }, "vaultTimeoutAction": { "message": "Vault timeout action" }, diff --git a/apps/browser/src/vault/popup/services/browser-cipher-form-generation.service.ts b/apps/browser/src/vault/popup/services/browser-cipher-form-generation.service.ts index b9e8641431f..70993482046 100644 --- a/apps/browser/src/vault/popup/services/browser-cipher-form-generation.service.ts +++ b/apps/browser/src/vault/popup/services/browser-cipher-form-generation.service.ts @@ -39,7 +39,4 @@ export class BrowserCipherFormGenerationService implements CipherFormGenerationS return result.generatedValue; } - async generateInitialPassword(): Promise { - return ""; - } } diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index be48d1b301d..5f35c1c3e59 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -6050,6 +6050,26 @@ "randomWord": { "message": "Random word" }, + "usernameGenerator": { + "message": "Username generator" + }, + "useThisPassword": { + "message": "Use this password" + }, + "useThisUsername": { + "message": "Use this username" + }, + "securePasswordGenerated": { + "message": "Secure password generated! Don't forget to also update your password on the website." + }, + "useGeneratorHelpTextPartOne": { + "message": "Use the generator", + "description": "This will be used as part of a larger sentence, broken up to include the generator icon. The full sentence will read 'Use the generator [GENERATOR_ICON] to create a strong unique password'" + }, + "useGeneratorHelpTextPartTwo": { + "message": "to create a strong unique password", + "description": "This will be used as part of a larger sentence, broken up to include the generator icon. The full sentence will read 'Use the generator [GENERATOR_ICON] to create a strong unique password'" + }, "service": { "message": "Service" }, diff --git a/libs/vault/src/cipher-form/abstractions/cipher-form-generation.service.ts b/libs/vault/src/cipher-form/abstractions/cipher-form-generation.service.ts index 6ddd4473445..beb295103fb 100644 --- a/libs/vault/src/cipher-form/abstractions/cipher-form-generation.service.ts +++ b/libs/vault/src/cipher-form/abstractions/cipher-form-generation.service.ts @@ -11,10 +11,4 @@ export abstract class CipherFormGenerationService { * Generates a random username. Called when the user clicks the "Generate Username" button in the UI. */ abstract generateUsername(): Promise; - - /** - * Generates an initial password for a new cipher. This should not involve any user interaction as it will - * be used to pre-fill the password field in the UI for new Login ciphers. - */ - abstract generateInitialPassword(): Promise; } diff --git a/libs/vault/src/cipher-form/components/cipher-generator/cipher-form-generator.component.ts b/libs/vault/src/cipher-form/components/cipher-generator/cipher-form-generator.component.ts index d7c8e5e93cb..2d24194d290 100644 --- a/libs/vault/src/cipher-form/components/cipher-generator/cipher-form-generator.component.ts +++ b/libs/vault/src/cipher-form/components/cipher-generator/cipher-form-generator.component.ts @@ -1,5 +1,5 @@ import { CommonModule } from "@angular/common"; -import { Component, DestroyRef, EventEmitter, Input, Output } from "@angular/core"; +import { Component, DestroyRef, EventEmitter, Input, OnChanges, Output } from "@angular/core"; import { takeUntilDestroyed } from "@angular/core/rxjs-interop"; import { firstValueFrom, map, startWith, Subject, Subscription, switchMap, tap } from "rxjs"; @@ -42,7 +42,7 @@ import { TypographyModule, ], }) -export class CipherFormGeneratorComponent { +export class CipherFormGeneratorComponent implements OnChanges { /** * The type of generator form to show. */ diff --git a/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.html b/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.html index db4d8db37e9..0ba2338afa5 100644 --- a/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.html +++ b/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.html @@ -23,6 +23,16 @@ {{ "password" | i18n }} + + + {{ "securePasswordGenerated" | i18n }} + + + {{ "useGeneratorHelpTextPartOne" | i18n }} + + {{ "useGeneratorHelpTextPartTwo" | i18n }} + +