diff --git a/DigitalHumanWeb/locales/zh-CN/chat.json b/DigitalHumanWeb/locales/zh-CN/chat.json index 5408230..7556bea 100644 --- a/DigitalHumanWeb/locales/zh-CN/chat.json +++ b/DigitalHumanWeb/locales/zh-CN/chat.json @@ -58,6 +58,7 @@ "addAi": "添加一条 AI 消息", "addUser": "添加一条用户消息", "more": "更多", + "clear": "清空内容", "send": "发送", "sendWithCmdEnter": "按 {{meta}} + Enter 键发送", "sendWithEnter": "按 Enter 键发送", diff --git a/DigitalHumanWeb/locales/zh-CN/discover.json b/DigitalHumanWeb/locales/zh-CN/discover.json index 4eb7fa1..d8774fb 100644 --- a/DigitalHumanWeb/locales/zh-CN/discover.json +++ b/DigitalHumanWeb/locales/zh-CN/discover.json @@ -21,6 +21,7 @@ "back": "返回发现", "category": { "assistant": { + "collect": "收藏", "academic": "学术", "all": "全部", "career": "职业", @@ -39,6 +40,7 @@ }, "plugin": { "all": "全部", + "collect": "收藏", "gaming-entertainment": "游戏娱乐", "life-style": "生活方式", "media-generate": "媒体生成", @@ -205,4 +207,4 @@ "plugins": "插件", "providers": "模型服务商" } -} \ No newline at end of file +} diff --git a/DigitalHumanWeb/src/app/[variants]/(main)/_layout/Desktop/index.tsx b/DigitalHumanWeb/src/app/[variants]/(main)/_layout/Desktop/index.tsx index 52809fa..a3e7c11 100644 --- a/DigitalHumanWeb/src/app/[variants]/(main)/_layout/Desktop/index.tsx +++ b/DigitalHumanWeb/src/app/[variants]/(main)/_layout/Desktop/index.tsx @@ -2,7 +2,7 @@ import { createStyles, useTheme } from 'antd-style'; import dynamic from 'next/dynamic'; -import { PropsWithChildren, memo } from 'react'; +import { PropsWithChildren, memo, useEffect, useRef } from 'react'; import { Flexbox } from 'react-layout-kit'; import { BANNER_HEIGHT } from '@/features/AlertBanner/CloudBanner'; @@ -12,7 +12,7 @@ import { Divider } from "antd"; import Avatar from './SideBar/Avatar'; import SideBar from './SideBar'; - +import { useUserStore } from '@/store/user'; const title:{[key: string]: string } = { "/chat": '会话', @@ -70,6 +70,13 @@ const useStyles = createStyles(({ css }) => ({ `, })) +const getCookie=(name)=> { + let matches = document.cookie.match(new RegExp( + "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)" + )); + return matches ? decodeURIComponent(matches[1]) : undefined; +} + const CloudBanner = dynamic(() => import('@/features/AlertBanner/CloudBanner')); const Layout = memo(({ children }) => { @@ -77,8 +84,15 @@ const Layout = memo(({ children }) => { const theme = useTheme(); const { styles, cx } = useStyles() const { showCloudPromotion } = useServerConfigStore(featureFlagsSelectors); - const pathName = window?.location?.pathname ?? '/welcome' +// const pathName = window?.location?.pathname ?? '/welcome' // const pathName = '/welcome' + const [openSignIn] = useUserStore((s) => [s.openLogin]); + useEffect(() => { + const cookieValue = getCookie('organizationLogo'); + if(!cookieValue) { + openSignIn(); + } + }, []); return ( <> diff --git a/DigitalHumanWeb/src/app/[variants]/(main)/applicationset/applicationset.tsx b/DigitalHumanWeb/src/app/[variants]/(main)/applicationset/applicationset.tsx index 169cb5d..7bca66a 100644 --- a/DigitalHumanWeb/src/app/[variants]/(main)/applicationset/applicationset.tsx +++ b/DigitalHumanWeb/src/app/[variants]/(main)/applicationset/applicationset.tsx @@ -234,7 +234,7 @@ const ApplicationSet = memo(( ) => { <>
- + {/* */}
{val === 'AI' ? diff --git a/DigitalHumanWeb/src/app/[variants]/(main)/chat/(workspace)/features/SettingButton.tsx b/DigitalHumanWeb/src/app/[variants]/(main)/chat/(workspace)/features/SettingButton.tsx index a243cca..7866958 100644 --- a/DigitalHumanWeb/src/app/[variants]/(main)/chat/(workspace)/features/SettingButton.tsx +++ b/DigitalHumanWeb/src/app/[variants]/(main)/chat/(workspace)/features/SettingButton.tsx @@ -28,8 +28,8 @@ const SettingButton = memo<{ mobile?: boolean }>(({ mobile }) => { {/* size={mobile ? MOBILE_HEADER_ICON_SIZE : DESKTOP_HEADER_ICON_SIZE}*/} {/* title={t('header.session', { ns: 'setting' })}*/} {/*/>*/} - {/**/} + ); }); diff --git a/DigitalHumanWeb/src/app/[variants]/layout.tsx b/DigitalHumanWeb/src/app/[variants]/layout.tsx index e38b340..eca060e 100644 --- a/DigitalHumanWeb/src/app/[variants]/layout.tsx +++ b/DigitalHumanWeb/src/app/[variants]/layout.tsx @@ -6,7 +6,7 @@ import { isRtlLang } from 'rtl-detect'; import Analytics from '@/components/Analytics'; import { DEFAULT_LANG } from '@/const/locale'; -import PWAInstall from '@/features/PWAInstall'; +// import PWAInstall from '@/features/PWAInstall'; import AuthProvider from '@/layout/AuthProvider'; import GlobalProvider from '@/layout/GlobalProvider'; import { Locales } from '@/locales/resources'; @@ -42,7 +42,7 @@ const RootLayout = async ({ children, params, modal }: RootLayoutProps) => { {children} {!isMobile && modal} - + {/**/} {inVercel && } diff --git a/DigitalHumanWeb/src/components/Branding/ProductLogo/Custom.tsx b/DigitalHumanWeb/src/components/Branding/ProductLogo/Custom.tsx index 17d62e0..40262d2 100644 --- a/DigitalHumanWeb/src/components/Branding/ProductLogo/Custom.tsx +++ b/DigitalHumanWeb/src/components/Branding/ProductLogo/Custom.tsx @@ -90,7 +90,7 @@ const CustomLogo = memo(({ extra, size = 32, className, style, ty case 'combine': { logoComponent = ( <> - + {/**/} ); diff --git a/DigitalHumanWeb/src/components/InitProgress/index.tsx b/DigitalHumanWeb/src/components/InitProgress/index.tsx index a5ce012..f47d478 100644 --- a/DigitalHumanWeb/src/components/InitProgress/index.tsx +++ b/DigitalHumanWeb/src/components/InitProgress/index.tsx @@ -29,11 +29,11 @@ const InitProgress = memo(({ activeStage, stages }) => { {stage?.icon ? stage?.icon : } - {stage?.text} + {stage?.text} ); diff --git a/DigitalHumanWeb/src/components/Loading/FullscreenLoading/bg1.jpg b/DigitalHumanWeb/src/components/Loading/FullscreenLoading/bg1.jpg new file mode 100644 index 0000000..fbea644 Binary files /dev/null and b/DigitalHumanWeb/src/components/Loading/FullscreenLoading/bg1.jpg differ diff --git a/DigitalHumanWeb/src/components/Loading/FullscreenLoading/index.css b/DigitalHumanWeb/src/components/Loading/FullscreenLoading/index.css new file mode 100644 index 0000000..c455a98 --- /dev/null +++ b/DigitalHumanWeb/src/components/Loading/FullscreenLoading/index.css @@ -0,0 +1,5 @@ +.bg { + background: url('./bg1.jpg') no-repeat center center; + background-size: 100% 100%; + position: relative; +} diff --git a/DigitalHumanWeb/src/components/Loading/FullscreenLoading/index.tsx b/DigitalHumanWeb/src/components/Loading/FullscreenLoading/index.tsx index 52a3b39..49d50cf 100644 --- a/DigitalHumanWeb/src/components/Loading/FullscreenLoading/index.tsx +++ b/DigitalHumanWeb/src/components/Loading/FullscreenLoading/index.tsx @@ -3,6 +3,7 @@ import { Center, Flexbox } from 'react-layout-kit'; import { ProductLogo } from '@/components/Branding'; import InitProgress, { StageItem } from '@/components/InitProgress'; +import './index.css'; interface FullscreenLoadingProps { activeStage: number; @@ -12,8 +13,8 @@ interface FullscreenLoadingProps { const FullscreenLoading = memo(({ activeStage, stages, contentRender }) => { return ( - -
+ +
{contentRender ? contentRender : }
diff --git a/DigitalHumanWeb/src/const/branding.ts b/DigitalHumanWeb/src/const/branding.ts index 6558515..37e0b5d 100644 --- a/DigitalHumanWeb/src/const/branding.ts +++ b/DigitalHumanWeb/src/const/branding.ts @@ -4,7 +4,7 @@ export const LOBE_CHAT_CLOUD = 'LobeChat Cloud'; -export const BRANDING_NAME = 'LobeChat'; +export const BRANDING_NAME = '智能体平台'; export const BRANDING_LOGO_URL = ''; export const ORG_NAME = 'LobeHub';