feat(app): implement basic function
General - 配置界面支持配置对象存储桶 - 快捷键进入截图 - 一键上传截图 & 复制截图链接 MacOS - 状态栏指示器和应用图标
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
import {main} from '../models';
|
||||
import {domain} from '../models';
|
||||
|
||||
export function CancelNativeRegion():Promise<void>;
|
||||
|
||||
export function CancelRegion():Promise<void>;
|
||||
|
||||
export function CaptureNow():Promise<void>;
|
||||
|
||||
export function ConfirmNativeRegion(arg1:main.RegionRect):Promise<void>;
|
||||
|
||||
export function ConfirmRegion(arg1:main.RegionRect):Promise<void>;
|
||||
|
||||
export function GetConfig():Promise<domain.AppConfig>;
|
||||
|
||||
export function QuitApp():Promise<void>;
|
||||
|
||||
export function RetryRegisterHotkey():Promise<void>;
|
||||
|
||||
export function SaveConfig(arg1:domain.AppConfig):Promise<void>;
|
||||
|
||||
export function ShowWindow():Promise<void>;
|
||||
|
||||
export function TestConnection(arg1:domain.S3Config):Promise<void>;
|
||||
Executable
+47
@@ -0,0 +1,47 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
export function CancelNativeRegion() {
|
||||
return window['go']['main']['App']['CancelNativeRegion']();
|
||||
}
|
||||
|
||||
export function CancelRegion() {
|
||||
return window['go']['main']['App']['CancelRegion']();
|
||||
}
|
||||
|
||||
export function CaptureNow() {
|
||||
return window['go']['main']['App']['CaptureNow']();
|
||||
}
|
||||
|
||||
export function ConfirmNativeRegion(arg1) {
|
||||
return window['go']['main']['App']['ConfirmNativeRegion'](arg1);
|
||||
}
|
||||
|
||||
export function ConfirmRegion(arg1) {
|
||||
return window['go']['main']['App']['ConfirmRegion'](arg1);
|
||||
}
|
||||
|
||||
export function GetConfig() {
|
||||
return window['go']['main']['App']['GetConfig']();
|
||||
}
|
||||
|
||||
export function QuitApp() {
|
||||
return window['go']['main']['App']['QuitApp']();
|
||||
}
|
||||
|
||||
export function RetryRegisterHotkey() {
|
||||
return window['go']['main']['App']['RetryRegisterHotkey']();
|
||||
}
|
||||
|
||||
export function SaveConfig(arg1) {
|
||||
return window['go']['main']['App']['SaveConfig'](arg1);
|
||||
}
|
||||
|
||||
export function ShowWindow() {
|
||||
return window['go']['main']['App']['ShowWindow']();
|
||||
}
|
||||
|
||||
export function TestConnection(arg1) {
|
||||
return window['go']['main']['App']['TestConnection'](arg1);
|
||||
}
|
||||
Executable
+86
@@ -0,0 +1,86 @@
|
||||
export namespace domain {
|
||||
|
||||
export class S3Config {
|
||||
endpoint: string;
|
||||
region: string;
|
||||
bucket: string;
|
||||
accessKeyId: string;
|
||||
secretAccessKey: string;
|
||||
pathPrefix: string;
|
||||
publicUrlBase: string;
|
||||
usePathStyle: boolean;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new S3Config(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.endpoint = source["endpoint"];
|
||||
this.region = source["region"];
|
||||
this.bucket = source["bucket"];
|
||||
this.accessKeyId = source["accessKeyId"];
|
||||
this.secretAccessKey = source["secretAccessKey"];
|
||||
this.pathPrefix = source["pathPrefix"];
|
||||
this.publicUrlBase = source["publicUrlBase"];
|
||||
this.usePathStyle = source["usePathStyle"];
|
||||
}
|
||||
}
|
||||
export class AppConfig {
|
||||
hotkey: string;
|
||||
s3: S3Config;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new AppConfig(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.hotkey = source["hotkey"];
|
||||
this.s3 = this.convertValues(source["s3"], S3Config);
|
||||
}
|
||||
|
||||
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
||||
if (!a) {
|
||||
return a;
|
||||
}
|
||||
if (a.slice && a.map) {
|
||||
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
||||
} else if ("object" === typeof a) {
|
||||
if (asMap) {
|
||||
for (const key of Object.keys(a)) {
|
||||
a[key] = new classs(a[key]);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
return new classs(a);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export namespace main {
|
||||
|
||||
export class RegionRect {
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new RegionRect(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.x = source["x"];
|
||||
this.y = source["y"];
|
||||
this.w = source["w"];
|
||||
this.h = source["h"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user