Skip to content

Commit

Permalink
Merge pull request #192 from firecamp-dev/feat/62-desktop #62
Browse files Browse the repository at this point in the history
closes: #62 Firecamp Desktop App
  • Loading branch information
Nishchit14 committed Mar 4, 2024
2 parents 21e36f6 + 9c3d119 commit d740484
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 11 deletions.
4 changes: 2 additions & 2 deletions packages/firecamp-electron/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@firecamp/electron",
"productName": "Firecamp",
"version": "3.3.0-beta.2",
"version": "3.3.0-beta.3",
"description": "The Firecamp Desktop Application",
"main": "build/main.js",
"private": true,
Expand Down Expand Up @@ -34,7 +34,7 @@
},
"devDependencies": {
"@types/node": "^20.8.9",
"electron": "^27.1.2",
"electron": "^29.1.0",
"electron-builder": "^24.13.3"
},
"build": {
Expand Down
24 changes: 20 additions & 4 deletions packages/firecamp-electron/src/updater/dialogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,58 @@ import { app, dialog } from 'electron';
import { UpdateInfo } from 'electron-updater';

const showUpdateDownloadedWinDialog = (win: any) => {
dialog.showMessageBoxSync(win, {
const index = dialog.showMessageBoxSync(win, {
type: 'question',
title: '👏️ Installed New Version',
message: 'The new version is installed. You may now restart the app.',
detail: 'Please ensure you save any open, unsaved work before proceeding.',
buttons: ['Cancel', 'Restart'],
});
if (index == 1) {
app.relaunch();
app.exit();
}
};

const showUpdateDownloadedMacDialog = (win: any) => {
dialog.showMessageBoxSync(win, {
const index = dialog.showMessageBoxSync(win, {
type: 'question',
title: '👏️ Installed New Version',
message: 'The new version is installed. You may now restart the app.',
detail: 'Please ensure you save any open, unsaved work before proceeding.',
buttons: ['Cancel', 'Relaunch'],
noLink: true,
});
if (index == 1) {
app.relaunch();
app.exit();
}
};

const showUpdateAvailable = (win: any) => {
dialog.showMessageBoxSync(win, {
const index = dialog.showMessageBoxSync(win, {
type: 'info',
title: 'Update Found',
message: 'Found updates, do you want to update now?',
buttons: ['Sure', 'No'],
});
if (index == 1) {
app.relaunch();
app.exit();
}
};

const showNoUpdateAvailable = (win: any, info: UpdateInfo) => {
dialog.showMessageBoxSync(win, {
const index = dialog.showMessageBoxSync(win, {
type: 'info',
title: 'No Updates Available',
message: `No updates available. \n\n You're using the latest version Firecamp v${info.version}.`,
buttons: ['Ok'],
});
if (index == 1) {
app.relaunch();
app.exit();
}
};

export {
Expand Down
1 change: 1 addition & 0 deletions playgrounds/firecamp-socket-io-executor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
},
"dependencies": {
"@firecamp/types": "^0.2.2",
"@firecamp/url": "0.0.20",
"@firecamp/utils": "^0.0.24",
"comment-json": "^4.1.1",
"mitt": "3.0.0",
Expand Down
1 change: 1 addition & 0 deletions playgrounds/firecamp-ws-executor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"dependencies": {
"@firecamp/types": "^0.2.2",
"@firecamp/url": "0.0.20",
"@firecamp/utils": "^0.0.24",
"comment-json": "^4.1.1",
"mitt": "^3.0.0",
Expand Down
22 changes: 17 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d740484

Please sign in to comment.