mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-16171] Simplelogin alias generation only generate random words instead the domain name (#13024)
* Exposes URI property from the cipher form. * Updates credential generator to accept the URI using a `website` attribute --------- Co-authored-by: ✨ Audrey ✨ <audrey@audreyality.com>
This commit is contained in:
@@ -71,6 +71,12 @@ export class CredentialGeneratorComponent implements OnInit, OnDestroy {
|
||||
@Input()
|
||||
userId: UserId | null;
|
||||
|
||||
/**
|
||||
* The website associated with the credential generation request.
|
||||
*/
|
||||
@Input()
|
||||
website: string | null = null;
|
||||
|
||||
/** Emits credentials created from a generation request. */
|
||||
@Output()
|
||||
readonly onGenerated = new EventEmitter<GeneratedCredential>();
|
||||
@@ -514,7 +520,7 @@ export class CredentialGeneratorComponent implements OnInit, OnDestroy {
|
||||
* origin in the debugger.
|
||||
*/
|
||||
protected async generate(requestor: string) {
|
||||
this.generate$.next({ source: requestor });
|
||||
this.generate$.next({ source: requestor, website: this.website });
|
||||
}
|
||||
|
||||
private toOptions(algorithms: AlgorithmInfo[]) {
|
||||
|
||||
@@ -77,6 +77,12 @@ export class UsernameGeneratorComponent implements OnInit, OnDestroy {
|
||||
@Input()
|
||||
userId: UserId | null;
|
||||
|
||||
/**
|
||||
* The website associated with the credential generation request.
|
||||
*/
|
||||
@Input()
|
||||
website: string | null = null;
|
||||
|
||||
/** Emits credentials created from a generation request. */
|
||||
@Output()
|
||||
readonly onGenerated = new EventEmitter<GeneratedCredential>();
|
||||
@@ -435,7 +441,7 @@ export class UsernameGeneratorComponent implements OnInit, OnDestroy {
|
||||
* origin in the debugger.
|
||||
*/
|
||||
protected async generate(requestor: string) {
|
||||
this.generate$.next({ source: requestor });
|
||||
this.generate$.next({ source: requestor, website: this.website });
|
||||
}
|
||||
|
||||
private toOptions(algorithms: AlgorithmInfo[]) {
|
||||
|
||||
Reference in New Issue
Block a user