From 819fbf89b7b5617fd2bcc2c9f1cf1d4cdf4d6405 Mon Sep 17 00:00:00 2001 From: Timeo Williams Date: Sat, 2 Nov 2024 13:54:03 -0400 Subject: [PATCH 1/2] feat: add support for getting URLs of active firefox window --- README.md | 6 ++ package-lock.json | 154 +++++++++++++++++++++++++++++++++------ src/main.ts | 4 +- src/productivityUtils.ts | 11 ++- src/renderer/src/App.tsx | 8 +- src/worker.ts | 2 +- 6 files changed, 156 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 542b8bd..cafe1bb 100755 --- a/README.md +++ b/README.md @@ -135,3 +135,9 @@ This will whitelist the app for future use. ``` + +4. For Firefox users, there's addditional setup to get the URL of the active tab. + +First enable Firefox support for VoiceOver by going to about:config and setting the accessibility.force_disabled property to -1 + +Source: https://apple.stackexchange.com/questions/404841/get-url-of-opened-firefox-tabs-from-terminal \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 492fa6c..dd2ce1e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1315,6 +1315,28 @@ "node": ">= 6" } }, + "node_modules/@electron/asar/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@electron/fuses": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/@electron/fuses/-/fuses-1.8.0.tgz", @@ -4100,6 +4122,27 @@ "node": ">= 8.0.0" } }, + "node_modules/@vercel/nft/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@vercel/nft/node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -4860,6 +4903,29 @@ "node": ">= 6" } }, + "node_modules/asar/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "optional": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/async": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", @@ -7010,6 +7076,29 @@ "node": ">=10" } }, + "node_modules/electron-installer-common/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "optional": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/electron-installer-debian": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/electron-installer-debian/-/electron-installer-debian-3.2.0.tgz", @@ -9403,27 +9492,6 @@ "giget": "dist/cli.mjs" } }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -14201,6 +14269,27 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/roarr": { "version": "2.15.4", "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz", @@ -15467,6 +15556,29 @@ "node": ">=6.0.0" } }, + "node_modules/temp/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "optional": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/temp/node_modules/mkdirp": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", diff --git a/src/main.ts b/src/main.ts index da0a58f..10fe2dd 100644 --- a/src/main.ts +++ b/src/main.ts @@ -266,10 +266,10 @@ export function startActivityMonitoring() { return } - // console.log(`Active Application: ${appName}`) let URL = '' if (isBrowser(appName)) { + URL = getBaseURL(await getBrowserURL(appName)) } @@ -401,7 +401,7 @@ app.on('browser-window-focus', () => { mainWindow.webContents.send('deep-work-data-response', chartData) } }) -export function handleUserLogout() { +export function handleUserLogout(): void { log.info('Handling user logout') store.delete('user') store.set('lastResetDate', dayjs().toISOString()) diff --git a/src/productivityUtils.ts b/src/productivityUtils.ts index 7e07d4e..c6c7749 100755 --- a/src/productivityUtils.ts +++ b/src/productivityUtils.ts @@ -190,17 +190,21 @@ export function getActiveWindowApp(): Promise { }) } // Function to get the URL for a specific browser -export function getBrowserURL(browser: browser): Promise { +export function getBrowserURL(browser: string): Promise { return new Promise((resolve, _reject) => { let script = `osascript -e 'tell application "${browser}" to get URL of active tab of front window'` if (browser === 'Safari') { script = `osascript -e 'tell application "${browser}" to get URL of front document'` + } else if (browser === 'Firefox' || browser === 'firefox') { + script = ` + osascript -e 'tell application "System Events" to get value of UI element 1 of combo box 1 of toolbar "Navigation" of first group of front window of application process "Firefox"' + ` } exec(script, (err, stdout, stderr) => { if (err) { console.error(`Error getting URL for ${browser}: ${stderr}`) - resolve('') // Return an empty string if there's an error + resolve('') } else { resolve(stdout.trim()) } @@ -244,6 +248,7 @@ export function isBrowser(appName: string): appName is browser { 'Vivaldi', 'Opera', 'Safari', - 'Firefox' + 'Firefox', + 'firefox' ].includes(appName) } diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index 059e0c4..146af0b 100755 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -103,11 +103,15 @@ const App = (props: ComponentProps) => { tour.start() } - + // Initialize the tour for new users createEffect(() => { console.log('checking if logged in and new user') - if(localStorage.getItem('onboarded') === 'false' || !localStorage.getItem('onboarded')) { + if ( + (localStorage.getItem('onboarded') === 'false' || !localStorage.getItem('onboarded')) && + localStorage.getItem('token') && + localStorage.getItem('user') + ) { initializeTour() localStorage.setItem('onboarded', 'true') setIsNewUser(false) diff --git a/src/worker.ts b/src/worker.ts index e2f358e..11ffc24 100644 --- a/src/worker.ts +++ b/src/worker.ts @@ -33,7 +33,7 @@ parentPort?.on('message', (message) => { } }) -function requestData() { +function requestData(): void { parentPort?.postMessage({ type: MessageType.GET_DATA }) } From 54a63946acd63dfcbf2209b16f2d1202a1292a23 Mon Sep 17 00:00:00 2001 From: Timeo Williams Date: Sat, 2 Nov 2024 16:23:40 -0400 Subject: [PATCH 2/2] fix: show menu/tray icon. --- forge.config.ts | 3 +- resources/trayIcon.png | Bin 0 -> 1752 bytes src/main.ts | 143 ++++++++++++++++++++++----------------- src/productivityUtils.ts | 4 -- src/renderer/src/App.tsx | 7 +- src/utils.ts | 2 +- 6 files changed, 85 insertions(+), 74 deletions(-) create mode 100644 resources/trayIcon.png diff --git a/forge.config.ts b/forge.config.ts index ff7c106..4be4539 100644 --- a/forge.config.ts +++ b/forge.config.ts @@ -28,7 +28,8 @@ const config: ForgeConfig = { 'resources/icon_red.png', 'resources/icon_yellow.png', 'resources/icon_blue.png', - 'resources/DOG_MEME.avif' + 'resources/DOG_MEME.avif', + 'resources/trayIcon.png' ] }, rebuildConfig: {}, diff --git a/resources/trayIcon.png b/resources/trayIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..2d29ad762f359c8caecbb423cb8bb7e8b9ad88d8 GIT binary patch literal 1752 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBDAAG{;hE;^%b*2hb1<+n z3NbJPS&Tr)z$nE4G7ZRL@M4sPvx68lplX;H7}_%#SfFa6fHVkr05M1pgl1mAh%j*h z6I`{x0%imor0saV%ts)_S>O>_%)r1c48n{Iv*t)JFfg6U42dX-@b$4u&d=3LOvz75 z)vL%Y0O?||sjvbvb5lza6)JLb@`|l0Y?Z(&tblBgu)dN4SV>8?tx|+H?jfSfFg)+ zA4CH}eP~{0i5*M}nlQSq2!uSs8e~Cq4gN)$slb2)yUP&jEMzex^&sC_1!PvF=0vz; z=BDNqgZyG@2y_`%8FZb_`8oMT!3BxQsdhk%z*>-m&{c!&iNt9Sk_=R*jXo&0kzyZ` zw7{akv}MO-qYqD~c3e?A^^X8k^$SlI#}Es_*5GK5kU){U&+lA+v0~<|eoxtnHD`Km zIfsa7YA#e0Hh!Vbed>t&Gv-D8FO;=kEbbQ)Z2H5wNd7nX$rdkxU!6K02hXSoo(Va2 z{l|{-XZJQ+m%s56x!PF$-7fw8)^oRhzw^Grwlq4`Xi+%5>~~uweXrG+Z~d(2 zgSdf8N`~UMuPYa>*r=}hZ;vvkcbt>Ko3;7JHz;km`Kjf-r%UdprP)@pb&tKf?Ci4I zo6A~QCOU38;E>GnjE5`x&Mginkwk-af;*-!b@V*5T{JR)H|rl?BYnxj`Sm3`NBmdBX_K8y{i3T-m~w9XcbhrTWU zDRf8f%=uF3_HVl+mpsqeXFs{kyHqeX?VihNIaWcZSGqFdoJV+Ou)qH5_1R}Fvus{J zn;w7Pl_d&h&i30HB%j~?!Mo?|p}BpVHcgPqX}-OAYv+w(lUhmr!^+z2)6Z!CI{)g& z%p>`^*Jd9H5BpVi_8Q~%`VBKbSuh$GFZ;W(q)Pdjf%>lB+|TZ>Q=NGF-K>2RdM3Qi#e y|0#|U<)@Y{wz?U9QhnM-3%Aoz3PC~V|1nIMVa#q8FIxdBuRUG;T-G@yGywo*a(99N literal 0 HcmV?d00001 diff --git a/src/main.ts b/src/main.ts index 10fe2dd..3e2536a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,6 +7,7 @@ import { Notification, Menu, MenuItemConstructorOptions, + Tray, nativeImage } from 'electron' import { Worker } from 'worker_threads' @@ -16,7 +17,15 @@ import fs from 'fs' import schedule from 'node-schedule' import dotenv from 'dotenv' import Store from 'electron-store' -import { StoreSchema, SiteTimeTracker, DeepWorkHours, MessageType, User, AppIcon, TrackerType } from './types' +import { + StoreSchema, + SiteTimeTracker, + DeepWorkHours, + MessageType, + User, + AppIcon, + TrackerType +} from './types' import { updateSiteTimeTracker, getBrowserURL, @@ -56,6 +65,7 @@ let currentDeepWork = 0 let user: User | null = null let iconPath = '' let mainWindow: BrowserWindow | null = null +let tray: Tray | null = null log.transports.file.level = 'debug' log.transports.file.maxSize = 10 * 1024 * 1024 @@ -93,52 +103,6 @@ function setupEnvironment() { } } -export function updateAppMenu() { - createAppMenu() -} - -function createAppMenu() { - const totalDeepWorkHours = getDeepWorkHours() - - const menuTemplate: MenuItemConstructorOptions[] = [ - { - label: 'DeepFocus', - submenu: [ - { - label: `Total Deep Work: ${totalDeepWorkHours} hours`, - enabled: false - }, - { type: 'separator' }, - { - label: 'Reset Data', - click: () => { - handleDailyReset() - new Notification({ - title: 'DeepFocus', - body: 'Daily data has been reset.', - icon: join(resourcesPath, 'icon.png') - }).show() - updateAppMenu() - } - }, - { type: 'separator' }, - { - label: 'Quit', - click: () => { - app.quit() - } - } - ] - } - ] - - // Create the menu from the template - const menu = Menu.buildFromTemplate(menuTemplate) - - // Set the application menu - Menu.setApplicationMenu(menu) -} - // Store user data in the electron-store and send to worker export function handleUserData(user: User, store: TypedStore): User { store.set('user', { @@ -161,11 +125,14 @@ export function loadUserData() { const savedUser: User | null = store.get('user') || null if (savedUser) { schedulerWorker.postMessage({ type: MessageType.SET_USER_INFO, user: savedUser }) + const iconPath = app.isPackaged + ? path.join(process.resourcesPath, 'icon.png') + : path.join(__dirname, '../../resources/icon.png') new Notification({ title: 'DeepFocus', body: 'Welcome back, ' + savedUser.firstName, - icon: join(resourcesPath, 'icon.png') + icon: iconPath }).show() } return savedUser @@ -269,7 +236,6 @@ export function startActivityMonitoring() { let URL = '' if (isBrowser(appName)) { - URL = getBaseURL(await getBrowserURL(appName)) } @@ -310,7 +276,8 @@ async function createWindow(): Promise { preload: path.join(__dirname, 'preload.js'), nodeIntegrationInWorker: true, sandbox: false - } + }, + icon: iconPath }) app.dock.setIcon(getIconPath('icon.png', resourcesPath)) @@ -323,7 +290,6 @@ async function createWindow(): Promise { return { action: 'deny' } }) - // and load the index.html of the app. if (MAIN_WINDOW_VITE_DEV_SERVER_URL) { mainWindow.loadURL(MAIN_WINDOW_VITE_DEV_SERVER_URL) @@ -346,6 +312,9 @@ async function createWindow(): Promise { } app.whenReady().then(async () => { + const iconPath = app.isPackaged + ? path.join(process.resourcesPath, 'trayIcon.png') + : path.join(__dirname, '../../resources/trayIcon.png') log.info('app is ready. Retrieving currentSiteTimeTrackers and deepWorkHours from store') currentSiteTimeTrackers = store.get('siteTimeTrackers', []) deepWorkHours = store.get('deepWorkHours', { @@ -364,16 +333,61 @@ app.whenReady().then(async () => { setupIPCListeners() user = loadUserData() setupPeriodicSave() + console.log('updating app menu') } catch (error) { console.error('Error during permission check or timeout:', error) new Notification({ title: 'DeepFocus', body: `Deep Focus can't function properly without permissions.`, - icon: join(__dirname, 'resources/icon.png') + icon: iconPath }) } }) + const image = nativeImage.createFromPath(iconPath) + tray = new Tray(image) + tray.setToolTip('Deep Focus. Get more done.') + + const trayMenu = Menu.buildFromTemplate([ + { + label: 'Total Deep Work', + click: () => { + const today = dayjs().format('dddd') as keyof typeof deepWorkHours + const totalDeepWorkHours = getDeepWorkHours()[today] + new Notification({ + title: 'DeepFocus', + body: `Total Deep Work: ${totalDeepWorkHours} hours`, + icon: iconPath + }).show() + } + }, + { + label: 'Reset Data', + click: () => { + handleDailyReset() // Replace with your function to reset data + new Notification({ + title: 'DeepFocus', + body: 'Daily data has been reset.', + icon: iconPath + }).show() + } + }, + { type: 'separator' }, + { + label: 'Quit', + click: () => { + app.quit() + } + } + ]) + + tray.setContextMenu(trayMenu) + + tray.on('click', () => { + if (mainWindow) { + mainWindow.isVisible() ? mainWindow.hide() : mainWindow.show() + } + }) }) app.on('ready', () => { @@ -407,10 +421,13 @@ export function handleUserLogout(): void { store.set('lastResetDate', dayjs().toISOString()) user = null stopActivityMonitoring() + const iconPath = app.isPackaged + ? path.join(process.resourcesPath, 'icon.png') + : path.join(__dirname, '../../resources/icon.png') new Notification({ title: 'DeepFocus', body: 'You have been logged out', - icon: join(__dirname, 'resources/icon.png') + icon: iconPath }).show() } @@ -517,19 +534,19 @@ function setupIPCListeners() { ipcMain.handle('get-icon', async (_event, iconPath) => { try { - const image = nativeImage.createFromPath(iconPath); - + const image = nativeImage.createFromPath(iconPath) + if (image.isEmpty()) { - console.warn(`Icon at path "${iconPath}" could not be loaded.`); - return null; // Indicate that the icon could not be loaded + console.warn(`Icon at path "${iconPath}" could not be loaded.`) + return null // Indicate that the icon could not be loaded } - - return image.toDataURL(); + + return image.toDataURL() } catch (error) { - console.error(`Failed to load icon from path "${iconPath}":`, error); - return null; // Handle error by returning a default fallback + console.error(`Failed to load icon from path "${iconPath}":`, error) + return null // Handle error by returning a default fallback } - }); + }) // Fetch the user's site time trackers ipcMain.on('fetch-site-trackers', async (event) => { @@ -573,7 +590,7 @@ function setupIPCListeners() { // Update the user's deep work target daily ipcMain.on('update-deep-work-target', (_event, newTarget: number) => { store.set('deepWorkTarget', newTarget) - updateAppMenu() + // updateAppMenu() console.log(`Updated Deep Work Target: ${newTarget}`) }) // Fetch the user's current deep work hours daily diff --git a/src/productivityUtils.ts b/src/productivityUtils.ts index d983e94..f9d9a1d 100755 --- a/src/productivityUtils.ts +++ b/src/productivityUtils.ts @@ -195,11 +195,7 @@ export function getBrowserURL(browser: string): Promise { let script = `osascript -e 'tell application "${browser}" to get URL of active tab of front window'` if (browser === 'Safari') { script = `osascript -e 'tell application "${browser}" to get URL of front document'` -<<<<<<< HEAD - } else if (browser === 'Firefox' || browser === 'firefox') { -======= } else if (browser.toLowerCase() === 'firefox') { ->>>>>>> 788e2091b5282f0f9c9fac1d59269704222ef7f8 script = ` osascript -e 'tell application "System Events" to get value of UI element 1 of combo box 1 of toolbar "Navigation" of first group of front window of application process "Firefox"' ` diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index f785231..700c2bf 100755 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -107,15 +107,11 @@ const App = (props: ComponentProps) => { // Initialize the tour for new users createEffect(() => { console.log('checking if logged in and new user') -<<<<<<< HEAD if ( (localStorage.getItem('onboarded') === 'false' || !localStorage.getItem('onboarded')) && localStorage.getItem('token') && localStorage.getItem('user') ) { -======= - if((localStorage.getItem('onboarded') === 'false' || !localStorage.getItem('onboarded')) && localStorage.getItem('token') && localStorage.getItem('user')) { ->>>>>>> 788e2091b5282f0f9c9fac1d59269704222ef7f8 initializeTour() localStorage.setItem('onboarded', 'true') setIsNewUser(false) @@ -141,8 +137,9 @@ const App = (props: ComponentProps) => { setIsLoggedIn(true) sendUserToBackend(JSON.parse(user)) setIsNewUser(false) - navigate('/onboarding') } + // TODO: better navigate user to home page to show Home component + navigate('/') }) const NavBar = () => { diff --git a/src/utils.ts b/src/utils.ts index 58f7df2..dd2a864 100755 --- a/src/utils.ts +++ b/src/utils.ts @@ -100,7 +100,7 @@ export function updateIconBasedOnProgress( const isIconPathChanged = iconPath !== newIconPath if (isIconPathChanged) { log.info('Comparison of icon paths is ', iconPath, newIconPath) - app.dock.setIcon(iconPath) + // app.dock.setIcon(iconPath) new Notification({ title: 'DeepFocus', body: message,