(username, password, hostname, alias, port, security, mode)
| 88 | } |
| 89 | |
| 90 | function prompt(username, password, hostname, alias, port, security, mode) { |
| 91 | port = port || 21; |
| 92 | security = security || "ftp"; |
| 93 | mode = mode || "passive"; |
| 94 | return multiPrompt(strings["add ftp"], [ |
| 95 | { |
| 96 | id: "alias", |
| 97 | placeholder: strings.name, |
| 98 | type: "text", |
| 99 | value: alias ? alias : "", |
| 100 | required: true, |
| 101 | }, |
| 102 | { |
| 103 | id: "username", |
| 104 | placeholder: `${strings.username} (${strings.optional})`, |
| 105 | type: "text", |
| 106 | value: username, |
| 107 | }, |
| 108 | { |
| 109 | id: "hostname", |
| 110 | placeholder: strings.hostname, |
| 111 | type: "text", |
| 112 | required: true, |
| 113 | value: hostname, |
| 114 | }, |
| 115 | { |
| 116 | id: "password", |
| 117 | placeholder: `${strings.password} (${strings.optional})`, |
| 118 | type: "password", |
| 119 | value: password, |
| 120 | }, |
| 121 | [ |
| 122 | `${strings["security type"]}: `, |
| 123 | { |
| 124 | id: "ftp", |
| 125 | placeholder: "FTP", |
| 126 | name: "type", |
| 127 | type: "radio", |
| 128 | value: security === "ftp" ? true : false, |
| 129 | }, |
| 130 | { |
| 131 | id: "ftps", |
| 132 | placeholder: "FTPS", |
| 133 | name: "type", |
| 134 | type: "radio", |
| 135 | value: security === "ftps" ? true : false, |
| 136 | }, |
| 137 | ], |
| 138 | [ |
| 139 | `${strings["connection mode"]}: `, |
| 140 | { |
| 141 | id: "active", |
| 142 | placeholder: "Active", |
| 143 | name: "mode", |
| 144 | type: "radio", |
| 145 | value: mode === "active" ? true : false, |
| 146 | }, |
| 147 | { |
no test coverage detected