feat: save short cut image to remote by ssh
- add settings for ssh config - implement save remote function by ssh
This commit is contained in:
Vendored
+6
@@ -29,8 +29,14 @@ export function SaveNativeRegionImage(arg1:main.CaptureResult):Promise<main.Capt
|
||||
|
||||
export function SaveNativeRegionImageToDir(arg1:main.CaptureResult,arg2:string):Promise<main.CaptureActionResult>;
|
||||
|
||||
export function SaveNativeRegionToRemote(arg1:main.CaptureResult):Promise<void>;
|
||||
|
||||
export function SaveRegionImage(arg1:main.CaptureResult):Promise<main.CaptureActionResult>;
|
||||
|
||||
export function SaveRegionToRemote(arg1:main.CaptureResult):Promise<void>;
|
||||
|
||||
export function ShowWindow():Promise<void>;
|
||||
|
||||
export function TestConnection(arg1:domain.S3Config):Promise<void>;
|
||||
|
||||
export function TestSSHConnection(arg1:domain.SSHConfig):Promise<void>;
|
||||
|
||||
@@ -54,10 +54,18 @@ export function SaveNativeRegionImageToDir(arg1, arg2) {
|
||||
return window['go']['main']['App']['SaveNativeRegionImageToDir'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function SaveNativeRegionToRemote(arg1) {
|
||||
return window['go']['main']['App']['SaveNativeRegionToRemote'](arg1);
|
||||
}
|
||||
|
||||
export function SaveRegionImage(arg1) {
|
||||
return window['go']['main']['App']['SaveRegionImage'](arg1);
|
||||
}
|
||||
|
||||
export function SaveRegionToRemote(arg1) {
|
||||
return window['go']['main']['App']['SaveRegionToRemote'](arg1);
|
||||
}
|
||||
|
||||
export function ShowWindow() {
|
||||
return window['go']['main']['App']['ShowWindow']();
|
||||
}
|
||||
@@ -65,3 +73,7 @@ export function ShowWindow() {
|
||||
export function TestConnection(arg1) {
|
||||
return window['go']['main']['App']['TestConnection'](arg1);
|
||||
}
|
||||
|
||||
export function TestSSHConnection(arg1) {
|
||||
return window['go']['main']['App']['TestSSHConnection'](arg1);
|
||||
}
|
||||
|
||||
@@ -53,6 +53,32 @@ export namespace application {
|
||||
|
||||
export namespace domain {
|
||||
|
||||
export class SSHConfig {
|
||||
host: string;
|
||||
port: number;
|
||||
user: string;
|
||||
password: string;
|
||||
pathPrefix: string;
|
||||
strictHostKey: boolean;
|
||||
knownHostsPath: string;
|
||||
connectTimeoutSecs: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new SSHConfig(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.host = source["host"];
|
||||
this.port = source["port"];
|
||||
this.user = source["user"];
|
||||
this.password = source["password"];
|
||||
this.pathPrefix = source["pathPrefix"];
|
||||
this.strictHostKey = source["strictHostKey"];
|
||||
this.knownHostsPath = source["knownHostsPath"];
|
||||
this.connectTimeoutSecs = source["connectTimeoutSecs"];
|
||||
}
|
||||
}
|
||||
export class S3Config {
|
||||
endpoint: string;
|
||||
region: string;
|
||||
@@ -82,6 +108,7 @@ export namespace domain {
|
||||
export class AppConfig {
|
||||
hotkey: string;
|
||||
s3: S3Config;
|
||||
ssh: SSHConfig;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new AppConfig(source);
|
||||
@@ -91,6 +118,7 @@ export namespace domain {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.hotkey = source["hotkey"];
|
||||
this.s3 = this.convertValues(source["s3"], S3Config);
|
||||
this.ssh = this.convertValues(source["ssh"], SSHConfig);
|
||||
}
|
||||
|
||||
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
||||
@@ -111,6 +139,7 @@ export namespace domain {
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user