mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
feat(client): add octobase-node to electron (#1672)
Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @module preload
|
||||
*/
|
||||
|
||||
import { contextBridge } from 'electron';
|
||||
import { contextBridge, ipcRenderer } from 'electron';
|
||||
|
||||
import { sha256sum } from './sha256sum';
|
||||
|
||||
@@ -31,3 +31,11 @@ contextBridge.exposeInMainWorld('yerba', { version: 0.1 });
|
||||
* window.nodeCrypto('data')
|
||||
*/
|
||||
contextBridge.exposeInMainWorld('nodeCrypto', { sha256sum });
|
||||
|
||||
contextBridge.exposeInMainWorld('apis', {
|
||||
workspaceSync: (id: string) => ipcRenderer.invoke('workspaceSync', id),
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld('appInfo', {
|
||||
electron: 1,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user