fix(frontend): once a bg script output is opened, keep it open

This commit is contained in:
Faton Ramadani
2023-12-01 11:42:46 +01:00
parent 85805bdf82
commit ba32b2ef2c

View File

@@ -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: