1
0
Fork 0
mirror of synced 2024-10-01 17:47:46 +13:00

Show notification when a plugin is hot reloaded

This commit is contained in:
Andrew Kingston 2022-09-30 11:38:12 +01:00
parent 07eb7c061f
commit f43d5ea394

View file

@ -1,4 +1,8 @@
import { builderStore, environmentStore } from "./stores/index.js" import {
builderStore,
environmentStore,
notificationStore,
} from "./stores/index.js"
import { get } from "svelte/store" import { get } from "svelte/store"
import { io } from "socket.io-client" import { io } from "socket.io-client"
@ -31,5 +35,6 @@ export const initWebsocket = () => {
// Event handlers // Event handlers
socket.on("plugin-update", data => { socket.on("plugin-update", data => {
builderStore.actions.updateUsedPlugin(data.name, data.hash) builderStore.actions.updateUsedPlugin(data.name, data.hash)
notificationStore.actions.info(`"${data.name}" plugin reloaded`)
}) })
} }