fix: ImportRunnerModal scrolling & team select

This commit is contained in:
Philipp Dormann 2025-04-02 13:35:08 +02:00
parent 3c9b404234
commit 766eeab49f
Signed by: philipp
GPG Key ID: 3BB9ADD52DCA4314
3 changed files with 382 additions and 396 deletions

View File

@ -74,7 +74,7 @@
/></svg
>
</div>
<div class="mt-3 sm:text-left max-h-[75vh] overflow-y-auto">
<div class="mt-3 sm:text-left">
<h3 class="text-lg leading-6 font-medium text-gray-900">
{$_('delete_runner')}
</h3>

View File

@ -212,7 +212,9 @@
aria-modal="true"
aria-labelledby="modal-headline"
>
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4 rounded-t-xl lg:rounded-xl">
<div
class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4 rounded-t-xl lg:rounded-xl"
>
<div class="">
<div
class="flex-shrink-0 flex items-center justify-center size-12 rounded-full bg-blue-100 sm:mx-0 sm:h-10 sm:w-10"
@ -278,24 +280,14 @@
{/if}
{#if opened_from === "RunnerOverview"}
<p>{$_("group")}</p>
<Select
containerClasses="rounded-l-md mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-neutral-800 rounded-md p-2"
itemFilter={(label, filterText, option) =>
label.toLowerCase().includes(filterText.toLowerCase()) ||
option.id.value
.toString()
.startsWith(filterText.toLowerCase())}
items={groups}
showChevron={true}
placeholder={$_(
"search-for-an-organization-or-team-by-name-or-id"
)}
noOptionsMessage={$_("no-organization-or-team-found")}
on:select={(selectedValue) => {
selected_org_or_team = selectedValue.detail.value;
}}
on:clear={() => (selected_org_or_team = null)}
/>
<select
bind:value={selected_org_or_team}
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-neutral-800 rounded-md p-2"
>
{#each groups as g}
<option value={g.value}>{g.label}</option>
{/each}
</select>
{/if}
{#if opened_from === "OrgDetail"}
<p>
@ -304,15 +296,8 @@
})}
</p>
{/if}
<input
type="search"
bind:value={searchvalue}
placeholder={$_("datatable.search")}
aria-label={$_("datatable.search")}
class="p-2 w-full"
/>
<div class="relative w-full mt-4 mb-4">
<div class="w-full overflow-x-auto">
<div class="w-full overflow-x-auto max-h-[50vh]">
<table class="divide-y divide-gray-200 w-full">
<thead class="bg-gray-50">
<tr class="odd:bg-white even:bg-gray-100">

View File

@ -180,6 +180,7 @@
import store from "../../store";
import AddRunnerModal from "./AddRunnerModal.svelte";
import ImportRunnerModal from "./ImportRunnerModal.svelte";
import toast from "svelte-french-toast";
$: current_runners = [];
export let modal_open = false;
export let import_modal_open = false;