fix: update section titles and improve layout in channel components

This commit is contained in:
CaIon
2026-06-28 15:21:45 +08:00
parent 2d5a041639
commit 1d166532fe
4 changed files with 2838 additions and 2400 deletions
File diff suppressed because it is too large Load Diff
@@ -1,3 +1,4 @@
import { ChevronDown, Settings } from 'lucide-react'
/* /*
Copyright (C) 2023-2026 QuantumNous Copyright (C) 2023-2026 QuantumNous
@@ -17,19 +18,20 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import type { ReactNode } from 'react' import type { ReactNode } from 'react'
import { ChevronDown, Settings } from 'lucide-react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { import {
Collapsible, Collapsible,
CollapsibleContent, CollapsibleContent,
CollapsibleTrigger, CollapsibleTrigger,
} from '@/components/ui/collapsible' } from '@/components/ui/collapsible'
import { cn } from '@/lib/utils'
type ChannelAdvancedSectionProps = { type ChannelAdvancedSectionProps = {
children: ReactNode children: ReactNode
open: boolean open: boolean
onOpenChange: (open: boolean) => void onOpenChange: (open: boolean) => void
summary?: ReactNode
} }
export function ChannelAdvancedSection(props: ChannelAdvancedSectionProps) { export function ChannelAdvancedSection(props: ChannelAdvancedSectionProps) {
@@ -55,9 +57,10 @@ export function ChannelAdvancedSection(props: ChannelAdvancedSectionProps) {
{t('Advanced Settings')} {t('Advanced Settings')}
</div> </div>
<div className='text-muted-foreground text-xs'> <div className='text-muted-foreground text-xs'>
{t( {props.summary ??
'Request overrides, routing behavior, and upstream model automation' t(
)} 'Request overrides, routing behavior, and upstream model automation'
)}
</div> </div>
</div> </div>
</div> </div>
@@ -17,8 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import type { ReactNode } from 'react' import type { ReactNode } from 'react'
import { Link2 } from 'lucide-react' import { KeyRound } from 'lucide-react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { import {
SideDrawerSection, SideDrawerSection,
SideDrawerSectionHeader, SideDrawerSectionHeader,
@@ -34,11 +35,9 @@ export function ChannelApiAccessSection(props: ChannelApiAccessSectionProps) {
return ( return (
<SideDrawerSection> <SideDrawerSection>
<SideDrawerSectionHeader <SideDrawerSectionHeader
title={t('API Access')} title={t('Credentials')}
description={t( description={t('Authentication')}
'Endpoint, provider-specific settings, and credentials.' icon={<KeyRound className='h-4 w-4' aria-hidden='true' />}
)}
icon={<Link2 className='h-4 w-4' aria-hidden='true' />}
/> />
{props.children} {props.children}
</SideDrawerSection> </SideDrawerSection>
@@ -28,7 +28,7 @@ export function ChannelAuthSection(props: ChannelAuthSectionProps) {
const { t } = useTranslation() const { t } = useTranslation()
return ( return (
<div className='border-border/60 flex flex-col gap-4 border-t pt-4'> <div className='border-border/60 flex flex-col gap-3 border-t pt-4'>
<div className='flex items-center gap-2'> <div className='flex items-center gap-2'>
<KeyRound <KeyRound
className='text-muted-foreground h-3.5 w-3.5' className='text-muted-foreground h-3.5 w-3.5'