Skip to content

Commit 4e63880

Browse files
Merge pull request #175 from yannip1234/master
add pathPrefix prompt when adding new server
2 parents 206ad87 + 3889797 commit 4e63880

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/api/addServer.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,21 @@ export async function addServer(
5959
});
6060
if (portString) {
6161
spec.webServer.port = +portString;
62+
const prefix = await vscode.window.showInputBox({
63+
ignoreFocusOut: true,
64+
placeHolder:
65+
"Optional path prefix of instance",
66+
});
67+
if (typeof prefix !== "undefined") {
68+
if (prefix) {
69+
var pathPrefix = prefix.trim();
70+
if (pathPrefix.charAt(0) !== "/") {
71+
pathPrefix = "/" + pathPrefix;
72+
}
73+
spec.webServer.pathPrefix = pathPrefix;
74+
}
75+
}
76+
6277
const username = await vscode.window.showInputBox({
6378
ignoreFocusOut: true,
6479
placeHolder:

0 commit comments

Comments
 (0)