-
Notifications
You must be signed in to change notification settings - Fork 38
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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); |
There was a problem hiding this comment.
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 infoupdateToLatest
: 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', |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
@huchenlei My req. was hiding e.g. Apple MPS as an option on Windows.
There was a problem hiding this comment.
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?
Electron portion of #447
┆Issue is synchronized with this Notion page by Unito