1- import * as commands from ' @/commands' ;
1+ import * as commands from " @/commands" ;
22
33// Window operations
44export const windowWrapper = {
55 async getCurrentWindow ( ) {
66 const { getCurrentWindow } = await import ( "@tauri-apps/api/window" ) ;
77 return getCurrentWindow ( ) ;
88 } ,
9-
9+
1010 async getWebviewWindow ( ) {
11- const { getCurrentWebviewWindow } = await import ( "@tauri-apps/api/webviewWindow" ) ;
11+ const { getCurrentWebviewWindow } = await import (
12+ "@tauri-apps/api/webviewWindow"
13+ ) ;
1214 return getCurrentWebviewWindow ( ) ;
1315 } ,
14-
16+
1517 async setSize ( width : number , height : number ) {
1618 const { LogicalSize } = await import ( "@tauri-apps/api/dpi" ) ;
1719 const window = await this . getWebviewWindow ( ) ;
@@ -27,7 +29,7 @@ export const eventWrapper = {
2729 const { emit } = await import ( "@tauri-apps/api/event" ) ;
2830 return emit ( event , payload ) ;
2931 } ,
30-
32+
3133 async listen ( event : string , callback : Function ) {
3234 const { listen } = await import ( "@tauri-apps/api/event" ) ;
3335 return listen ( event , ( e ) => callback ( e ) ) ;
@@ -37,16 +39,22 @@ export const eventWrapper = {
3739// System functions
3840export const systemWrapper = {
3941 async checkScreenPermission ( ) {
40- const { checkScreenRecordingPermission } = await import ( "tauri-plugin-macos-permissions-api" ) ;
42+ const { checkScreenRecordingPermission } = await import (
43+ "tauri-plugin-macos-permissions-api"
44+ ) ;
4145 return checkScreenRecordingPermission ( ) ;
4246 } ,
43-
44- async captureScreen ( id : number , type : 'monitor' | 'window' ) {
45- if ( type === 'monitor' ) {
46- const { getMonitorScreenshot } = await import ( "tauri-plugin-screenshots-api" ) ;
47+
48+ async captureScreen ( id : number , type : "monitor" | "window" ) {
49+ if ( type === "monitor" ) {
50+ const { getMonitorScreenshot } = await import (
51+ "tauri-plugin-screenshots-api"
52+ ) ;
4753 return getMonitorScreenshot ( id ) ;
4854 } else {
49- const { getWindowScreenshot } = await import ( "tauri-plugin-screenshots-api" ) ;
55+ const { getWindowScreenshot } = await import (
56+ "tauri-plugin-screenshots-api"
57+ ) ;
5058 return getWindowScreenshot ( id ) ;
5159 }
5260 } ,
@@ -60,5 +68,5 @@ export const commandWrapper = {
6068 return ( commands as any ) [ commandName ] ( ...args ) ;
6169 }
6270 throw new Error ( `Command ${ commandName } not found` ) ;
63- }
64- } ;
71+ } ,
72+ } ;
0 commit comments