mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
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:
@@ -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']
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user