Add generation progress to browser tab title (#855)

This commit is contained in:
Chenlei Hu
2024-09-17 10:31:29 +09:00
committed by GitHub
parent c510b344af
commit 3fe4b4b856
4 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
<template>
<div>
<!-- This component does not render anything visible. -->
</div>
</template>
<script setup lang="ts">
import { useExecutionStore } from '@/stores/executionStore'
import { useTitle } from '@vueuse/core'
import { computed } from 'vue'
const executionStore = useExecutionStore()
const executionText = computed(() =>
executionStore.isIdle ? '' : `[${executionStore.executionProgress}%]`
)
const title = computed(() => executionText.value + 'ComfyUI')
useTitle(title)
</script>

View File

@@ -1,3 +1,11 @@
<template>
<div>
<!-- This component does not render anything visible. It is used to confirm
the user wants to close the window, and if they do, it will call the
beforeunload event. -->
</div>
</template>
<script setup lang="ts">
import { useSettingStore } from '@/stores/settingStore'
import { onMounted, onUnmounted } from 'vue'