mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 18:23:31 +00:00
Tools - Prefer signal & change detection (#16941)
This commit is contained in:
@@ -64,6 +64,8 @@ const FORWARDER = "forwarder";
|
||||
const NONE_SELECTED = "none";
|
||||
|
||||
/** Component that generates usernames and emails */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||
@Component({
|
||||
selector: "tools-username-generator",
|
||||
templateUrl: "username-generator.component.html",
|
||||
@@ -95,6 +97,8 @@ export class UsernameGeneratorComponent implements OnInit, OnChanges, OnDestroy
|
||||
/** Binds the component to a specific user's settings. When this input is not provided,
|
||||
* the form binds to the active user
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
account: Account | null = null;
|
||||
|
||||
@@ -105,6 +109,8 @@ export class UsernameGeneratorComponent implements OnInit, OnChanges, OnDestroy
|
||||
*
|
||||
* @warning this may reveal sensitive information in plaintext.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
debug: boolean = false;
|
||||
|
||||
@@ -132,18 +138,26 @@ export class UsernameGeneratorComponent implements OnInit, OnChanges, OnDestroy
|
||||
/**
|
||||
* The website associated with the credential generation request.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input()
|
||||
website: string | null = null;
|
||||
|
||||
/** Emits credentials created from a generation request. */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
readonly onGenerated = new EventEmitter<GeneratedCredential>();
|
||||
|
||||
/** emits algorithm info when the selected algorithm changes */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output()
|
||||
readonly onAlgorithm = new EventEmitter<AlgorithmInfo | null>();
|
||||
|
||||
/** Removes bottom margin from internal elements */
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
||||
@Input({ transform: coerceBooleanProperty }) disableMargin = false;
|
||||
|
||||
/** Tracks the selected generation algorithm */
|
||||
|
||||
Reference in New Issue
Block a user