Skip to content

Commit 6bc8753

Browse files
committed
Show Auto Detect as standalone item above mode groups
1 parent 834d4b2 commit 6bc8753

1 file changed

Lines changed: 17 additions & 11 deletions

File tree

frontend/src/lib/components/sidebar/ExtractionModeSelect.svelte

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,24 @@
9898

9999
<ExpandableSection title="Extraction Mode" bind:expanded>
100100
<div class="flex flex-col gap-3">
101+
{#if grouped.auto?.length}
102+
{@render modeList(grouped.auto)}
103+
{/if}
104+
101105
{#each EXTRACTION_MODE_GROUPS as group}
102-
{@const items = grouped[group.id]}
103-
{#if items?.length}
104-
{@const isOpen = openGroups[group.id]}
105-
{@const active = activeInGroup(group.id)}
106-
<ExpandableSection
107-
title={group.label}
108-
suffix={!isOpen && active ? active.label : ''}
109-
bind:expanded={openGroups[group.id]}
110-
>
111-
{@render modeList(items)}
112-
</ExpandableSection>
106+
{#if group.id !== 'auto'}
107+
{@const items = grouped[group.id]}
108+
{#if items?.length}
109+
{@const isOpen = openGroups[group.id]}
110+
{@const active = activeInGroup(group.id)}
111+
<ExpandableSection
112+
title={group.label}
113+
suffix={!isOpen && active ? active.label : ''}
114+
bind:expanded={openGroups[group.id]}
115+
>
116+
{@render modeList(items)}
117+
</ExpandableSection>
118+
{/if}
113119
{/if}
114120
{/each}
115121
</div>

0 commit comments

Comments
 (0)