@lobehub/chat 0.151.9 → 0.151.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/locales/ar/common.json +5 -0
- package/locales/bg-BG/common.json +5 -0
- package/locales/de-DE/common.json +5 -0
- package/locales/en-US/common.json +5 -0
- package/locales/es-ES/common.json +5 -0
- package/locales/fr-FR/common.json +5 -0
- package/locales/it-IT/common.json +5 -0
- package/locales/ja-JP/common.json +5 -0
- package/locales/ko-KR/common.json +5 -0
- package/locales/nl-NL/common.json +5 -0
- package/locales/pl-PL/common.json +5 -0
- package/locales/pt-BR/common.json +5 -0
- package/locales/ru-RU/common.json +5 -0
- package/locales/tr-TR/common.json +5 -0
- package/locales/vi-VN/common.json +5 -0
- package/locales/zh-CN/common.json +5 -0
- package/locales/zh-TW/common.json +5 -0
- package/package.json +32 -32
- package/src/app/(main)/welcome/_layout/Desktop.tsx +21 -19
- package/src/app/(main)/welcome/_layout/Mobile.tsx +9 -6
- package/src/app/(main)/welcome/features/Actions.tsx +39 -0
- package/src/app/(main)/welcome/features/Hero.tsx +63 -0
- package/src/app/(main)/welcome/features/Logo.tsx +30 -0
- package/src/app/(main)/welcome/{layout.ts → layout.tsx} +2 -0
- package/src/app/(main)/welcome/page.tsx +16 -9
- package/src/const/url.ts +3 -0
- package/src/features/Follow/index.tsx +64 -0
- package/src/locales/default/common.ts +7 -0
- package/src/app/(main)/welcome/(desktop)/features/Footer.tsx +0 -45
- package/src/app/(main)/welcome/(desktop)/features/Showcase.tsx +0 -23
- package/src/app/(main)/welcome/(desktop)/index.tsx +0 -17
- package/src/app/(main)/welcome/(mobile)/index.tsx +0 -16
- package/src/app/(main)/welcome/features/Banner/AgentCard.tsx +0 -71
- package/src/app/(main)/welcome/features/Banner/AgentTemplate.tsx +0 -43
- package/src/app/(main)/welcome/features/Banner/Hero.tsx +0 -50
- package/src/app/(main)/welcome/features/Banner/index.tsx +0 -56
- package/src/app/(main)/welcome/features/Banner/style.ts +0 -71
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { Avatar, Spotlight } from '@lobehub/ui';
|
|
2
|
-
import { Typography } from 'antd';
|
|
3
|
-
import { createStyles } from 'antd-style';
|
|
4
|
-
import { rgba } from 'polished';
|
|
5
|
-
import { memo } from 'react';
|
|
6
|
-
import { Flexbox } from 'react-layout-kit';
|
|
7
|
-
|
|
8
|
-
import { LobeAgentSession } from '@/types/session';
|
|
9
|
-
|
|
10
|
-
const { Paragraph, Title } = Typography;
|
|
11
|
-
|
|
12
|
-
const useStyles = createStyles(({ css, token, cx, stylish }) => ({
|
|
13
|
-
container: cx(
|
|
14
|
-
stylish.blur,
|
|
15
|
-
css`
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
|
|
18
|
-
position: relative;
|
|
19
|
-
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
flex: 1;
|
|
22
|
-
|
|
23
|
-
padding: 16px;
|
|
24
|
-
|
|
25
|
-
background-color: ${rgba(token.colorBgContainer, 0.5)};
|
|
26
|
-
border: 1px solid ${rgba(token.colorText, 0.2)};
|
|
27
|
-
border-radius: ${token.borderRadiusLG}px;
|
|
28
|
-
|
|
29
|
-
transition: all 400ms ${token.motionEaseOut};
|
|
30
|
-
|
|
31
|
-
&:hover {
|
|
32
|
-
background-color: ${rgba(token.colorBgElevated, 0.2)};
|
|
33
|
-
border-color: ${token.colorText};
|
|
34
|
-
box-shadow: 0 0 0 1px ${token.colorText};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
,
|
|
38
|
-
&:active {
|
|
39
|
-
scale: 0.98;
|
|
40
|
-
}
|
|
41
|
-
`,
|
|
42
|
-
),
|
|
43
|
-
desc: css`
|
|
44
|
-
margin: 0 !important;
|
|
45
|
-
`,
|
|
46
|
-
title: css`
|
|
47
|
-
margin: 0 !important;
|
|
48
|
-
`,
|
|
49
|
-
}));
|
|
50
|
-
|
|
51
|
-
export interface AgentCardProps {
|
|
52
|
-
meta: LobeAgentSession['meta'];
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const AgentCard = memo<AgentCardProps>(({ meta }) => {
|
|
56
|
-
const { styles } = useStyles();
|
|
57
|
-
return (
|
|
58
|
-
<Flexbox className={styles.container} gap={8}>
|
|
59
|
-
<Spotlight size={200} />
|
|
60
|
-
<Avatar avatar={meta.avatar} background={meta.backgroundColor} />
|
|
61
|
-
<Title className={styles.title} ellipsis level={5}>
|
|
62
|
-
{meta.title}
|
|
63
|
-
</Title>
|
|
64
|
-
<Paragraph className={styles.desc} ellipsis={{ rows: 2 }} type="secondary">
|
|
65
|
-
{meta.description}
|
|
66
|
-
</Paragraph>
|
|
67
|
-
</Flexbox>
|
|
68
|
-
);
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
export default AgentCard;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { useResponsive } from 'antd-style';
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
import { Flexbox } from 'react-layout-kit';
|
|
4
|
-
|
|
5
|
-
import AgentCard, { type AgentCardProps } from './AgentCard';
|
|
6
|
-
import { useStyles } from './style';
|
|
7
|
-
|
|
8
|
-
const items: AgentCardProps['meta'][] = [
|
|
9
|
-
{
|
|
10
|
-
avatar: '😀',
|
|
11
|
-
description: 'dddddd',
|
|
12
|
-
title: 'Title',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
avatar: '😀',
|
|
16
|
-
description: 'dddddd',
|
|
17
|
-
title: 'Title',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
avatar: '😀',
|
|
21
|
-
description: 'dddddd',
|
|
22
|
-
title: 'Title',
|
|
23
|
-
},
|
|
24
|
-
];
|
|
25
|
-
|
|
26
|
-
const AgentTemplate = memo<{ width: number }>(({ width }) => {
|
|
27
|
-
const { styles } = useStyles();
|
|
28
|
-
const { mobile } = useResponsive();
|
|
29
|
-
return (
|
|
30
|
-
<Flexbox
|
|
31
|
-
className={styles.templateContainer}
|
|
32
|
-
gap={16}
|
|
33
|
-
horizontal={!mobile}
|
|
34
|
-
style={{ marginTop: -width / 20 }}
|
|
35
|
-
>
|
|
36
|
-
{items.map((meta, index) => (
|
|
37
|
-
<AgentCard key={index} meta={meta} />
|
|
38
|
-
))}
|
|
39
|
-
</Flexbox>
|
|
40
|
-
);
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
export default AgentTemplate;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import dynamic from 'next/dynamic';
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { Flexbox } from 'react-layout-kit';
|
|
5
|
-
|
|
6
|
-
import { genSize, useStyles } from './style';
|
|
7
|
-
|
|
8
|
-
const LogoThree = dynamic(() => import('@lobehub/ui/es/LogoThree'));
|
|
9
|
-
const LogoSpline = dynamic(() => import('@lobehub/ui/es/LogoThree/LogoSpline'));
|
|
10
|
-
|
|
11
|
-
const Hero = memo<{ mobile?: boolean; width: number }>(({ width, mobile }) => {
|
|
12
|
-
const size: any = {
|
|
13
|
-
base: genSize(width / 3.5, 240),
|
|
14
|
-
desc: genSize(width / 50, 14),
|
|
15
|
-
logo: genSize(width / 2.5, 180),
|
|
16
|
-
title: genSize(width / 20, 32),
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
size.marginTop = mobile ? -size.logo / 9 : -size.logo / 3;
|
|
20
|
-
size.marginBottom = mobile ? -size.logo / 9 : -size.logo / 4;
|
|
21
|
-
|
|
22
|
-
const { styles } = useStyles(size.base);
|
|
23
|
-
|
|
24
|
-
const { t } = useTranslation('welcome');
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<>
|
|
28
|
-
<Flexbox
|
|
29
|
-
style={{
|
|
30
|
-
height: size.logo,
|
|
31
|
-
marginBottom: size.marginBottom,
|
|
32
|
-
marginTop: size.marginTop,
|
|
33
|
-
position: 'relative',
|
|
34
|
-
}}
|
|
35
|
-
>
|
|
36
|
-
{mobile ? <LogoThree size={size.logo} /> : <LogoSpline height={'100%'} width={'100%'} />}
|
|
37
|
-
</Flexbox>
|
|
38
|
-
<div className={styles.title} style={{ fontSize: size.title }}>
|
|
39
|
-
<strong style={mobile ? { fontSize: '1.2em' } : {}}>LobeChat</strong>
|
|
40
|
-
{mobile ? <br /> : ' '}
|
|
41
|
-
{t('slogan.title')}
|
|
42
|
-
</div>
|
|
43
|
-
<div className={styles.desc} style={{ fontSize: size.desc }}>
|
|
44
|
-
{t('slogan.desc1')}
|
|
45
|
-
</div>
|
|
46
|
-
</>
|
|
47
|
-
);
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
export default Hero;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { Icon } from '@lobehub/ui';
|
|
4
|
-
import { Button } from 'antd';
|
|
5
|
-
import { SendHorizonal } from 'lucide-react';
|
|
6
|
-
import Link from 'next/link';
|
|
7
|
-
import { useRouter } from 'next/navigation';
|
|
8
|
-
import { memo } from 'react';
|
|
9
|
-
import { useTranslation } from 'react-i18next';
|
|
10
|
-
import { Flexbox } from 'react-layout-kit';
|
|
11
|
-
|
|
12
|
-
import { useGlobalStore } from '@/store/global';
|
|
13
|
-
|
|
14
|
-
import Hero from './Hero';
|
|
15
|
-
import { useStyles } from './style';
|
|
16
|
-
|
|
17
|
-
const Banner = memo<{ mobile?: boolean }>(({ mobile }) => {
|
|
18
|
-
const { t } = useTranslation('welcome');
|
|
19
|
-
const router = useRouter();
|
|
20
|
-
const { styles } = useStyles();
|
|
21
|
-
const [switchBackToChat, isMobile] = useGlobalStore((s) => [s.switchBackToChat, s.isMobile]);
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<>
|
|
25
|
-
<div className={styles.container}>
|
|
26
|
-
<Hero mobile={mobile} width={mobile ? 640 : 1024} />
|
|
27
|
-
</div>
|
|
28
|
-
<Flexbox
|
|
29
|
-
className={styles.buttonGroup}
|
|
30
|
-
gap={16}
|
|
31
|
-
horizontal={!mobile}
|
|
32
|
-
justify={'center'}
|
|
33
|
-
width={'100%'}
|
|
34
|
-
>
|
|
35
|
-
<Link href={'/market'}>
|
|
36
|
-
<Button block={mobile} size={'large'} type={'default'}>
|
|
37
|
-
{t('button.market')}
|
|
38
|
-
</Button>
|
|
39
|
-
</Link>
|
|
40
|
-
<Button
|
|
41
|
-
block={mobile}
|
|
42
|
-
onClick={() => (isMobile ? router.push('/chat') : switchBackToChat())}
|
|
43
|
-
size={'large'}
|
|
44
|
-
type={'primary'}
|
|
45
|
-
>
|
|
46
|
-
<Flexbox align={'center'} gap={4} horizontal justify={'center'}>
|
|
47
|
-
{t('button.start')}
|
|
48
|
-
<Icon icon={SendHorizonal} />
|
|
49
|
-
</Flexbox>
|
|
50
|
-
</Button>
|
|
51
|
-
</Flexbox>
|
|
52
|
-
</>
|
|
53
|
-
);
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
export default Banner;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { createStyles } from 'antd-style';
|
|
2
|
-
import { rgba } from 'polished';
|
|
3
|
-
|
|
4
|
-
export const useStyles = createStyles(({ css, token, stylish, cx, prefixCls }) => {
|
|
5
|
-
return {
|
|
6
|
-
buttonGroup: css`
|
|
7
|
-
.${prefixCls}-upload {
|
|
8
|
-
width: 100% !important;
|
|
9
|
-
}
|
|
10
|
-
`,
|
|
11
|
-
container: css`
|
|
12
|
-
z-index: 10;
|
|
13
|
-
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
align-items: center;
|
|
17
|
-
|
|
18
|
-
width: 100%;
|
|
19
|
-
margin-bottom: 24px;
|
|
20
|
-
`,
|
|
21
|
-
desc: css`
|
|
22
|
-
font-weight: 400;
|
|
23
|
-
color: ${rgba(token.colorText, 0.8)};
|
|
24
|
-
text-align: center;
|
|
25
|
-
`,
|
|
26
|
-
layout: css`
|
|
27
|
-
background: ${token.colorBgContainer};
|
|
28
|
-
`,
|
|
29
|
-
logo: css`
|
|
30
|
-
position: absolute;
|
|
31
|
-
top: 16px;
|
|
32
|
-
left: 16px;
|
|
33
|
-
fill: ${token.colorText};
|
|
34
|
-
`,
|
|
35
|
-
note: css`
|
|
36
|
-
z-index: 10;
|
|
37
|
-
margin-top: 16px;
|
|
38
|
-
color: ${token.colorTextDescription};
|
|
39
|
-
`,
|
|
40
|
-
skip: css`
|
|
41
|
-
color: ${token.colorTextDescription};
|
|
42
|
-
`,
|
|
43
|
-
templateContainer: css`
|
|
44
|
-
flex-wrap: wrap;
|
|
45
|
-
width: 100%;
|
|
46
|
-
padding: 16px;
|
|
47
|
-
`,
|
|
48
|
-
title: css`
|
|
49
|
-
margin-bottom: 0.25em;
|
|
50
|
-
font-weight: 800;
|
|
51
|
-
line-height: 1.4;
|
|
52
|
-
text-align: center;
|
|
53
|
-
`,
|
|
54
|
-
view: cx(
|
|
55
|
-
stylish.noScrollbar,
|
|
56
|
-
css`
|
|
57
|
-
position: relative;
|
|
58
|
-
|
|
59
|
-
overflow: hidden auto;
|
|
60
|
-
|
|
61
|
-
max-width: 1024px;
|
|
62
|
-
height: 100%;
|
|
63
|
-
padding: 32px 16px;
|
|
64
|
-
`,
|
|
65
|
-
),
|
|
66
|
-
};
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
export const genSize = (size: number, minSize: number) => {
|
|
70
|
-
return size < minSize ? minSize : size;
|
|
71
|
-
};
|