Files
windmill/frontend/src/lib/components/InheritedLabels.svelte
T
Ruben FiszelandClaude Fable 5 765f50c474 feat: folder-level label inheritance for scripts, flows and jobs (#9524)
* feat: folder-level label inheritance for scripts, flows and jobs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: use SECURITY DEFINER folder_labels() for RLS-consistent inheritance

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat: extend folder label inheritance to apps, resources, variables, schedules

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 07:49:02 +00:00

34 lines
759 B
Svelte

<script lang="ts">
import Badge from './common/badge/Badge.svelte'
import { Folder } from 'lucide-svelte'
interface Props {
labels: string[] | undefined
max?: number
}
let { labels, max = 3 }: Props = $props()
</script>
{#if labels?.length}
<div class="flex items-center gap-0.5">
{#each labels.slice(0, max) as label (label)}
<Badge color="gray" small class="px-1" title="Label inherited from folder: {label}">
<Folder size={10} class="mr-0.5 shrink-0" />
{label}
</Badge>
{/each}
{#if labels.length > max}
<Badge
color="gray"
small
class="px-1"
title={labels
.slice(max)
.map((l) => 'Label inherited from folder: ' + l)
.join('\n')}>+{labels.length - max}</Badge
>
{/if}
</div>
{/if}