improve popup location

This commit is contained in:
Ruben Fiszel
2023-09-14 15:10:08 +02:00
parent a1fdfffb14
commit bb993336ce
3 changed files with 9 additions and 4 deletions

View File

@@ -42,4 +42,4 @@ jobs:
mkdir frontend/build && cd backend && touch
windmill-api/openapi-deref.yaml &&
DATABASE_URL=postgres://postgres:changeme@postgres:5432/windmill cargo
--features enterprise test --all -- --nocapture
test --all --features enterprise -- --nocapture

View File

@@ -17,6 +17,7 @@
dedicated_worker?: string
worker_tags?: string[]
}
export let top: boolean
let nconfig: any = config
? config.worker_tags != undefined || config.dedicated_worker != undefined
@@ -76,7 +77,7 @@
><h4 class="py-4 truncate w-40">{name}</h4>
{#if $superadmin}
<Popup
floatingConfig={{ strategy: 'absolute', placement: 'bottom-end' }}
floatingConfig={{ strategy: 'absolute', placement: top ? 'top-start' : 'bottom-start' }}
containerClasses="border rounded-lg shadow-lg p-4 bg-surface"
>
<svelte:fragment slot="button">

View File

@@ -258,8 +258,9 @@
</div>
{/if}</div
>
{#each groupedWorkers as worker_group}
{#each groupedWorkers as worker_group, i}
<WorkspaceGroup
top={i != 0}
name={worker_group[0]}
config={(workerGroups ?? {})[worker_group[0]]}
on:reload={() => {
@@ -332,8 +333,11 @@
<div class="pb-4" />
{/each}
{#each Object.entries(workerGroups ?? {}).filter((x) => !groupedWorkers.some((y) => y[0] == x[0])) as worker_group}
<div class="pb-4" />
{#each Object.entries(workerGroups ?? {}).filter((x) => !groupedWorkers.some((y) => y[0] == x[0])) as worker_group, i}
<WorkspaceGroup
top={i != 0 || groupedWorkers?.length > 0}
on:reload={() => {
loadWorkerGroups()
}}