[Electron] Use electronAPI to get ComfyUI core version (#1804)

This commit is contained in:
Chenlei Hu
2024-12-04 19:34:55 -08:00
committed by GitHub
parent 73f50e7e0b
commit 36c2604639
4 changed files with 15 additions and 7 deletions

View File

@@ -3,6 +3,7 @@ import { defineStore } from 'pinia'
import { computed } from 'vue'
import { useSystemStatsStore } from './systemStatsStore'
import { useExtensionStore } from './extensionStore'
import { electronAPI, isElectron } from '@/utils/envUtil'
export const useAboutPanelStore = defineStore('aboutPanel', () => {
const frontendVersion = __COMFYUI_FRONTEND_VERSION__
@@ -13,8 +14,14 @@ export const useAboutPanelStore = defineStore('aboutPanel', () => {
)
const coreBadges = computed<AboutPageBadge[]>(() => [
// In electron, the ComfyUI is packaged without the git repo,
// so the python server's API doesn't have the version info.
{
label: `ComfyUI ${coreVersion.value}`,
label: `ComfyUI ${
isElectron()
? 'v' + electronAPI().getComfyUIVersion()
: coreVersion.value
}`,
url: 'https://github.com/comfyanonymous/ComfyUI',
icon: 'pi pi-github'
},