Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firecamp Desktop App #192

Merged
merged 3 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading