Skip to content

Commit e7fe624

Browse files
committed
fix(core-editor): improve xray advanced tabs layout and scrolling
1 parent 87761a4 commit e7fe624

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

dashboard/src/features/core-editor/components/xray/xray-advanced-section.tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -241,19 +241,21 @@ export function XrayAdvancedSection() {
241241
onValueChange={value => setActiveTab(value as AdvancedTab)}
242242
className="min-w-0"
243243
>
244-
<TabsList dir={dir} className="grid w-full grid-cols-4 sm:w-auto sm:inline-flex">
245-
<TabsTrigger value="all">
246-
{t('coreEditor.advanced.tabs.all', { defaultValue: 'All' })}
247-
</TabsTrigger>
248-
{FILTER_TABS.map(tab => (
249-
<TabsTrigger key={tab} value={tab}>
250-
{tab === 'inbounds' && t('coreEditor.section.inbounds', { defaultValue: 'Inbounds' })}
251-
{tab === 'outbounds' && t('coreEditor.section.outbounds', { defaultValue: 'Outbounds' })}
252-
{tab === 'routing' &&
253-
t('coreEditor.advanced.tabs.routingRules', { defaultValue: 'Routing Rules' })}
244+
<div className="-mx-1 overflow-x-auto px-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden">
245+
<TabsList dir={dir} className="inline-flex h-10 w-auto">
246+
<TabsTrigger value="all" className="px-3">
247+
{t('coreEditor.advanced.tabs.all', { defaultValue: 'All' })}
254248
</TabsTrigger>
255-
))}
256-
</TabsList>
249+
{FILTER_TABS.map(tab => (
250+
<TabsTrigger key={tab} value={tab} className="px-3">
251+
{tab === 'inbounds' && t('coreEditor.section.inbounds', { defaultValue: 'Inbounds' })}
252+
{tab === 'outbounds' && t('coreEditor.section.outbounds', { defaultValue: 'Outbounds' })}
253+
{tab === 'routing' &&
254+
t('coreEditor.advanced.tabs.routingRules', { defaultValue: 'Routing Rules' })}
255+
</TabsTrigger>
256+
))}
257+
</TabsList>
258+
</div>
257259
</Tabs>
258260
)}
259261

0 commit comments

Comments
 (0)