Revert 93797a1d34, use the word "Password" instead.

This commit is contained in:
NI
2019-09-27 23:16:38 +08:00
parent 03fe9267ee
commit 843abc3707

View File

@@ -301,15 +301,15 @@ const initialFieldDef = {
return ""; return "";
} }
}, },
Passphrase: { Password: {
name: "Passphrase", name: "Password",
description: "", description: "",
type: "password", type: "password",
value: "", value: "",
example: "----------", example: "----------",
verify(d) { verify(d) {
if (d.length <= 0) { if (d.length <= 0) {
throw new Error("Passphrase must be specified"); throw new Error("Password must be specified");
} }
if (d.length > MAX_PASSWORD_LEN) { if (d.length > MAX_PASSWORD_LEN) {
@@ -318,7 +318,7 @@ const initialFieldDef = {
); );
} }
return "We'll login with this passphrase"; return "We'll login with this password";
} }
}, },
"Private Key": { "Private Key": {
@@ -391,10 +391,10 @@ const initialFieldDef = {
"cause the login to fail", "cause the login to fail",
type: "radio", type: "radio",
value: "", value: "",
example: "Passphrase,Private Key,None", example: "Password,Private Key,None",
verify(d) { verify(d) {
switch (d) { switch (d) {
case "Passphrase": case "Password":
case "Private Key": case "Private Key":
case "None": case "None":
return ""; return "";
@@ -434,8 +434,7 @@ function getAuthMethodFromStr(d) {
case "None": case "None":
return AUTHMETHOD_NONE; return AUTHMETHOD_NONE;
case "Passphrase": case "Password":
case "Password": // TODO: Remove this after depreciation period.
return AUTHMETHOD_PASSPHRASE; return AUTHMETHOD_PASSPHRASE;
case "Private Key": case "Private Key":
@@ -761,7 +760,7 @@ class Wizard {
switch (config.auth) { switch (config.auth) {
case AUTHMETHOD_PASSPHRASE: case AUTHMETHOD_PASSPHRASE:
fields = [{ name: "Passphrase" }]; fields = [{ name: "Password" }];
break; break;
case AUTHMETHOD_PRIVATE_KEY: case AUTHMETHOD_PRIVATE_KEY: