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

enh: Add Check For Updates button #466

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

oto-ciulis-tt
Copy link
Collaborator

@oto-ciulis-tt oto-ciulis-tt commented Dec 11, 2024

Electron portion of #447

┆Issue is synchronized with this Notion page by Unito

Copy link
Member

@huchenlei huchenlei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please link the frontend change in the PR description. Thanks!

try {
const result = await todesktop.autoUpdater?.checkForUpdates();
if (result?.updateInfo) {
log.info('Update found:', result.updateInfo.version);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's split this function into following 2 functions:

  • checkForUpdates: Check for update and returns the update info
  • updateToLatest: Actually restart and do the update

@@ -31,6 +32,7 @@ export const IPC_CHANNELS = {
SHOW_DIRECTORY_PICKER: 'show-directory-picker',
INSTALL_COMFYUI: 'install-comfyui',
SHOW_CONTEXT_MENU: 'show-context-menu',
GET_OS_PLATFORM: 'get-os-platform',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need the OS_PLATFORM in electron API?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per specification the menu item should show only if the application is ran on Win32 platform so I need to way to determine that in frontend.

Copy link
Contributor

@webfiltered webfiltered Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a duplicate here - one sec.

Edit: See commit here - you can just call process.platform. No need for IPC, it just needs to be node.js not web app.

b11b185

@huchenlei My req. was hiding e.g. Apple MPS as an option on Windows.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have the getOS API added in a separate PR?

@oto-ciulis-tt oto-ciulis-tt requested a review from a team as a code owner December 14, 2024 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants