mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-02 19:49:58 +00:00
Extension API to add toast message (#491)
* Extension API to add toast message * Update readme
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { SidebarTabExtension } from '@/types/extensionTypes'
|
||||
import { SidebarTabExtension, ToastManager } from '@/types/extensionTypes'
|
||||
import { defineStore } from 'pinia'
|
||||
import { useToastStore } from './toastStore'
|
||||
|
||||
interface WorkspaceState {
|
||||
spinner: boolean
|
||||
@@ -13,6 +14,11 @@ export const useWorkspaceStore = defineStore('workspace', {
|
||||
activeSidebarTab: null,
|
||||
sidebarTabs: []
|
||||
}),
|
||||
getters: {
|
||||
toast(): ToastManager {
|
||||
return useToastStore()
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
updateActiveSidebarTab(tabId: string) {
|
||||
this.activeSidebarTab = tabId
|
||||
|
||||
Reference in New Issue
Block a user