Files
ignis/shims/electron/remote/index.js

51 lines
1.3 KiB
JavaScript
Raw Normal View History

2026-03-10 20:49:10 +01:00
import { clipboardShim } from "./clipboard.js";
import { shellShim } from "./shell.js";
import { dialogShim } from "./dialog.js";
import { menuShim, menuItemShim } from "./menu.js";
import { appShim } from "./app.js";
import { windowShim, webContentsShim } from "./window.js";
import { themeShim } from "./theme.js";
import { sessionShim } from "./session.js";
import { systemPreferencesShim } from "./system-preferences.js";
import { screenShim } from "./screen.js";
import { nativeImageShim } from "./native-image.js";
import { notificationShim } from "./notification.js";
2026-03-07 14:38:51 +01:00
export const remoteShim = {
clipboard: clipboardShim,
shell: shellShim,
dialog: dialogShim,
Menu: menuShim,
MenuItem: menuItemShim,
app: appShim,
BrowserWindow: windowShim,
nativeTheme: themeShim,
session: sessionShim,
systemPreferences: systemPreferencesShim,
screen: screenShim,
nativeImage: nativeImageShim,
Notification: notificationShim,
2026-03-17 12:38:30 +01:00
2026-03-12 22:46:53 +01:00
safeStorage: {
isEncryptionAvailable() {
return false;
},
encryptString(plainText) {
return Buffer.from(plainText);
},
decryptString(encrypted) {
return encrypted.toString();
},
},
2026-03-07 14:38:51 +01:00
getCurrentWindow() {
return windowShim._current();
},
2026-03-10 20:49:10 +01:00
webContents: webContentsShim,
2026-03-07 14:38:51 +01:00
getCurrentWebContents() {
return webContentsShim._current();
},
};