Skip to content

Commit b8f7088

Browse files
committed
Turned Port field into a "number" input
Signed-off-by: Seb Julliand <[email protected]>
1 parent 4f47288 commit b8f7088

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/webviews/login/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class Login {
2727
const connectionTab = new Section()
2828
.addInput(`name`, `Connection Name`, undefined, { minlength: 1 })
2929
.addInput(`host`, l10n.t(`Host or IP Address`), undefined, { minlength: 1 })
30-
.addInput(`port`, l10n.t(`Port (SSH)`), ``, { default: `22`, minlength: 1, maxlength: 5, regexTest: `^\\d+$` })
30+
.addInput(`port`, l10n.t(`Port (SSH)`), ``, { default: `22`, min: 1, max: 65535, inputType: "number" })
3131
.addInput(`username`, l10n.t(`Username`), undefined, { minlength: 1, maxlength: 10 })
3232
.addHorizontalRule()
3333
.addParagraph(l10n.t(`Only provide either the password or a private key - not both.`))

src/webviews/settings/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ export class SettingsUI {
360360
const privateKeyWarning = !privateKeyPath || existsSync(privateKeyPath) ? "" : "<b>⚠️ This private key doesn't exist on this system! ⚠️</b></br></br>";
361361
const ui = new CustomUI()
362362
.addInput(`host`, vscode.l10n.t(`Host or IP Address`), undefined, { default: stored.host, minlength: 1 })
363-
.addInput(`port`, vscode.l10n.t(`Port (SSH)`), undefined, { default: String(stored.port), minlength: 1, maxlength: 5, regexTest: `^\\d+$` })
363+
.addInput(`port`, vscode.l10n.t(`Port (SSH)`), undefined, { default: String(stored.port), min: 1, max: 65535, inputType: "number" })
364364
.addInput(`username`, vscode.l10n.t(`Username`), undefined, { default: stored.username, minlength: 1 })
365365
.addHorizontalRule()
366366
.addParagraph(vscode.l10n.t(`Only provide either the password or a private key - not both.`))

0 commit comments

Comments
 (0)