feat: support first connect in remote environment
This commit is contained in:
@@ -43,12 +43,12 @@ export class DevStarExtension {
|
||||
// 如果没有用户登录,则直接登录;
|
||||
const res = await this.user.login(access_token, devstar_username)
|
||||
if (res === 'ok') {
|
||||
await this.remoteContainer.firstOpenProject(container_host, container_port, container_username, project_path)
|
||||
await this.remoteContainer.firstOpenProject(container_host, container_port, container_username, project_path, this.context)
|
||||
}
|
||||
} else if (devstar_username === this.user.getUsernameFromLocal()) {
|
||||
// 如果同用户已经登录,则忽略;
|
||||
// 直接打开项目
|
||||
await this.remoteContainer.firstOpenProject(container_host, container_port, container_username, project_path)
|
||||
await this.remoteContainer.firstOpenProject(container_host, container_port, container_username, project_path, this.context)
|
||||
} else {
|
||||
// 如果不是同用户,可以选择切换用户,或者不切换登录用户,直接打开容器
|
||||
const selection = await vscode.window.showWarningMessage(`已登录用户:${this.user.getUsernameFromLocal()},是否切换用户?`,
|
||||
@@ -57,7 +57,7 @@ export class DevStarExtension {
|
||||
// 如果没有用户登录,则直接登录;
|
||||
const res = await this.user.login(access_token, devstar_username)
|
||||
if (res === 'ok') {
|
||||
await this.remoteContainer.firstOpenProject(container_host, container_port, container_username, project_path)
|
||||
await this.remoteContainer.firstOpenProject(container_host, container_port, container_username, project_path, this.context)
|
||||
}
|
||||
} else if (selection === 'No') {
|
||||
await openProjectWithoutLogging(container_host, container_port, container_username, project_path);
|
||||
|
Reference in New Issue
Block a user