mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-10 10:00:08 +00:00
[Beta Menu] Shows unsaved state on browser tab title (#860)
* [Beta Menu] Shows unsaved state on browser tab title * Proper state management * Add playwright test * Fix browser tests
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
import { ComfyWorkflow } from '@/scripts/workflows'
|
||||
import { getStorageValue } from '@/scripts/utils'
|
||||
|
||||
export const useWorkflowStore = defineStore('workflow', () => {
|
||||
const activeWorkflow = ref<ComfyWorkflow | null>(null)
|
||||
const previousWorkflowUnsaved = ref<boolean>(
|
||||
Boolean(getStorageValue('Comfy.PreviousWorkflowUnsaved'))
|
||||
)
|
||||
|
||||
return {
|
||||
activeWorkflow
|
||||
activeWorkflow,
|
||||
previousWorkflowUnsaved
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user