diff --git a/browser_tests/colorPalette.spec.ts-snapshots/custom-color-palette-obsidian-dark-chromium-2x-linux.png b/browser_tests/colorPalette.spec.ts-snapshots/custom-color-palette-obsidian-dark-chromium-2x-linux.png index 6f398f40b..578fc0f21 100644 Binary files a/browser_tests/colorPalette.spec.ts-snapshots/custom-color-palette-obsidian-dark-chromium-2x-linux.png and b/browser_tests/colorPalette.spec.ts-snapshots/custom-color-palette-obsidian-dark-chromium-2x-linux.png differ diff --git a/browser_tests/colorPalette.spec.ts-snapshots/custom-color-palette-obsidian-dark-chromium-linux.png b/browser_tests/colorPalette.spec.ts-snapshots/custom-color-palette-obsidian-dark-chromium-linux.png index 3d112256f..487aaf815 100644 Binary files a/browser_tests/colorPalette.spec.ts-snapshots/custom-color-palette-obsidian-dark-chromium-linux.png and b/browser_tests/colorPalette.spec.ts-snapshots/custom-color-palette-obsidian-dark-chromium-linux.png differ diff --git a/src/components/common/__tests__/TreeExplorerTreeNode.spec.ts b/src/components/common/__tests__/TreeExplorerTreeNode.spec.ts index 82dc913be..7657bfd86 100644 --- a/src/components/common/__tests__/TreeExplorerTreeNode.spec.ts +++ b/src/components/common/__tests__/TreeExplorerTreeNode.spec.ts @@ -128,7 +128,7 @@ describe('TreeExplorerTreeNode', () => { expect(handleRenameMock).toHaveBeenCalledOnce() expect(addToastSpy).toHaveBeenCalledWith({ severity: 'error', - summary: 'g.error', + summary: 'Error', detail: 'Rename failed', life: 3000 }) diff --git a/src/components/dialog/content/SettingDialogContent.vue b/src/components/dialog/content/SettingDialogContent.vue index 4b4a16c63..13afc222f 100644 --- a/src/components/dialog/content/SettingDialogContent.vue +++ b/src/components/dialog/content/SettingDialogContent.vue @@ -32,6 +32,7 @@ + @@ -77,6 +78,7 @@ import PanelTemplate from './setting/PanelTemplate.vue' import AboutPanel from './setting/AboutPanel.vue' import FirstTimeUIMessage from './setting/FirstTimeUIMessage.vue' import CurrentUserMessage from './setting/CurrentUserMessage.vue' +import ColorPaletteMessage from './setting/ColorPaletteMessage.vue' import { flattenTree } from '@/utils/treeUtil' import { isElectron } from '@/utils/envUtil' import { normalizeI18nKey } from '@/utils/formatUtil' diff --git a/src/components/dialog/content/setting/ColorPaletteMessage.vue b/src/components/dialog/content/setting/ColorPaletteMessage.vue new file mode 100644 index 000000000..950b77b7a --- /dev/null +++ b/src/components/dialog/content/setting/ColorPaletteMessage.vue @@ -0,0 +1,63 @@ + + + + + {{ $t('settingsCategories.ColorPalette') }} + + + + + + + + + + + + diff --git a/src/components/graph/GraphCanvas.vue b/src/components/graph/GraphCanvas.vue index 127a6b206..f11042813 100644 --- a/src/components/graph/GraphCanvas.vue +++ b/src/components/graph/GraphCanvas.vue @@ -65,6 +65,8 @@ import { ChangeTracker } from '@/scripts/changeTracker' import { api } from '@/scripts/api' import { useCommandStore } from '@/stores/commandStore' import { workflowService } from '@/services/workflowService' +import { useColorPaletteStore } from '@/stores/workspace/colorPaletteStore' +import { useColorPaletteService } from '@/services/colorPaletteService' const emit = defineEmits(['ready']) const canvasRef = ref(null) @@ -209,6 +211,13 @@ watchEffect(() => { canvasStore.canvas.canvas.style.cursor = 'default' }) +const colorPaletteService = useColorPaletteService() +watchEffect(() => { + if (!canvasStore.canvas) return + + colorPaletteService.loadColorPalette(settingStore.get('Comfy.ColorPalette')) +}) + const workflowStore = useWorkflowStore() const persistCurrentWorkflow = () => { const workflow = JSON.stringify(comfyApp.serializeGraph()) @@ -315,6 +324,12 @@ onMounted(async () => { comfyAppReady.value = true + // Load color palette + const colorPaletteStore = useColorPaletteStore() + colorPaletteStore.customPalettes = settingStore.get( + 'Comfy.CustomColorPalettes' + ) + // Start watching for locale change after the initial value is loaded. watch( () => settingStore.get('Comfy.Locale'), diff --git a/src/components/graph/NodeBadge.vue b/src/components/graph/NodeBadge.vue index c90f2368f..d21220a7b 100644 --- a/src/components/graph/NodeBadge.vue +++ b/src/components/graph/NodeBadge.vue @@ -7,10 +7,6 @@