diff --git a/web/app/components/explore/sidebar/index.tsx b/web/app/components/explore/sidebar/index.tsx index a37962d857..a9d67ae2da 100644 --- a/web/app/components/explore/sidebar/index.tsx +++ b/web/app/components/explore/sidebar/index.tsx @@ -15,6 +15,7 @@ import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints' import { useGetInstalledApps, useUninstallApp, useUpdateAppPinStatus } from '@/service/use-explore' import { RiAppsFill, RiExpandRightLine, RiLayoutLeft2Line } from '@remixicon/react' import { useBoolean } from 'ahooks' +import NoApps from './no-apps' export type IExploreSideBarProps = { controlUpdateInstalledApps: number @@ -89,8 +90,9 @@ const SideBar: FC = ({ {installedApps.length > 0 && (
- {!isMobile && !isFold &&

{t('explore.sidebar.webApps')}

} -
{t('explore.sidebar.webApps')}

} + {installedApps.length === 0 && !isMobile && !isFold && } +
{ + const { t } = useTranslation() + const { theme } = useTheme() + return ( +
+
+
{t(`${i18nPrefix}.title`)}
+
{t(`${i18nPrefix}.description`)}
+ {t(`${i18nPrefix}.learnMore`)} +
+ ) +} +export default React.memo(NoApps) diff --git a/web/app/components/explore/sidebar/no-apps/no-web-apps-dark.png b/web/app/components/explore/sidebar/no-apps/no-web-apps-dark.png new file mode 100644 index 0000000000..e153686fcd Binary files /dev/null and b/web/app/components/explore/sidebar/no-apps/no-web-apps-dark.png differ diff --git a/web/app/components/explore/sidebar/no-apps/no-web-apps-light.png b/web/app/components/explore/sidebar/no-apps/no-web-apps-light.png new file mode 100644 index 0000000000..2416b957d2 Binary files /dev/null and b/web/app/components/explore/sidebar/no-apps/no-web-apps-light.png differ diff --git a/web/app/components/explore/sidebar/no-apps/style.module.css b/web/app/components/explore/sidebar/no-apps/style.module.css new file mode 100644 index 0000000000..ad3787ce2b --- /dev/null +++ b/web/app/components/explore/sidebar/no-apps/style.module.css @@ -0,0 +1,7 @@ +.light { + background-image: url('./no-web-apps-light.png'); +} + +.dark { + background-image: url('./no-web-apps-dark.png'); +} diff --git a/web/i18n/en-US/explore.ts b/web/i18n/en-US/explore.ts index 188793ae8b..d1373d7298 100644 --- a/web/i18n/en-US/explore.ts +++ b/web/i18n/en-US/explore.ts @@ -14,6 +14,11 @@ const translation = { title: 'Delete app', content: 'Are you sure you want to delete this app?', }, + noApps: { + title: 'No web apps', + description: 'Published web apps will appear here', + learnMore: 'Learn more', + }, }, apps: { title: 'Try Dify\'s curated apps to find AI solutions for your business', diff --git a/web/i18n/ja-JP/explore.ts b/web/i18n/ja-JP/explore.ts index b598c898b0..b8e3962d6e 100644 --- a/web/i18n/ja-JP/explore.ts +++ b/web/i18n/ja-JP/explore.ts @@ -14,6 +14,11 @@ const translation = { title: 'アプリを削除', content: 'このアプリを削除してもよろしいですか?', }, + noApps: { + title: 'Webアプリなし', + description: '公開されたWebアプリがここに表示されます', + learnMore: '詳細', + }, }, apps: { title: 'Difyの厳選アプリを試して、ビジネス向けのAIソリューションを見つけましょう', diff --git a/web/i18n/zh-Hans/explore.ts b/web/i18n/zh-Hans/explore.ts index 0a97f2c1b3..5c338d0c5d 100644 --- a/web/i18n/zh-Hans/explore.ts +++ b/web/i18n/zh-Hans/explore.ts @@ -14,6 +14,11 @@ const translation = { title: '删除程序', content: '您确定要删除此程序吗?', }, + noApps: { + title: '没有 web apps', + description: '已发布的 web apps 将出现在此处', + learnMore: '了解更多', + }, }, apps: { title: '试用 Dify 精选示例应用,为您的业务寻找 AI 解决方案',