feat(home): two constructors used for domain which come from user config or param in open_with_vscode link
This commit is contained in:
		
							
								
								
									
										25
									
								
								src/home.ts
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								src/home.ts
									
									
									
									
									
								
							@@ -11,12 +11,33 @@ export default class DSHome {
 | 
				
			|||||||
  private devstarHomePageUrl: string;
 | 
					  private devstarHomePageUrl: string;
 | 
				
			||||||
  private devstarDomain: string | undefined
 | 
					  private devstarDomain: string | undefined
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  constructor(context: vscode.ExtensionContext, user: User) {
 | 
					
 | 
				
			||||||
 | 
					  /**
 | 
				
			||||||
 | 
					   * 配置项提供devstarDomain 
 | 
				
			||||||
 | 
					   * @param context 
 | 
				
			||||||
 | 
					   * @param user 
 | 
				
			||||||
 | 
					   */
 | 
				
			||||||
 | 
					  constructor(context: vscode.ExtensionContext, user: User)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /**
 | 
				
			||||||
 | 
					   * open with vscode链接提供devstarDomain
 | 
				
			||||||
 | 
					   * @param context 
 | 
				
			||||||
 | 
					   * @param user 
 | 
				
			||||||
 | 
					   * @param devstarDomain 
 | 
				
			||||||
 | 
					   */
 | 
				
			||||||
 | 
					  constructor(context: vscode.ExtensionContext, user: User, devstarDomain: string)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  constructor(context: vscode.ExtensionContext, user: User, devstarDomain?: string) {
 | 
				
			||||||
    this.context = context;
 | 
					    this.context = context;
 | 
				
			||||||
    this.user = user;
 | 
					    this.user = user;
 | 
				
			||||||
    this.remoteContainer = new RemoteContainer(user);
 | 
					    this.remoteContainer = new RemoteContainer(user);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this.devstarDomain = utils.devstarDomain()
 | 
					    if (devstarDomain != undefined && devstarDomain != "") {
 | 
				
			||||||
 | 
					      this.devstarDomain = devstarDomain
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					      this.devstarDomain = utils.devstarDomain()
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (undefined == this.devstarDomain || "" == this.devstarDomain) {
 | 
					    if (undefined == this.devstarDomain || "" == this.devstarDomain) {
 | 
				
			||||||
      this.devstarHomePageUrl = "https://devstar.cn/devstar-home"
 | 
					      this.devstarHomePageUrl = "https://devstar.cn/devstar-home"
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user