From ba32b2ef2c191f133dfaadb213ff691c7e8aecfc Mon Sep 17 00:00:00 2001 From: Faton Ramadani Date: Fri, 1 Dec 2023 11:42:46 +0100 Subject: [PATCH] fix(frontend): once a bg script output is opened, keep it open --- .../contextPanel/components/OutputHeader.svelte | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frontend/src/lib/components/apps/editor/contextPanel/components/OutputHeader.svelte b/frontend/src/lib/components/apps/editor/contextPanel/components/OutputHeader.svelte index a88e03d81c..52be7f155a 100644 --- a/frontend/src/lib/components/apps/editor/contextPanel/components/OutputHeader.svelte +++ b/frontend/src/lib/components/apps/editor/contextPanel/components/OutputHeader.svelte @@ -31,6 +31,18 @@ $: open = $allIdsInPath.includes(id) || id == $selectedComponent?.[0] || $manuallyOpened[id] || inSearch + $: if (id.startsWith('bg_')) { + if (open) { + manuallyOpened.update((current) => ({ ...current, [id]: true })) + } else { + manuallyOpened.update((current) => { + const updated = { ...current } + delete updated[id] + return updated + }) + } + } + const hoverColor = { blue: 'hover:bg-blue-100 hover:text-blue-500 dark:hover:bg-frost-900 dark:hover:text-frost-100', indigo: