Skip to content

Commit

Permalink
Merge pull request #175 from yannip1234/master
Browse files Browse the repository at this point in the history
add pathPrefix prompt when adding new server
  • Loading branch information
gjsjohnmurray authored Mar 20, 2023
2 parents 206ad87 + 3889797 commit 4e63880
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/api/addServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,21 @@ export async function addServer(
});
if (portString) {
spec.webServer.port = +portString;
const prefix = await vscode.window.showInputBox({
ignoreFocusOut: true,
placeHolder:
"Optional path prefix of instance",
});
if (typeof prefix !== "undefined") {
if (prefix) {
var pathPrefix = prefix.trim();
if (pathPrefix.charAt(0) !== "/") {
pathPrefix = "/" + pathPrefix;
}
spec.webServer.pathPrefix = pathPrefix;
}
}

const username = await vscode.window.showInputBox({
ignoreFocusOut: true,
placeHolder:
Expand Down

0 comments on commit 4e63880

Please sign in to comment.