File tree Expand file tree Collapse file tree 6 files changed +8
-6
lines changed
Expand file tree Collapse file tree 6 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import path from 'node:path';
33import { app , dialog } from 'electron' ;
44
55import { logError } from '../shared/logger' ;
6+ import { isMacOS } from '../shared/platform' ;
67
78export async function onFirstRunMaybe ( ) {
89 if ( isFirstRun ( ) ) {
@@ -12,7 +13,7 @@ export async function onFirstRunMaybe() {
1213
1314// Ask user if the app should be moved to the applications folder.
1415async function promptMoveToApplicationsFolder ( ) {
15- if ( process . platform !== 'darwin' ) return ;
16+ if ( ! isMacOS ( ) ) return ;
1617
1718 const isDevMode = ! ! process . defaultApp ;
1819 if ( isDevMode || app . isInApplicationsFolder ( ) ) return ;
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import log from 'electron-log';
33import { menubar } from 'menubar' ;
44
55import { APPLICATION } from '../shared/constants' ;
6+ import { isMacOS , isWindows } from '../shared/platform' ;
67import { onFirstRunMaybe } from './first-run' ;
78import { TrayIcons } from './icons' ;
89import MenuBuilder from './menu' ;
@@ -39,7 +40,7 @@ const contextMenu = menuBuilder.buildMenu();
3940 * Electron Auto Updater only supports macOS and Windows
4041 * https://github.com/electron/update-electron-app
4142 */
42- if ( process . platform === 'darwin' || process . platform === 'win32' ) {
43+ if ( isMacOS ( ) || isWindows ( ) ) {
4344 const updater = new Updater ( mb , menuBuilder ) ;
4445 updater . initialize ( ) ;
4546}
Original file line number Diff line number Diff line change 11import { Menu , MenuItem } from 'electron' ;
22import { autoUpdater } from 'electron-updater' ;
33import type { Menubar } from 'menubar' ;
4+ import { isMacOS } from '../shared/platform' ;
45import { openLogsDirectory , resetApp , takeScreenshot } from './utils' ;
56
67export default class MenuBuilder {
@@ -60,8 +61,7 @@ export default class MenuBuilder {
6061 } ,
6162 {
6263 role : 'toggleDevTools' ,
63- accelerator :
64- process . platform === 'darwin' ? 'Alt+Cmd+I' : 'Ctrl+Shift+I' ,
64+ accelerator : isMacOS ( ) ? 'Alt+Cmd+I' : 'Ctrl+Shift+I' ,
6565 } ,
6666 {
6767 label : 'Take Screenshot' ,
Original file line number Diff line number Diff line change 11import { DeviceDesktopIcon } from '@primer/octicons-react' ;
22import { type FC , useContext } from 'react' ;
3+ import { isLinux , isMacOS } from '../../../shared/platform' ;
34import { AppContext } from '../../context/App' ;
45import { OpenPreference } from '../../types' ;
56import { Constants } from '../../utils/constants' ;
6- import { isLinux , isMacOS } from '../../utils/platform' ;
77import { Checkbox } from '../fields/Checkbox' ;
88import { RadioGroup } from '../fields/RadioGroup' ;
99import { Legend } from './Legend' ;
Original file line number Diff line number Diff line change 11import path from 'node:path' ;
22
33import { logError , logWarn } from '../../shared/logger' ;
4+ import { isWindows } from '../../shared/platform' ;
45import type {
56 AccountNotifications ,
67 GitifyState ,
@@ -13,7 +14,6 @@ import { getAccountUUID } from './auth/utils';
1314import { hideWindow , showWindow , updateTrayIcon } from './comms' ;
1415import { Constants } from './constants' ;
1516import { openNotification } from './links' ;
16- import { isWindows } from './platform' ;
1717import { getGitifySubjectDetails } from './subject' ;
1818
1919export function setTrayIconColor ( notifications : AccountNotifications [ ] ) {
File renamed without changes.
You can’t perform that action at this time.
0 commit comments