diff --git a/apps/browser/src/_locales/en/messages.json b/apps/browser/src/_locales/en/messages.json index 49d7ae0f3a..69600b5da7 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 b9e8641431..7099348204 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 be48d1b301..5f35c1c3e5 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 6ddd447344..beb295103f 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 d7c8e5e93c..2d24194d29 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 db4d8db37e..0ba2338afa 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 }} + +