mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-31 13:29:55 +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:
@@ -9,6 +9,7 @@ import { ComfyAsyncDialog } from '../components/asyncDialog'
|
||||
import { trimJsonExt } from '@/utils/formatUtil'
|
||||
import type { ComfyApp } from '@/scripts/app'
|
||||
import type { ComfyComponent } from '../components'
|
||||
import { useWorkflowStore } from '@/stores/workflowStore'
|
||||
|
||||
export class ComfyWorkflowsMenu {
|
||||
#first = true
|
||||
@@ -68,7 +69,11 @@ export class ComfyWorkflowsMenu {
|
||||
this.unsaved = prop(this, 'unsaved', classList.unsaved, (v) => {
|
||||
classList.unsaved = v
|
||||
this.button.classList = classList
|
||||
setStorageValue('Comfy.PreviousWorkflowUnsaved', v)
|
||||
setStorageValue('Comfy.PreviousWorkflowUnsaved', String(v))
|
||||
|
||||
if (this.app.vueAppReady) {
|
||||
useWorkflowStore().previousWorkflowUnsaved = v
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user