Extension API to add toast message (#491)

* Extension API to add toast message

* Update readme
This commit is contained in:
Chenlei Hu
2024-08-17 12:44:55 -04:00
committed by GitHub
parent 069766337a
commit 966b1dd057
3 changed files with 33 additions and 1 deletions

View File

@@ -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