Skip to content

Commit 9cd2cf9

Browse files
committed
feat: use system browser for oauth flow
Signed-off-by: Adam Setch <[email protected]>
1 parent 3f2bc9d commit 9cd2cf9

File tree

5 files changed

+79
-76
lines changed

5 files changed

+79
-76
lines changed

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@
8080
"package.json"
8181
],
8282
"electronLanguages": ["en"],
83+
"protocols": [
84+
{
85+
"name": "Gitify",
86+
"schemes": ["gitify"]
87+
}
88+
],
8389
"mac": {
8490
"category": "public.app-category.developer-tools",
8591
"icon": "assets/images/app-icon.icns",

src/main/main.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ const browserWindowOpts = {
2020
resizable: false,
2121
skipTaskbar: true, // Hide the app from the Windows taskbar
2222
webPreferences: {
23-
enableRemoteModule: true,
2423
nodeIntegration: true,
2524
contextIsolation: false,
2625
},

src/renderer/components/settings/NotificationSettings.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { type FC, type MouseEvent, useContext } from 'react';
22

33
import { BellIcon } from '@primer/octicons-react';
4-
import { Stack, Text } from '@primer/react';
4+
import { Box, Stack, Text } from '@primer/react';
55

66
import { APPLICATION } from '../../../shared/constants';
77
import { AppContext } from '../../context/App';
@@ -61,9 +61,8 @@ export const NotificationSettings: FC = () => {
6161
tooltip={
6262
<Text>
6363
See{' '}
64-
<button
65-
type="button"
66-
className="text-gitify-link"
64+
<Box
65+
className="text-gitify-link cursor-pointer"
6766
title="Open GitHub documentation for participating and watching notifications"
6867
onClick={(event: MouseEvent<HTMLElement>) => {
6968
// Don't trigger onClick of parent element.
@@ -72,7 +71,7 @@ export const NotificationSettings: FC = () => {
7271
}}
7372
>
7473
official docs
75-
</button>{' '}
74+
</Box>{' '}
7675
for more details.
7776
</Text>
7877
}

src/renderer/routes/Accounts.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ export const AccountsRoute: FC = () => {
107107
title="Open account profile"
108108
onClick={() => openAccountProfile(account)}
109109
data-testid="account-profile"
110-
className="pb-2"
111110
>
112111
<AvatarWithFallback
113112
src={account.user.avatar}
@@ -130,10 +129,10 @@ export const AccountsRoute: FC = () => {
130129
</Stack>
131130
</Box>
132131

133-
<button
132+
<Box
134133
title="Open host"
135-
type="button"
136134
onClick={() => openHost(account.hostname)}
135+
className="cursor-pointer"
137136
data-testid="account-host"
138137
>
139138
<Stack
@@ -144,12 +143,12 @@ export const AccountsRoute: FC = () => {
144143
<PlatformIcon />
145144
<Text>{account.hostname}</Text>
146145
</Stack>
147-
</button>
146+
</Box>
148147

149-
<button
148+
<Box
150149
title="Open developer settings"
151-
type="button"
152150
onClick={() => openDeveloperSettings(account)}
151+
className="cursor-pointer"
153152
data-testid="account-developer-settings"
154153
>
155154
<Stack
@@ -160,7 +159,7 @@ export const AccountsRoute: FC = () => {
160159
<AuthMethodIcon />
161160
<Text>{account.method}</Text>
162161
</Stack>
163-
</button>
162+
</Box>
164163
</Stack>
165164
</Box>
166165
</Stack>

0 commit comments

Comments
 (0)