From cdad19d29acab0dd64f68487ce8eae83200f4d89 Mon Sep 17 00:00:00 2001 From: pompurin404 Date: Wed, 31 Jul 2024 08:29:04 +0800 Subject: [PATCH] fix linux icon error --- src/main/index.ts | 4 ++-- src/renderer/src/components/sider/override-card.tsx | 2 +- src/renderer/src/components/sider/sysproxy-switcher.tsx | 2 +- src/renderer/src/components/sider/tun-switcher.tsx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index c38b66c..cf03a7a 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -1,7 +1,7 @@ import { app, shell, BrowserWindow, Tray, Menu } from 'electron' import { join } from 'path' import { electronApp, optimizer, is } from '@electron-toolkit/utils' -import icon from '../../resources/icon.ico?asset' +import icon from '../../resources/icon.png?asset' let window: BrowserWindow | null = null let tray: Tray | null = null @@ -16,7 +16,7 @@ function createWindow(): void { height: 600, show: false, autoHideMenuBar: true, - icon: icon, + ...(process.platform === 'linux' ? { icon } : {}), webPreferences: { preload: join(__dirname, '../preload/index.js'), sandbox: false diff --git a/src/renderer/src/components/sider/override-card.tsx b/src/renderer/src/components/sider/override-card.tsx index 59b9ca6..f4297a5 100644 --- a/src/renderer/src/components/sider/override-card.tsx +++ b/src/renderer/src/components/sider/override-card.tsx @@ -22,7 +22,7 @@ export default function OverrideCard(): JSX.Element { > - + diff --git a/src/renderer/src/components/sider/sysproxy-switcher.tsx b/src/renderer/src/components/sider/sysproxy-switcher.tsx index 31a98da..dbd911f 100644 --- a/src/renderer/src/components/sider/sysproxy-switcher.tsx +++ b/src/renderer/src/components/sider/sysproxy-switcher.tsx @@ -9,7 +9,7 @@ export default function SysproxySwitcher(): JSX.Element { - + diff --git a/src/renderer/src/components/sider/tun-switcher.tsx b/src/renderer/src/components/sider/tun-switcher.tsx index de072f4..9780bca 100644 --- a/src/renderer/src/components/sider/tun-switcher.tsx +++ b/src/renderer/src/components/sider/tun-switcher.tsx @@ -9,7 +9,7 @@ export default function SysproxySwitcher(): JSX.Element { - +