From e09f37ccd542e504a633dbf98782ca66d348273e Mon Sep 17 00:00:00 2001 From: Andrey Onischenko Date: Tue, 15 Oct 2024 15:18:22 +0300 Subject: [PATCH] Patch fix --- patches/0005-Custom-title-bar.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/patches/0005-Custom-title-bar.patch b/patches/0005-Custom-title-bar.patch index 4a1c296..181f1b5 100644 --- a/patches/0005-Custom-title-bar.patch +++ b/patches/0005-Custom-title-bar.patch @@ -35,15 +35,15 @@ diff --git a/main/lib/createWindow.js b/main/lib/createWindow.js diff --git a/main/lib/preload.js b/main/lib/preload.js --- a/main/lib/preload.js +++ b/main/lib/preload.js -@@ -10,10 +10,12 @@ const getInitialTheme_js_1 = require("./getInitialTheme.js"); - const theme_js_1 = require("../constants/theme.js"); +@@ -7,10 +7,12 @@ const deviceInfo_js_1 = require("./deviceInfo.js"); + const theme_js_1 = require("../types/theme.js"); const hostnamePatterns_js_1 = require("../constants/hostnamePatterns.js"); - const getDeviceInfo_js_1 = require("./getDeviceInfo.js"); + const deviceInfo = (0, deviceInfo_js_1.getDeviceInfo)(); +const customTitleBar = process.env.CUSTOM_TITLE_BAR && process.env.CUSTOM_TITLE_BAR > 0; electron_1.contextBridge.exposeInMainWorld('VERSION', String(config_js_1.config.buildInfo.VERSION)); electron_1.contextBridge.exposeInMainWorld('BRANCH', String(config_js_1.config.buildInfo.BRANCH)); - electron_1.contextBridge.exposeInMainWorld('PLATFORM', node_os_1.default.platform()); - electron_1.contextBridge.exposeInMainWorld('DEVICE_INFO', (0, getDeviceInfo_js_1.getDeviceInfo)()); + electron_1.contextBridge.exposeInMainWorld('PLATFORM', deviceInfo.os); + electron_1.contextBridge.exposeInMainWorld('DEVICE_INFO', deviceInfo); +electron_1.contextBridge.exposeInMainWorld('CUSTOM_TITLE_BAR', customTitleBar); electron_1.contextBridge.exposeInMainWorld('desktopEvents', { send(name, ...args) {