mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
fix(electron): add icon for AppImage build (#6257)
1. the icon is fixed in `/Applications`: 128b8c22f9 (diff-a694a3e854f53b066e34ec310e05bd18b4944c016455f6963f54a351784d5fa6L91)
2. the App's icon MUST be 64x64 png and set via `setIcon`

This commit is contained in:
@@ -5,6 +5,7 @@ import { BrowserWindow, type CookiesSetDetails, nativeTheme } from 'electron';
|
||||
import electronWindowState from 'electron-window-state';
|
||||
|
||||
import { isLinux, isMacOS, isWindows } from '../shared/utils';
|
||||
import { buildType } from './config';
|
||||
import { mainWindowOrigin } from './constants';
|
||||
import { ensureHelperProcess } from './helper-process';
|
||||
import { logger } from './logger';
|
||||
@@ -76,6 +77,12 @@ async function createWindow(additionalArguments: string[]) {
|
||||
},
|
||||
});
|
||||
|
||||
if (isLinux()) {
|
||||
browserWindow.setIcon(
|
||||
join(__dirname, `../resources/icons/icon_${buildType}_64x64.png`)
|
||||
);
|
||||
}
|
||||
|
||||
nativeTheme.themeSource = 'light';
|
||||
|
||||
mainWindowState.manage(browserWindow);
|
||||
|
||||
Reference in New Issue
Block a user