fix: 🐛 use core toast

I made this long before it was a thing in comfy.
It now wraps the builtin toat system unless specificaly requested.

(notify css broke in recent ComfyUI updates anyway)
This commit is contained in:
Mel Massadian
2025-06-26 17:33:38 +02:00
parent ff2e99f73e
commit ea750b5e8b
+10 -1
View File
@@ -41,7 +41,16 @@ const toastStyle = `
transition-duration: ${transition_time}ms;
`
function notify(message, timeout = 3000) {
function notify(message, timeout = 3000, old_mode = false) {
if (!old_mode) {
app.extensionManager.toast.add({
severity: 'info',
summary: 'MTB',
detail: message,
life: timeout,
})
return
}
log('Creating toast')
const container = document.getElementById('mtb-notify-container')
const toast = document.createElement('div')