From c255e5b42540e9c2bf4b4785ffe9c51cc59aac9f Mon Sep 17 00:00:00 2001 From: space-nuko <24979496+space-nuko@users.noreply.github.com> Date: Sat, 27 May 2023 23:43:28 -0500 Subject: [PATCH] Show title for cut off select item entries --- src/lib/components/ComfyQueue.svelte | 2 +- src/lib/widgets/ComboWidget.svelte | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/lib/components/ComfyQueue.svelte b/src/lib/components/ComfyQueue.svelte index 8aa3cdf..e71a73e 100644 --- a/src/lib/components/ComfyQueue.svelte +++ b/src/lib/components/ComfyQueue.svelte @@ -147,7 +147,7 @@ message = `${entry.extraData.workflowTitle}` } - if (subgraphs) { + if (subgraphs && subgraphs.length > 0) { const subgraphsString = subgraphs.join(', ') message += ` (${subgraphsString})` } diff --git a/src/lib/widgets/ComboWidget.svelte b/src/lib/widgets/ComboWidget.svelte index 4952708..18496a6 100644 --- a/src/lib/widgets/ComboWidget.svelte +++ b/src/lib/widgets/ComboWidget.svelte @@ -129,10 +129,21 @@ }; } + function getTitle(value?: string) { + if (value == null) { + if (!nodeValue) + return "" + value = $nodeValue + } + + if (value && value.length > 80) + return String(value) + return "" + }
-