mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 17:10:07 +00:00
Reload current workflow when locale changes (#1824)
This commit is contained in:
@@ -64,6 +64,7 @@ import { setStorageValue } from '@/scripts/utils'
|
||||
import { ChangeTracker } from '@/scripts/changeTracker'
|
||||
import { api } from '@/scripts/api'
|
||||
import { useCommandStore } from '@/stores/commandStore'
|
||||
import { workflowService } from '@/services/workflowService'
|
||||
|
||||
const emit = defineEmits(['ready'])
|
||||
const canvasRef = ref<HTMLCanvasElement | null>(null)
|
||||
@@ -317,8 +318,9 @@ onMounted(async () => {
|
||||
// Start watching for locale change after the initial value is loaded.
|
||||
watch(
|
||||
() => settingStore.get('Comfy.Locale'),
|
||||
() => {
|
||||
useCommandStore().execute('Comfy.RefreshNodeDefinitions')
|
||||
async () => {
|
||||
await useCommandStore().execute('Comfy.RefreshNodeDefinitions')
|
||||
workflowService.reloadCurrentWorkflow()
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user