Skip to content

Conversation

@oto-ciulis-tt
Copy link
Contributor

@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
Contributor

@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
Contributor

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

SHOW_DIRECTORY_PICKER: 'show-directory-picker',
INSTALL_COMFYUI: 'install-comfyui',
SHOW_CONTEXT_MENU: 'show-context-menu',
GET_OS_PLATFORM: 'get-os-platform',
Copy link
Contributor

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
Contributor 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
Contributor

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.

5 participants