Add manual update check (#3504)

Co-authored-by: Benjamin Lu <templu1107@proton.me>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chenlei Hu <huchenlei@proton.me>
This commit is contained in:
Benjamin Lu
2025-04-20 12:28:59 -04:00
committed by GitHub
parent 184bb582da
commit bf4ae227b3
17 changed files with 76 additions and 13 deletions

View File

@@ -158,6 +158,27 @@ import { checkMirrorReachable } from '@/utils/networkUtil'
window.open('https://comfyorg.notion.site/', '_blank')
}
},
{
id: 'Comfy-Desktop.CheckForUpdates',
label: 'Check for Updates',
icon: 'pi pi-sync',
async function() {
const updateAvailable = await electronAPI.checkForUpdates({
disableUpdateReadyAction: true
})
if (updateAvailable.isUpdateAvailable) {
const version = updateAvailable.version
const proceed = await useDialogService().confirm({
title: t('desktopUpdate.updateFoundTitle', { version }),
message: t('desktopUpdate.updateAvailableMessage'),
type: 'default'
})
if (proceed) {
electronAPI.restartAndInstall()
}
}
}
},
{
id: 'Comfy-Desktop.Reinstall',
label: 'Reinstall',
@@ -223,7 +244,7 @@ import { checkMirrorReachable } from '@/utils/networkUtil'
},
{
path: ['Help'],
commands: ['Comfy-Desktop.Reinstall']
commands: ['Comfy-Desktop.CheckForUpdates', 'Comfy-Desktop.Reinstall']
}
],