@lobehub/lobehub 2.0.0-next.19 → 2.0.0-next.20
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/changelog/v1.json +9 -0
- package/package.json +1 -1
- package/src/app/[variants]/oauth/ResultLayout.tsx +47 -0
- package/src/app/[variants]/oauth/callback/error/page.tsx +20 -33
- package/src/app/[variants]/oauth/callback/layout.tsx +1 -0
- package/src/app/[variants]/oauth/callback/success/page.tsx +8 -22
- package/src/app/[variants]/oauth/consent/[uid]/Consent/BuiltinConsent.tsx +12 -22
- package/src/app/[variants]/oauth/consent/[uid]/Consent/index.tsx +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 2.0.0-next.20](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.19...v2.0.0-next.20)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2025-11-03**</sup>
|
|
8
|
+
|
|
9
|
+
#### 💄 Styles
|
|
10
|
+
|
|
11
|
+
- **misc**: Improve oidc layout style.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Styles
|
|
19
|
+
|
|
20
|
+
- **misc**: Improve oidc layout style, closes [#10023](https://github.com/lobehub/lobe-chat/issues/10023) ([5008be7](https://github.com/lobehub/lobe-chat/commit/5008be7))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
## [Version 2.0.0-next.19](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.18...v2.0.0-next.19)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2025-11-03**</sup>
|
package/changelog/v1.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/lobehub",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.20",
|
|
4
4
|
"description": "LobeHub - an open-source,comprehensive AI Agent framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Card } from 'antd';
|
|
4
|
+
import { createStyles } from 'antd-style';
|
|
5
|
+
import { type ReactNode, memo } from 'react';
|
|
6
|
+
import { Center } from 'react-layout-kit';
|
|
7
|
+
|
|
8
|
+
interface ResultLayoutProps {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const useStyles = createStyles(({ css, responsive }) => ({
|
|
13
|
+
card: css`
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
|
|
18
|
+
width: 100%;
|
|
19
|
+
min-width: 500px;
|
|
20
|
+
min-height: 280px;
|
|
21
|
+
|
|
22
|
+
${responsive.mobile} {
|
|
23
|
+
min-width: auto;
|
|
24
|
+
}
|
|
25
|
+
`,
|
|
26
|
+
container: css`
|
|
27
|
+
${responsive.mobile} {
|
|
28
|
+
justify-content: flex-start;
|
|
29
|
+
width: 100%;
|
|
30
|
+
padding-block-start: 64px;
|
|
31
|
+
}
|
|
32
|
+
`,
|
|
33
|
+
}));
|
|
34
|
+
|
|
35
|
+
const ResultLayout = memo<ResultLayoutProps>(({ children }) => {
|
|
36
|
+
const { styles } = useStyles();
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Center className={styles.container} height="100vh" paddingBlock={24} paddingInline={12}>
|
|
40
|
+
<Card className={styles.card}>{children}</Card>
|
|
41
|
+
</Center>
|
|
42
|
+
);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
ResultLayout.displayName = 'ResultLayout';
|
|
46
|
+
|
|
47
|
+
export default ResultLayout;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { Button, Highlighter, Icon } from '@lobehub/ui';
|
|
4
|
-
import {
|
|
4
|
+
import { Result } from 'antd';
|
|
5
5
|
import { ShieldX } from 'lucide-react';
|
|
6
6
|
import Link from 'next/link';
|
|
7
7
|
import { parseAsString, useQueryState } from 'nuqs';
|
|
8
8
|
import React, { memo } from 'react';
|
|
9
9
|
import { useTranslation } from 'react-i18next';
|
|
10
|
-
import {
|
|
10
|
+
import { Flexbox } from 'react-layout-kit';
|
|
11
11
|
|
|
12
12
|
const FailedPage = memo(() => {
|
|
13
13
|
const { t } = useTranslation('oauth');
|
|
@@ -15,38 +15,25 @@ const FailedPage = memo(() => {
|
|
|
15
15
|
const [errorMessage] = useQueryState<string>('errorMessage', parseAsString);
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<Link href="/">
|
|
32
|
-
<Button type="primary">{t('error.backToHome')}</Button>
|
|
33
|
-
</Link>
|
|
34
|
-
}
|
|
35
|
-
icon={<Icon icon={ShieldX} />}
|
|
36
|
-
status="error"
|
|
37
|
-
subTitle={
|
|
38
|
-
<Flexbox gap={8}>
|
|
39
|
-
{t('error.desc', {
|
|
40
|
-
reason: t(`error.reason.${reason}` as any, { defaultValue: reason }),
|
|
41
|
-
})}
|
|
18
|
+
<Result
|
|
19
|
+
extra={
|
|
20
|
+
<Link href="/">
|
|
21
|
+
<Button type="primary">{t('error.backToHome')}</Button>
|
|
22
|
+
</Link>
|
|
23
|
+
}
|
|
24
|
+
icon={<Icon icon={ShieldX} />}
|
|
25
|
+
status="error"
|
|
26
|
+
subTitle={
|
|
27
|
+
<Flexbox gap={8}>
|
|
28
|
+
{t('error.desc', {
|
|
29
|
+
reason: t(`error.reason.${reason}` as any, { defaultValue: reason }),
|
|
30
|
+
})}
|
|
42
31
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</Card>
|
|
49
|
-
</Center>
|
|
32
|
+
{!!errorMessage && <Highlighter language={'log'}>{errorMessage}</Highlighter>}
|
|
33
|
+
</Flexbox>
|
|
34
|
+
}
|
|
35
|
+
title={t('error.title')}
|
|
36
|
+
/>
|
|
50
37
|
);
|
|
51
38
|
});
|
|
52
39
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../ResultLayout';
|
|
@@ -1,36 +1,22 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { Icon } from '@lobehub/ui';
|
|
4
|
-
import {
|
|
4
|
+
import { Result } from 'antd';
|
|
5
5
|
import { CheckCircle } from 'lucide-react';
|
|
6
6
|
import React, { memo } from 'react';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
|
-
import { Center } from 'react-layout-kit';
|
|
9
8
|
|
|
10
9
|
const SuccessPage = memo(() => {
|
|
11
10
|
const { t } = useTranslation('oauth');
|
|
12
11
|
|
|
13
12
|
return (
|
|
14
|
-
<
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
minWidth: 500,
|
|
22
|
-
width: '100%',
|
|
23
|
-
}}
|
|
24
|
-
>
|
|
25
|
-
<Result
|
|
26
|
-
icon={<Icon icon={CheckCircle} />}
|
|
27
|
-
status="success"
|
|
28
|
-
style={{ padding: 0 }}
|
|
29
|
-
subTitle={t('success.subTitle')}
|
|
30
|
-
title={t('success.title')}
|
|
31
|
-
/>
|
|
32
|
-
</Card>
|
|
33
|
-
</Center>
|
|
13
|
+
<Result
|
|
14
|
+
icon={<Icon icon={CheckCircle} />}
|
|
15
|
+
status="success"
|
|
16
|
+
style={{ padding: 0 }}
|
|
17
|
+
subTitle={t('success.subTitle')}
|
|
18
|
+
title={t('success.title')}
|
|
19
|
+
/>
|
|
34
20
|
);
|
|
35
21
|
});
|
|
36
22
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { Icon } from '@lobehub/ui';
|
|
4
|
-
import {
|
|
4
|
+
import { Result } from 'antd';
|
|
5
5
|
import { useTheme } from 'antd-style';
|
|
6
6
|
import { LoaderCircle } from 'lucide-react';
|
|
7
7
|
import { memo, useEffect, useRef } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
import ResultLayout from '../../../ResultLayout';
|
|
10
11
|
|
|
11
12
|
interface BuiltinConsentProps {
|
|
12
13
|
uid: string;
|
|
@@ -24,26 +25,15 @@ const BuiltinConsent = memo<BuiltinConsentProps>(({ uid }) => {
|
|
|
24
25
|
const theme = useTheme();
|
|
25
26
|
return (
|
|
26
27
|
<>
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
-
style={{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}}
|
|
37
|
-
>
|
|
38
|
-
<Result
|
|
39
|
-
icon={<Icon icon={LoaderCircle} spin style={{ color: theme.colorText }} />}
|
|
40
|
-
status="success"
|
|
41
|
-
style={{ padding: 0 }}
|
|
42
|
-
subTitle={t('consent.redirecting')}
|
|
43
|
-
title=""
|
|
44
|
-
/>
|
|
45
|
-
</Card>
|
|
46
|
-
</Center>
|
|
28
|
+
<ResultLayout>
|
|
29
|
+
<Result
|
|
30
|
+
icon={<Icon icon={LoaderCircle} spin style={{ color: theme.colorText }} />}
|
|
31
|
+
status="success"
|
|
32
|
+
style={{ padding: 0 }}
|
|
33
|
+
subTitle={t('consent.redirecting')}
|
|
34
|
+
title=""
|
|
35
|
+
/>
|
|
36
|
+
</ResultLayout>
|
|
47
37
|
<form action="/oidc/consent" method="post" ref={formRef} style={{ display: 'none' }}>
|
|
48
38
|
<input name="uid" type="hidden" value={uid} />
|
|
49
39
|
<input name="consent" type="hidden" value="accept" />
|