Обновлены Wails биндинги: MoveWorkspace, GetFolderMetadata, SetFolderMetadata
This commit is contained in:
parent
3bf67fb1e9
commit
29c55c50b2
|
|
@ -46,6 +46,8 @@ export function GetCurrentWorkspace():Promise<Record<string, any>>;
|
|||
|
||||
export function GetCurrentWorkspaceNode():Promise<Record<string, any>>;
|
||||
|
||||
export function GetFolderMetadata(arg1:string):Promise<workspace.FolderMetadata|string>;
|
||||
|
||||
export function GetPermissions():Promise<Array<permissions.Entry>>;
|
||||
|
||||
export function GetPluginAssetContent(arg1:string,arg2:string):Promise<string|string>;
|
||||
|
|
@ -86,6 +88,8 @@ export function ListWorkspaces():Promise<Array<workspace.Workspace>|string>;
|
|||
|
||||
export function MoveVaultPath(arg1:string,arg2:string,arg3:string,arg4:files.MoveOptions):Promise<string>;
|
||||
|
||||
export function MoveWorkspace(arg1:string,arg2:string):Promise<string>;
|
||||
|
||||
export function MoveWorkspaceNode(arg1:string,arg2:string):Promise<string>;
|
||||
|
||||
export function OpenExternalURL(arg1:string,arg2:string):Promise<string>;
|
||||
|
|
@ -172,8 +176,12 @@ export function SetCurrentWorkspace(arg1:string):Promise<string>;
|
|||
|
||||
export function SetCurrentWorkspaceNode(arg1:string):Promise<string>;
|
||||
|
||||
export function SetFolderMetadata(arg1:string,arg2:workspace.FolderMetadata):Promise<string>;
|
||||
|
||||
export function SetNotificationService(arg1:api.notificationService):Promise<void>;
|
||||
|
||||
export function SetTrayReady(arg1:boolean):Promise<void>;
|
||||
|
||||
export function ShowVaultPathInFolder(arg1:string,arg2:string):Promise<string>;
|
||||
|
||||
export function ShowWindow():Promise<void>;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,10 @@ export function GetCurrentWorkspaceNode() {
|
|||
return window['go']['api']['App']['GetCurrentWorkspaceNode']();
|
||||
}
|
||||
|
||||
export function GetFolderMetadata(arg1) {
|
||||
return window['go']['api']['App']['GetFolderMetadata'](arg1);
|
||||
}
|
||||
|
||||
export function GetPermissions() {
|
||||
return window['go']['api']['App']['GetPermissions']();
|
||||
}
|
||||
|
|
@ -154,6 +158,10 @@ export function MoveVaultPath(arg1, arg2, arg3, arg4) {
|
|||
return window['go']['api']['App']['MoveVaultPath'](arg1, arg2, arg3, arg4);
|
||||
}
|
||||
|
||||
export function MoveWorkspace(arg1, arg2) {
|
||||
return window['go']['api']['App']['MoveWorkspace'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function MoveWorkspaceNode(arg1, arg2) {
|
||||
return window['go']['api']['App']['MoveWorkspaceNode'](arg1, arg2);
|
||||
}
|
||||
|
|
@ -326,10 +334,18 @@ export function SetCurrentWorkspaceNode(arg1) {
|
|||
return window['go']['api']['App']['SetCurrentWorkspaceNode'](arg1);
|
||||
}
|
||||
|
||||
export function SetFolderMetadata(arg1, arg2) {
|
||||
return window['go']['api']['App']['SetFolderMetadata'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function SetNotificationService(arg1) {
|
||||
return window['go']['api']['App']['SetNotificationService'](arg1);
|
||||
}
|
||||
|
||||
export function SetTrayReady(arg1) {
|
||||
return window['go']['api']['App']['SetTrayReady'](arg1);
|
||||
}
|
||||
|
||||
export function ShowVaultPathInFolder(arg1, arg2) {
|
||||
return window['go']['api']['App']['ShowVaultPathInFolder'](arg1, arg2);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,19 @@
|
|||
export namespace api {
|
||||
|
||||
export class FlatWorkspaceTree {
|
||||
pluginId: string;
|
||||
component: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new FlatWorkspaceTree(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.pluginId = source["pluginId"];
|
||||
this.component = source["component"];
|
||||
}
|
||||
}
|
||||
export class FlatContextMenuEntry {
|
||||
pluginId: string;
|
||||
id: string;
|
||||
|
|
@ -258,6 +272,7 @@ export namespace api {
|
|||
fileActions: FlatAction[];
|
||||
noteActions: FlatAction[];
|
||||
contextMenuEntries: FlatContextMenuEntry[];
|
||||
workspaceTree?: FlatWorkspaceTree;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new ContributionSummary(source);
|
||||
|
|
@ -276,6 +291,7 @@ export namespace api {
|
|||
this.fileActions = this.convertValues(source["fileActions"], FlatAction);
|
||||
this.noteActions = this.convertValues(source["noteActions"], FlatAction);
|
||||
this.contextMenuEntries = this.convertValues(source["contextMenuEntries"], FlatContextMenuEntry);
|
||||
this.workspaceTree = this.convertValues(source["workspaceTree"], FlatWorkspaceTree);
|
||||
}
|
||||
|
||||
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
||||
|
|
@ -307,6 +323,7 @@ export namespace api {
|
|||
|
||||
|
||||
|
||||
|
||||
export class SyncStatusDTO {
|
||||
configured: boolean;
|
||||
serverUrl: string;
|
||||
|
|
@ -880,6 +897,18 @@ export namespace plugin {
|
|||
this.component = source["component"];
|
||||
}
|
||||
}
|
||||
export class ContributionWorkspaceTree {
|
||||
component: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new ContributionWorkspaceTree(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.component = source["component"];
|
||||
}
|
||||
}
|
||||
export class Contributions {
|
||||
views?: ContributionView[];
|
||||
commands?: ContributionCommand[];
|
||||
|
|
@ -893,6 +922,7 @@ export namespace plugin {
|
|||
statusBarItems?: ContributionStatusBarItem[];
|
||||
openProviders?: ContributionOpenProvider[];
|
||||
workspaceItems?: ContributionWorkspaceItem[];
|
||||
workspaceTree?: ContributionWorkspaceTree;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new Contributions(source);
|
||||
|
|
@ -912,6 +942,7 @@ export namespace plugin {
|
|||
this.statusBarItems = this.convertValues(source["statusBarItems"], ContributionStatusBarItem);
|
||||
this.openProviders = this.convertValues(source["openProviders"], ContributionOpenProvider);
|
||||
this.workspaceItems = this.convertValues(source["workspaceItems"], ContributionWorkspaceItem);
|
||||
this.workspaceTree = this.convertValues(source["workspaceTree"], ContributionWorkspaceTree);
|
||||
}
|
||||
|
||||
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
||||
|
|
@ -1257,6 +1288,24 @@ export namespace workbench {
|
|||
|
||||
export namespace workspace {
|
||||
|
||||
export class FolderMetadata {
|
||||
icon?: string;
|
||||
color?: string;
|
||||
order?: number;
|
||||
updatedAt?: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new FolderMetadata(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.icon = source["icon"];
|
||||
this.color = source["color"];
|
||||
this.order = source["order"];
|
||||
this.updatedAt = source["updatedAt"];
|
||||
}
|
||||
}
|
||||
export class TemplateSnapshot {
|
||||
templateId: string;
|
||||
templateName: string;
|
||||
|
|
@ -1280,6 +1329,7 @@ export namespace workspace {
|
|||
export class Metadata {
|
||||
workspaceId?: string;
|
||||
workspaceName: string;
|
||||
workspacePath?: string;
|
||||
createdFromTemplate?: TemplateSnapshot;
|
||||
features?: Record<string, boolean>;
|
||||
folders?: Record<string, string>;
|
||||
|
|
@ -1294,6 +1344,7 @@ export namespace workspace {
|
|||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.workspaceId = source["workspaceId"];
|
||||
this.workspaceName = source["workspaceName"];
|
||||
this.workspacePath = source["workspacePath"];
|
||||
this.createdFromTemplate = this.convertValues(source["createdFromTemplate"], TemplateSnapshot);
|
||||
this.features = source["features"];
|
||||
this.folders = source["folders"];
|
||||
|
|
@ -1357,6 +1408,7 @@ export namespace workspace {
|
|||
export class Workspace {
|
||||
id: string;
|
||||
name: string;
|
||||
path: string;
|
||||
rootPath: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
|
|
@ -1367,6 +1419,7 @@ export namespace workspace {
|
|||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.id = source["id"];
|
||||
this.name = source["name"];
|
||||
this.path = source["path"];
|
||||
this.rootPath = source["rootPath"];
|
||||
}
|
||||
}
|
||||
|
|
@ -1408,3 +1461,4 @@ export namespace workspace {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue