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