1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-22 16:29:09 +01:00

Move username fieldnames to Identity constants

This commit is contained in:
Daniel James Smith 2022-01-02 14:56:01 +01:00
parent aeeb44e8c9
commit 0a1b0f5eb9
No known key found for this signature in database
GPG Key ID: 03E4BD365FF06726
2 changed files with 3 additions and 1 deletions

View File

@ -663,7 +663,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillFields.phone = f;
break;
} else if (!fillFields.username && this.isFieldMatch(f[attr],
['user-name', 'user-id', 'screen-name'])) {
IdentityAutoFillConstants.UserNameFieldNames)) {
fillFields.username = f;
break;
} else if (!fillFields.company && this.isFieldMatch(f[attr],

View File

@ -297,6 +297,8 @@ export class IdentityAutoFillConstants {
"phone-number",
];
static readonly UserNameFieldNames: string[] = ["user-name", "user-id", "screen-name"];
static readonly IsoCountries: { [id: string]: string } = {
afghanistan: "AF",
"aland islands": "AX",