[Branding] Show execution progress in favicon (#3880)

This commit is contained in:
Chenlei Hu
2025-05-13 15:57:18 -04:00
committed by GitHub
parent a474a094f3
commit be84d81c32
13 changed files with 30 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

View File

@@ -0,0 +1,23 @@
import { useFavicon } from '@vueuse/core'
import { watch } from 'vue'
import { useExecutionStore } from '@/stores/executionStore'
export const useProgressFavicon = () => {
const defaultFavicon = '/assets/images/favicon_progress_16x16/frame_9.png'
const favicon = useFavicon(defaultFavicon)
const executionStore = useExecutionStore()
const totalFrames = 10
watch(
[() => executionStore.executionProgress, () => executionStore.isIdle],
([progress, isIdle]) => {
if (isIdle) {
favicon.value = defaultFavicon
} else {
const frame = Math.floor(progress * totalFrames)
favicon.value = `/assets/images/favicon_progress_16x16/frame_${frame}.png`
}
}
)
}

View File

@@ -16,7 +16,11 @@ export const ALWAYS_DISABLED_EXTENSIONS: readonly string[] = [
// pysssss.SnapToGrid tries to write global app.shiftDown state, which is no longer
// allowed since v1.3.12.
// https://github.com/Comfy-Org/ComfyUI_frontend/issues/1176
'pysssss.SnapToGrid'
'pysssss.SnapToGrid',
// Favicon status is implemented in ComfyUI core in v1.20.
// https://github.com/Comfy-Org/ComfyUI_frontend/pull/3880
'pysssss.FaviconStatus',
'KJNodes.browserstatus'
]
export const useExtensionStore = defineStore('extension', () => {

View File

@@ -36,6 +36,7 @@ import RerouteMigrationToast from '@/components/toast/RerouteMigrationToast.vue'
import TopMenubar from '@/components/topbar/TopMenubar.vue'
import { useCoreCommands } from '@/composables/useCoreCommands'
import { useErrorHandling } from '@/composables/useErrorHandling'
import { useProgressFavicon } from '@/composables/useProgressFavicon'
import { SERVER_CONFIG_ITEMS } from '@/constants/serverConfig'
import { i18n } from '@/i18n'
import { StatusWsMessageStatus } from '@/schemas/apiSchema'
@@ -62,6 +63,7 @@ import { useWorkspaceStore } from '@/stores/workspaceStore'
import { electronAPI, isElectron } from '@/utils/envUtil'
setupAutoQueueHandler()
useProgressFavicon()
const { t } = useI18n()
const toast = useToast()