mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-10 01:50:08 +00:00
Add generation progress to browser tab title (#855)
This commit is contained in:
18
src/components/BrowserTabTitle.vue
Normal file
18
src/components/BrowserTabTitle.vue
Normal 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>
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user