minor app fixes

This commit is contained in:
Ruben Fiszel
2023-01-12 12:51:27 +01:00
parent 339742ca77
commit a626aa6175
2 changed files with 16 additions and 7 deletions
@@ -29,7 +29,8 @@
let isLoading: boolean = false
$: noInputs = componentInput?.type != 'runnable' || Object.values(componentInput?.fields ?? {}).filter((x) => x.type == 'user').length == 0
$: noInputs =
componentInput?.type != 'runnable' || Object.keys(componentInput?.fields ?? {}).length == 0
$: outputs = $worldStore?.outputsById[id] as {
result: Output<Array<any>>
@@ -68,8 +69,8 @@
{#if noInputs}
<div class="text-gray-600 italic text-sm my-4">
Run forms are associated with a runnable that has user inputs.
<br>
Once a script or flow is chosen, set some <strong>Runnable Inputs</strong> to
<br />
Once a script or flow is chosen, set some <strong>Runnable Inputs</strong> to
<strong>
User Input
<Icon data={faUser} scale={1.3} class="rounded-sm bg-gray-200 p-1 ml-0.5" />
@@ -86,10 +86,18 @@
isCollapsed = true
}
})
$: if (innerWidth < 1248 && innerWidth >= 768) {
isCollapsed = true
} else if ((innerWidth >= 1248 || innerWidth < 768) && !$page.url.pathname.startsWith('/apps')) {
isCollapsed = false
$: innerWidth && changeCollapsed()
function changeCollapsed() {
if (innerWidth < 1248 && innerWidth >= 768) {
isCollapsed = true
} else if (
(innerWidth >= 1248 || innerWidth < 768) &&
!$page.url.pathname.startsWith('/apps')
) {
isCollapsed = false
}
}
</script>