mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
Add option to disable reconnecting toasts (#3327)
This commit is contained in:
@@ -764,5 +764,12 @@ export const CORE_SETTINGS: SettingParams[] = [
|
||||
max: 400
|
||||
},
|
||||
versionAdded: '1.15.7'
|
||||
},
|
||||
{
|
||||
id: 'Comfy.Toast.DisableReconnectingToast',
|
||||
name: 'Disable toasts when reconnecting or reconnected',
|
||||
type: 'hidden',
|
||||
defaultValue: false,
|
||||
versionAdded: '1.15.12'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -176,17 +176,21 @@ const reconnectingMessage: ToastMessageOptions = {
|
||||
}
|
||||
|
||||
const onReconnecting = () => {
|
||||
toast.remove(reconnectingMessage)
|
||||
toast.add(reconnectingMessage)
|
||||
if (!settingStore.get('Comfy.Toast.DisableReconnectingToast')) {
|
||||
toast.remove(reconnectingMessage)
|
||||
toast.add(reconnectingMessage)
|
||||
}
|
||||
}
|
||||
|
||||
const onReconnected = () => {
|
||||
toast.remove(reconnectingMessage)
|
||||
toast.add({
|
||||
severity: 'success',
|
||||
summary: t('g.reconnected'),
|
||||
life: 2000
|
||||
})
|
||||
if (!settingStore.get('Comfy.Toast.DisableReconnectingToast')) {
|
||||
toast.remove(reconnectingMessage)
|
||||
toast.add({
|
||||
severity: 'success',
|
||||
summary: t('g.reconnected'),
|
||||
life: 2000
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user