Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Dec 25, 2024
1 parent 8a93307 commit 12c0edd
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 14 deletions.
1 change: 1 addition & 0 deletions src/app/(main)/settings/provider/(list)/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const Footer = memo(() => {
borderRadius: theme.borderRadiusLG,
padding: 12,
}}
width={'100%'}
>
<div style={{ color: theme.colorTextSecondary, fontSize: 12, textAlign: 'center' }}>
<Trans i18nKey="llm.waitingForMore" ns={'setting'}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ const List = memo(() => {
const disabledList = useUserStore(modelProviderSelectors.disabledModelProviderList, isEqual);

return (
<Flexbox gap={24} padding={'16px 0'} style={{ maxWidth: MAX_WIDTH }}>
<Flexbox gap={24} paddingBlock={'0 16px'} >
<Flexbox gap={8}>
<Flexbox align={'center'} gap={4} horizontal>
<Typography.Text style={{ fontSize: 16, fontWeight: 'bold' }}>
已开启服务商
已启用服务商
</Typography.Text>
<Center className={styles.count}>{enabledList.length}</Center>
</Flexbox>
Expand All @@ -55,7 +55,7 @@ const List = memo(() => {
</Grid>
</Flexbox>
<Flexbox gap={8}>
<Typography.Text style={{ fontSize: 16, fontWeight: 'bold' }}>待开启服务商</Typography.Text>
<Typography.Text style={{ fontSize: 16, fontWeight: 'bold' }}>未启用服务商</Typography.Text>
<Grid>
{disabledList.map((item) => (
<Card {...item} key={item.id} />
Expand Down
10 changes: 2 additions & 8 deletions src/app/(main)/settings/provider/(list)/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use client';

import { Flexbox } from 'react-layout-kit';

import { isCustomBranding } from '@/const/version';

Expand All @@ -9,15 +8,10 @@ import ProviderGrid from './ProviderGrid';

const Page = () => {
return (
<Flexbox
align={'center'}
gap={24}
style={{ overflow: 'scroll', paddingBottom: 24 }}
width={'100%'}
>
<>
<ProviderGrid />
{!isCustomBranding && <Footer />}
</Flexbox>
</>
);
};

Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/settings/provider/ProviderMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const ProviderMenu = () => {
type={'block'}
value={searchKeyword}
/>
{/*<ActionIcon icon={PlusIcon} title={'添加自定义服务商'} />*/}
<ActionIcon disable icon={PlusIcon} title={'添加自定义服务商(敬请期待)'} />
</Flexbox>
{!!searchKeyword ? (
<SearchResult searchKeyword={searchKeyword} />
Expand Down
19 changes: 17 additions & 2 deletions src/app/(main)/settings/provider/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,23 @@ const Layout = ({ children }: PropsWithChildren) => {
<NProgress />
<Flexbox horizontal width={'100%'}>
<ProviderMenu />
<Flexbox horizontal justify={'center'} paddingBlock={24} width={'100%'}>
<Flexbox style={{ maxWidth: MAX_WIDTH, width: '100%' }}>{children}</Flexbox>
<Flexbox
align={'center'}
height={'100%'}
paddingBlock={16}
style={{ overflowX: 'hidden', overflowY: 'auto' }}
width={'100%'}
>
<Flexbox
gap={40}
paddingInline={24}
style={{
maxWidth: MAX_WIDTH,
}}
width={'100%'}
>
{children}
</Flexbox>
</Flexbox>
</Flexbox>
</>
Expand Down

0 comments on commit 12c0edd

Please sign in to comment.