Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix(web): web app description missing (#36209)

KVOJJJin63946d829e81
diff --git a/web/app/components/share/text-generation/__tests__/info-modal.spec.tsx b/web/app/components/share/text-generation/__tests__/info-modal.spec.tsx
index 972c22dfcea..63a15604c25 100644
--- a/web/app/components/share/text-generation/__tests__/info-modal.spec.tsx
+++ b/web/app/components/share/text-generation/__tests__/info-modal.spec.tsx
@@ -72,10 +72,10 @@ describe('InfoModal', () => {
expect(screen.getByText('Test App')).toBeInTheDocument()
})
- it('should render copyright when provided', async () => {
+ it('should render copyright in the full rights reserved format when provided', async () => {
const siteInfoWithCopyright: SiteInfo = {
...baseSiteInfo,
- copyright: 'Dify Inc.',
+ copyright: 'Dify AI',
}
await renderModal(
@@ -86,7 +86,8 @@ describe('InfoModal', () => {
/>,
)
- expect(screen.getByText(/Dify Inc./)).toBeInTheDocument()
+ const currentYear = new Date().getFullYear().toString()
+ expect(screen.getByText(`Copyright © ${currentYear} Dify AI. All Rights Reserved.`)).toBeInTheDocument()
})
it('should render current year in copyright', async () => {
diff --git a/web/app/components/share/text-generation/info-modal.tsx b/web/app/components/share/text-generation/info-modal.tsx
index b8516106616..894ca8781ee 100644
--- a/web/app/components/share/text-generation/info-modal.tsx
+++ b/web/app/components/share/text-generation/info-modal.tsx
@@ -16,6 +16,8 @@ const InfoModal = ({
onClose,
data,
}: Props) => {
+ const [currentYear] = React.useState(() => new Date().getFullYear())
+
return (
<Dialog
open={isShow}
@@ -24,7 +26,7 @@ const InfoModal = ({
onClose()
}}
>
- <DialogContent className="w-full max-w-[400px] min-w-[400px] overflow-hidden! border-none p-0! text-left align-middle">
+ <DialogContent className="w-full max-w-100 min-w-100 overflow-hidden! border-none p-0! text-left align-middle">
<DialogCloseButton />
<div className={cn('flex flex-col items-center gap-4 px-4 pt-10 pb-8')}>
@@ -35,15 +37,20 @@ const InfoModal = ({
background={data?.icon_background || appDefaultIconBackground}
imageUrl={data?.icon_url}
/>
- <div className="system-xl-semibold text-text-secondary">{data?.title}</div>
+ <div className="w-full text-center">
+ <div className="system-xl-semibold text-text-secondary">{data?.title}</div>
+ <div className="mt-1 system-xl-medium text-text-tertiary">{data?.description}</div>
+ </div>
<div className="system-xs-regular text-text-tertiary">
{/* copyright */}
{data?.copyright && (
<div>
- ©
- {(new Date()).getFullYear()}
+ Copyright ©
+ {' '}
+ {currentYear}
{' '}
{data?.copyright}
+ . All Rights Reserved.
</div>
)}
{data?.custom_disclaimer && (