fix script picker alignment (#7019)
* fix default tage overflow * fix script picker alignment * fix path height * nit
This commit is contained in:
@@ -19,7 +19,10 @@
|
||||
let placement: 'bottom-end' | 'top-end' = 'bottom-end'
|
||||
</script>
|
||||
|
||||
<Popover floatingConfig={{ strategy: 'absolute', placement: placement }} contentClasses="p-4">
|
||||
<Popover
|
||||
floatingConfig={{ strategy: 'absolute', placement: placement }}
|
||||
contentClasses="p-4 max-h-[80vh] overflow-y-auto"
|
||||
>
|
||||
{#snippet trigger()}
|
||||
<Button variant="default" unifiedSize="md" nonCaptureEvent={true}>
|
||||
<div class="flex flex-row gap-1 items-center"
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
{#if ['script', 'trigger', 'approval', 'preprocessor', 'failure'].includes(selectedKind)}
|
||||
{#if (preFilter === 'all' && owners.length > 0) || preFilter === 'workspace'}
|
||||
{#if preFilter !== 'workspace'}
|
||||
<div class="pb-0 text-2xs font-light text-secondary ml-2">Folders</div>
|
||||
<div class="pb-0 text-2xs font-normal text-secondary ml-2">Folders</div>
|
||||
{/if}
|
||||
|
||||
{#if owners.length > 0}
|
||||
@@ -275,9 +275,9 @@
|
||||
</Button>
|
||||
</div>
|
||||
{/each}
|
||||
<div class="pb-1.5"></div>
|
||||
<div class="pb-1"></div>
|
||||
{:else}
|
||||
<div class="text-2xs text-primary font-light text-center py-3 px-3 items-center">
|
||||
<div class="text-2xs text-primary font-normal text-center py-3 px-3 items-center">
|
||||
No items found.
|
||||
</div>
|
||||
{/if}
|
||||
@@ -285,7 +285,7 @@
|
||||
|
||||
{#if preFilter === 'hub' || preFilter === 'all'}
|
||||
{#if preFilter == 'all'}
|
||||
<div class="pb-0 text-2xs font-light text-secondary ml-2 pt-0.5">Integrations</div>
|
||||
<div class="pb-0 text-2xs font-normal text-secondary ml-2 pt-1">Integrations</div>
|
||||
{/if}
|
||||
<ListFiltersQuick
|
||||
on:selected={() => {
|
||||
@@ -339,8 +339,8 @@
|
||||
{/if}
|
||||
|
||||
{#if inlineScripts?.length > 0}
|
||||
<div class="pb-0 flex flex-row items-center gap-2 -mt-[3px]">
|
||||
<div class=" text-2xs font-light text-secondary ml-2"
|
||||
<div class="pb-0 flex flex-row items-center gap-2">
|
||||
<div class="text-2xs font-normal text-secondary ml-2"
|
||||
>New {selectedKind != 'script' ? selectedKind + ' ' : ''}script</div
|
||||
>
|
||||
{#if $userStore?.is_admin || $userStore?.is_super_admin}
|
||||
@@ -351,6 +351,7 @@
|
||||
unifiedSize="sm"
|
||||
variant="subtle"
|
||||
title="Edit global default scripts"
|
||||
btnClasses="-my-3"
|
||||
/>
|
||||
{:else}
|
||||
<Button
|
||||
@@ -358,6 +359,7 @@
|
||||
startIcon={{ icon: X }}
|
||||
variant="accent"
|
||||
unifiedSize="sm"
|
||||
btnClasses="-my-3"
|
||||
>
|
||||
Close
|
||||
</Button>
|
||||
@@ -443,7 +445,7 @@
|
||||
|
||||
{#if (!selected || selected?.kind === 'owner') && (preFilter === 'workspace' || preFilter === 'all')}
|
||||
{#if !selected && (preFilter !== 'workspace' || funcDesc?.length > 0)}
|
||||
<div class="pt-2 pb-0 text-2xs font-light text-secondary ml-2">Workspace</div>
|
||||
<div class="pt-2 pb-0 text-2xs font-normal text-secondary ml-2">Workspace</div>
|
||||
{/if}
|
||||
{#await import('../pickers/WorkspaceScriptPickerQuick.svelte') then Module}
|
||||
<Module.default
|
||||
@@ -470,7 +472,7 @@
|
||||
{#if selectedKind != 'preprocessor' && selectedKind != 'flow'}
|
||||
{#if (!selected || selected?.kind === 'integrations') && (preFilter === 'hub' || preFilter === 'all')}
|
||||
{#if !selected && preFilter !== 'hub'}
|
||||
<div class=" pb-0 text-2xs font-light text-secondary ml-2">Hub</div>
|
||||
<div class=" pb-0 text-2xs font-normal text-secondary ml-2">Hub</div>
|
||||
{/if}
|
||||
{#await import('../pickers/PickHubScriptQuick.svelte') then Module}
|
||||
<Module.default
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { Alert, Badge, Button, Tab, Tabs } from '$lib/components/common'
|
||||
import { Alert, Badge, Button, ButtonType, Tab, Tabs } from '$lib/components/common'
|
||||
import Drawer from '$lib/components/common/drawer/Drawer.svelte'
|
||||
import DrawerContent from '$lib/components/common/drawer/DrawerContent.svelte'
|
||||
import CronInput from '$lib/components/CronInput.svelte'
|
||||
@@ -36,6 +36,7 @@
|
||||
import { runScheduleNow } from '../scheduled/utils'
|
||||
import { handleConfigChange } from '../utils'
|
||||
import TextInput from '$lib/components/text_input/TextInput.svelte'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
|
||||
let {
|
||||
useDrawer = true,
|
||||
@@ -724,7 +725,10 @@
|
||||
<div class="flex justify-start w-full">
|
||||
<Badge
|
||||
color="gray"
|
||||
class="center-center !bg-surface-secondary !text-secondary rounded-r-none border"
|
||||
class={twMerge(
|
||||
'center-center !bg-surface-secondary !text-secondary rounded-r-none border',
|
||||
ButtonType.UnifiedMinHeightClasses['md']
|
||||
)}
|
||||
>
|
||||
Schedule path (not editable)
|
||||
</Badge>
|
||||
@@ -733,7 +737,10 @@
|
||||
readonly
|
||||
value={path}
|
||||
size={path?.length || 50}
|
||||
class="font-mono !text-2xs grow shrink overflow-x-auto !py-0 !border-l-0 !rounded-l-none"
|
||||
class={twMerge(
|
||||
'font-mono !text-2xs grow shrink overflow-x-auto !py-0 !border-l-0 !rounded-l-none',
|
||||
ButtonType.UnifiedMinHeightClasses['md']
|
||||
)}
|
||||
onfocus={({ currentTarget }) => {
|
||||
currentTarget.select()
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user