mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-22 19:15:08 +03:00
13 lines
501 B
TypeScript
13 lines
501 B
TypeScript
import { contextBridge, ipcRenderer } from "electron";
|
|
import type { ElectronInterface, Platform } from "../electron";
|
|
|
|
const electronInterface: ElectronInterface = {
|
|
desktop: true,
|
|
platform: process.platform as Platform,
|
|
notifications: {
|
|
requestPermission: () => ipcRenderer.invoke('request-notification-permission'),
|
|
show: (options: any) => ipcRenderer.invoke('show-notification', options)
|
|
}
|
|
}
|
|
|
|
contextBridge.exposeInMainWorld("electronInterface", electronInterface); |