File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -602,4 +602,9 @@ registerContextMenu({
602
602
} ) ;
603
603
604
604
// Enable custom context menus, for special cases where the UI wants to define the options available
605
- ipcMain . handle ( 'open-context-menu' , ( _event : { } , options : ContextMenuDefinition ) => openContextMenu ( options ) ) ;
605
+ ipcMain . handle ( 'open-context-menu' , ( _event : { } , options : ContextMenuDefinition ) =>
606
+ openContextMenu ( options )
607
+ ) ;
608
+
609
+ ipcMain . handle ( 'get-desktop-version' , ( ) => DESKTOP_VERSION ) ;
610
+ ipcMain . handle ( 'get-server-auth-token' , ( ) => AUTH_TOKEN ) ;
Original file line number Diff line number Diff line change @@ -3,9 +3,12 @@ import { contextBridge, ipcRenderer } from 'electron';
3
3
import type { ContextMenuDefinition } from './context-menu' ;
4
4
5
5
contextBridge . exposeInMainWorld ( 'desktopApi' , {
6
-
7
- selectApplication : ( ) => ipcRenderer . invoke ( 'select-application' ) ,
8
-
9
- openContextMenu : ( options : ContextMenuDefinition ) => ipcRenderer . invoke ( 'open-context-menu' , options )
10
-
6
+ desktopVersion : ( ) =>
7
+ ipcRenderer . invoke ( 'get-desktop-version' ) ,
8
+ serverAuthToken : ( ) =>
9
+ ipcRenderer . invoke ( 'get-server-auth-token' ) ,
10
+ selectApplication : ( ) =>
11
+ ipcRenderer . invoke ( 'select-application' ) ,
12
+ openContextMenu : ( options : ContextMenuDefinition ) =>
13
+ ipcRenderer . invoke ( 'open-context-menu' , options )
11
14
} ) ;
You can’t perform that action at this time.
0 commit comments