Skip to content

Commit 18c85a3

Browse files
authored
feat: linux check for updates (#1737)
* feat: launch homepage for linux updates Signed-off-by: Adam Setch <[email protected]> * feat: launch homepage for linux updates Signed-off-by: Adam Setch <[email protected]> --------- Signed-off-by: Adam Setch <[email protected]>
1 parent 477658f commit 18c85a3

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"bugs": {
6666
"url": "https://github.com/gitify-app/gitify/issues"
6767
},
68-
"homepage": "https://www.gitify.io/",
68+
"homepage": "https://gitify.io/",
6969
"build": {
7070
"productName": "Gitify",
7171
"appId": "com.electron.gitify",

src/main/menu.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import { Menu, MenuItem } from 'electron';
1+
import { Menu, MenuItem, shell } from 'electron';
22
import { autoUpdater } from 'electron-updater';
33
import type { Menubar } from 'menubar';
4-
import { isMacOS } from '../shared/platform';
4+
5+
import { APPLICATION } from '../shared/constants';
6+
import { isMacOS, isWindows } from '../shared/platform';
57
import { openLogsDirectory, resetApp, takeScreenshot } from './utils';
68

79
export default class MenuBuilder {
@@ -19,7 +21,11 @@ export default class MenuBuilder {
1921
label: 'Check for updates',
2022
enabled: true,
2123
click: () => {
22-
autoUpdater.checkForUpdatesAndNotify();
24+
if (isMacOS() || isWindows()) {
25+
autoUpdater.checkForUpdatesAndNotify();
26+
} else {
27+
shell.openExternal(APPLICATION.WEBSITE);
28+
}
2329
},
2430
});
2531

src/shared/constants.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
const packageJson = require('../../package.json');
2+
13
export const APPLICATION = {
24
ID: 'com.electron.gitify',
35

46
NAME: 'Gitify',
7+
8+
WEBSITE: packageJson.homepage,
59
};

0 commit comments

Comments
 (0)