diff --git a/js/assets/flowy.ico b/js/assets/flowy.ico new file mode 100644 index 0000000..f097dba Binary files /dev/null and b/js/assets/flowy.ico differ diff --git a/js/forge.config.ts b/js/forge.config.ts index 2b90693..ba80079 100644 --- a/js/forge.config.ts +++ b/js/forge.config.ts @@ -10,6 +10,7 @@ import { FuseV1Options, FuseVersion } from '@electron/fuses'; const config: ForgeConfig = { packagerConfig: { asar: true, + icon: './assets/flowy', }, rebuildConfig: {}, makers: [ diff --git a/js/src/main.ts b/js/src/main.ts index aa99405..f33768d 100644 --- a/js/src/main.ts +++ b/js/src/main.ts @@ -7,6 +7,11 @@ if (started) { app.quit(); } +// Set the dock icon for development mode on macOS. +if (process.platform === 'darwin' && !app.isPackaged) { + app.dock.setIcon(path.join(__dirname, '../../assets/icon.png')); +} + const createWindow = () => { // Create the browser window. const mainWindow = new BrowserWindow({