|
@ -40,6 +40,7 @@ export abstract class RemoteProvider { |
|
|
public readonly domain: string, |
|
|
public readonly domain: string, |
|
|
public readonly path: string, |
|
|
public readonly path: string, |
|
|
name?: string, |
|
|
name?: string, |
|
|
|
|
|
public readonly protocol: string = 'https' |
|
|
public readonly custom: boolean = false |
|
|
public readonly custom: boolean = false |
|
|
) { |
|
|
) { |
|
|
this._name = name; |
|
|
this._name = name; |
|
@ -48,7 +49,7 @@ export abstract class RemoteProvider { |
|
|
abstract get name(): string; |
|
|
abstract get name(): string; |
|
|
|
|
|
|
|
|
protected get baseUrl() { |
|
|
protected get baseUrl() { |
|
|
return `https://${this.domain}/${this.path}`; |
|
|
|
|
|
|
|
|
return `${this.protocol}://${this.domain}/${this.path}`; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected formatName(name: string) { |
|
|
protected formatName(name: string) { |
|
@ -105,4 +106,4 @@ export abstract class RemoteProvider { |
|
|
openFile(fileName: string, branch?: string, sha?: string, range?: Range) { |
|
|
openFile(fileName: string, branch?: string, sha?: string, range?: Range) { |
|
|
return this.openUrl(this.getUrlForFile(fileName, branch, sha, range)); |
|
|
return this.openUrl(this.getUrlForFile(fileName, branch, sha, range)); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |