diff --git a/web/app/(commonLayout)/layout.tsx b/web/app/(commonLayout)/layout.tsx index 222726a4ac..5ac39f1e39 100644 --- a/web/app/(commonLayout)/layout.tsx +++ b/web/app/(commonLayout)/layout.tsx @@ -1,7 +1,7 @@ import type { ReactNode } from 'react' import * as React from 'react' import { AppInitializer } from '@/app/components/app-initializer' -import InSiteMessageNotification from '@/app/components/app/in-site-message-notification' +import InSiteMessageNotification from '@/app/components/app/in-site-message/notification' import AmplitudeProvider from '@/app/components/base/amplitude' import GA, { GaType } from '@/app/components/base/ga' import Zendesk from '@/app/components/base/zendesk' diff --git a/web/app/(commonLayout)/remark-directive-test/page.tsx b/web/app/(commonLayout)/remark-directive-test/page.tsx deleted file mode 100644 index e0013108f6..0000000000 --- a/web/app/(commonLayout)/remark-directive-test/page.tsx +++ /dev/null @@ -1,98 +0,0 @@ -'use client' -import InSiteMessage from '@/app/components/app/in-site-message' -import { MarkdownWithDirective } from '@/app/components/base/markdown-with-directive' - -const markdown1 = ` -We’re refining our messaging for technical teams, like how did you find us and did our positioning truly resonate? - -Share your perspective in a 30-minute chat and receive: - -::::withIconCardList - -:::withIconCardItem {icon="https://assets.dify.ai/images/gift-card.png"} -$100 Amazon gift card -::: - -:::withIconCardItem {icon="https://assets.dify.ai/images/dify-swag.png"} -Dify swag -::: - -:::: -` - -const markdown2 = ` -We’re speaking with technical teams to better understand: - -- How you discovered Dify -- What resonated — and what didn’t -- How we can improve the experience - -::::withIconCardList - -:::withIconCardItem {icon="https://assets.dify.ai/images/gift-card.png"} -$100 Amazon gift card -::: - -:::withIconCardItem {icon="https://assets.dify.ai/images/dify-swag.png"} -Dify swag -::: - -:::: -` - -const inSiteMessageMain = ` -We’re speaking with technical teams to better understand: - -- How you discovered Dify -- What resonated — and what didn’t -- How we can improve the experience - -As a thank-you for your time: - -::::withIconCardList - -:::withIconCardItem {icon="https://assets.dify.ai/images/gift-card.png"} -$100 Amazon gift card -::: - -:::withIconCardItem {icon="https://assets.dify.ai/images/dify-swag.png"} -Exclusive Dify swag -::: - -:::: -` - -export default function RemarkDirectiveTestPage() { - return ( -
-

- remark-directive test page -

-
- -
- -
- -
- - -
- ) -} diff --git a/web/app/components/app/in-site-message.tsx b/web/app/components/app/in-site-message/index.tsx similarity index 96% rename from web/app/components/app/in-site-message.tsx rename to web/app/components/app/in-site-message/index.tsx index 84869672ae..8f1300e2e7 100644 --- a/web/app/components/app/in-site-message.tsx +++ b/web/app/components/app/in-site-message/index.tsx @@ -102,7 +102,7 @@ function InSiteMessage({ -
+
diff --git a/web/app/components/app/in-site-message-notification.tsx b/web/app/components/app/in-site-message/notification.tsx similarity index 95% rename from web/app/components/app/in-site-message-notification.tsx rename to web/app/components/app/in-site-message/notification.tsx index a2b6dedbc6..d1566f46d9 100644 --- a/web/app/components/app/in-site-message-notification.tsx +++ b/web/app/components/app/in-site-message/notification.tsx @@ -1,11 +1,11 @@ 'use client' -import type { InSiteMessageActionItem } from './in-site-message' +import type { InSiteMessageActionItem } from './index' import { useQuery } from '@tanstack/react-query' import { useTranslation } from 'react-i18next' import { IS_CLOUD_EDITION } from '@/config' import { consoleClient, consoleQuery } from '@/service/client' -import InSiteMessage from './in-site-message' +import InSiteMessage from './index' type NotificationBodyPayload = { actions: InSiteMessageActionItem[]