@lobehub/lobehub 2.0.0-next.294 → 2.0.0-next.296
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 +50 -0
- package/apps/desktop/src/main/__mocks__/node-mac-permissions.ts +0 -1
- package/apps/desktop/src/main/__mocks__/setup.ts +0 -1
- package/apps/desktop/src/main/controllers/__tests__/SystemCtr.test.ts +1 -4
- package/apps/desktop/tsconfig.json +4 -10
- package/changelog/v1.json +18 -0
- package/e2e/scripts/setup.ts +45 -32
- package/locales/en-US/plugin.json +4 -0
- package/locales/zh-CN/plugin.json +4 -0
- package/package.json +1 -1
- package/packages/agent-runtime/src/core/__tests__/runtime.test.ts +5 -5
- package/packages/agent-runtime/src/utils/stepContextComputer.test.ts +5 -5
- package/packages/builtin-tool-gtd/src/client/Inspector/index.ts +0 -4
- package/packages/builtin-tool-gtd/src/client/Intervention/AddTodo.tsx +1 -1
- package/packages/builtin-tool-gtd/src/client/Render/TodoList/index.tsx +39 -10
- package/packages/builtin-tool-gtd/src/client/Render/index.ts +0 -2
- package/packages/builtin-tool-gtd/src/client/components/SortableTodoList/TodoItemRow.tsx +26 -12
- package/packages/builtin-tool-gtd/src/client/components/SortableTodoList/store/actions.ts +5 -5
- package/packages/builtin-tool-gtd/src/client/components/SortableTodoList/store/store.test.ts +14 -8
- package/packages/builtin-tool-gtd/src/executor/index.test.ts +48 -227
- package/packages/builtin-tool-gtd/src/executor/index.ts +15 -158
- package/packages/builtin-tool-gtd/src/manifest.ts +12 -42
- package/packages/builtin-tool-gtd/src/systemRole.ts +14 -8
- package/packages/builtin-tool-gtd/src/types.ts +47 -41
- package/packages/builtin-tool-memory/package.json +8 -0
- package/packages/builtin-tool-memory/src/client/Inspector/AddContextMemory/index.tsx +60 -0
- package/packages/builtin-tool-memory/src/client/Inspector/AddExperienceMemory/index.tsx +60 -0
- package/packages/builtin-tool-memory/src/client/Inspector/AddIdentityMemory/index.tsx +60 -0
- package/packages/builtin-tool-memory/src/client/Inspector/AddPreferenceMemory/index.tsx +60 -0
- package/packages/builtin-tool-memory/src/client/Inspector/RemoveIdentityMemory/index.tsx +60 -0
- package/packages/builtin-tool-memory/src/client/Inspector/SearchUserMemory/index.tsx +67 -0
- package/packages/builtin-tool-memory/src/client/Inspector/UpdateIdentityMemory/index.tsx +60 -0
- package/packages/builtin-tool-memory/src/client/Inspector/index.ts +35 -0
- package/packages/builtin-tool-memory/src/client/Intervention/AddExperienceMemory/index.tsx +17 -0
- package/packages/builtin-tool-memory/src/client/Intervention/index.ts +13 -0
- package/packages/builtin-tool-memory/src/client/Render/AddExperienceMemory/index.tsx +17 -0
- package/packages/builtin-tool-memory/src/client/Render/SearchUserMemory/index.tsx +217 -0
- package/packages/builtin-tool-memory/src/client/Render/index.ts +15 -0
- package/packages/builtin-tool-memory/src/client/Streaming/AddExperienceMemory/index.tsx +17 -0
- package/packages/builtin-tool-memory/src/client/Streaming/index.ts +18 -0
- package/packages/builtin-tool-memory/src/client/components/ExperienceMemoryCard.tsx +231 -0
- package/packages/builtin-tool-memory/src/client/components/index.ts +1 -0
- package/packages/builtin-tool-memory/src/client/index.ts +27 -0
- package/packages/builtin-tool-memory/src/executor/index.ts +9 -1
- package/packages/builtin-tool-memory/src/types.ts +61 -0
- package/packages/context-engine/src/providers/GTDTodoInjector.ts +15 -7
- package/packages/conversation-flow/src/__tests__/fixtures/outputs/assistantGroup/tools-with-branches.json +4 -0
- package/packages/conversation-flow/src/transformation/FlatListBuilder.ts +1 -0
- package/packages/database/src/models/__tests__/knowledgeBase.test.ts +1 -1
- package/packages/database/src/repositories/knowledge/index.ts +1 -4
- package/packages/prompts/src/prompts/gtd/index.test.ts +32 -16
- package/packages/prompts/src/prompts/gtd/index.ts +9 -5
- package/packages/types/src/discover/assistants.ts +2 -2
- package/packages/types/src/stepContext.ts +4 -1
- package/scripts/migrate-spa-navigation.ts +129 -0
- package/src/app/(backend)/api/workflows/memory-user-memory/pipelines/chat-topic/process-topics/route.ts +112 -109
- package/src/app/(backend)/api/workflows/memory-user-memory/pipelines/chat-topic/process-user-topics/route.ts +125 -113
- package/src/app/(backend)/api/workflows/memory-user-memory/pipelines/chat-topic/process-users/route.ts +74 -65
- package/src/app/[variants]/(auth)/auth-error/page.tsx +1 -1
- package/src/app/[variants]/(auth)/login/[[...login]]/page.tsx +1 -1
- package/src/app/[variants]/(auth)/next-auth/error/AuthErrorPage.tsx +1 -1
- package/src/app/[variants]/(auth)/next-auth/signin/AuthSignInBox.tsx +1 -1
- package/src/app/[variants]/(auth)/oauth/callback/error/page.tsx +1 -1
- package/src/app/[variants]/(auth)/oauth/callback/success/page.tsx +1 -1
- package/src/app/[variants]/(auth)/oauth/consent/[uid]/page.tsx +1 -1
- package/src/app/[variants]/(auth)/reset-password/layout.tsx +1 -1
- package/src/app/[variants]/(auth)/reset-password/page.tsx +2 -2
- package/src/app/[variants]/(auth)/signin/layout.tsx +1 -1
- package/src/app/[variants]/(auth)/signin/useSignIn.ts +1 -1
- package/src/app/[variants]/(auth)/signup/[[...signup]]/BetterAuthSignUpForm.tsx +2 -2
- package/src/app/[variants]/(auth)/signup/[[...signup]]/page.tsx +1 -1
- package/src/app/[variants]/(auth)/signup/[[...signup]]/useSignUp.tsx +1 -1
- package/src/app/[variants]/(auth)/verify-email/layout.tsx +1 -1
- package/src/app/[variants]/(auth)/verify-email/page.tsx +2 -2
- package/src/app/[variants]/(main)/_layout/index.tsx +1 -1
- package/src/app/[variants]/(main)/agent/_layout/Sidebar/Cron/CronTopicGroup.tsx +1 -1
- package/src/app/[variants]/(main)/agent/_layout/Sidebar/Header/AddTopicButon.tsx +1 -1
- package/src/app/[variants]/(main)/agent/_layout/Sidebar/Header/Nav.tsx +1 -1
- package/src/app/[variants]/(main)/agent/_layout/Sidebar/Topic/AllTopicsDrawer/index.tsx +1 -1
- package/src/app/[variants]/(main)/agent/_layout/Sidebar/Topic/hooks/useThreadNavigation.ts +1 -1
- package/src/app/[variants]/(main)/agent/_layout/Sidebar/Topic/hooks/useTopicNavigation.ts +1 -1
- package/src/app/[variants]/(main)/agent/features/TelemetryNotification.tsx +2 -3
- package/src/app/[variants]/(main)/community/(detail)/assistant/features/Details/Nav.tsx +9 -9
- package/src/app/[variants]/(main)/community/(detail)/assistant/features/Details/Versions/index.tsx +2 -3
- package/src/app/[variants]/(main)/community/(detail)/features/MakedownRender.tsx +1 -2
- package/src/app/[variants]/(main)/community/(detail)/features/ShareButton.tsx +2 -3
- package/src/app/[variants]/(main)/community/(detail)/features/Toc/Heading.tsx +2 -3
- package/src/app/[variants]/(main)/community/(detail)/mcp/features/Details/Versions/index.tsx +2 -2
- package/src/app/[variants]/(main)/community/(detail)/model/features/Details/Nav.tsx +12 -11
- package/src/app/[variants]/(main)/community/(detail)/model/features/Details/Parameter/ParameterItem.tsx +2 -3
- package/src/app/[variants]/(main)/community/(detail)/provider/features/Details/Nav.tsx +11 -10
- package/src/app/[variants]/(main)/community/(detail)/provider/features/Header.tsx +10 -9
- package/src/app/[variants]/(main)/community/(list)/(home)/index.tsx +1 -1
- package/src/app/[variants]/(main)/community/(list)/assistant/features/Category/useCategory.tsx +1 -1
- package/src/app/[variants]/(main)/community/(list)/features/SortButton/index.tsx +2 -3
- package/src/app/[variants]/(main)/community/_layout/Sidebar/Header/Nav.tsx +1 -1
- package/src/app/[variants]/(main)/community/features/CreateButton/Inner.tsx +1 -1
- package/src/app/[variants]/(main)/community/features/CreateButton/index.tsx +1 -1
- package/src/app/[variants]/(main)/community/features/Search.tsx +1 -2
- package/src/app/[variants]/(main)/community/features/Title.tsx +5 -5
- package/src/app/[variants]/(main)/group/_layout/Sidebar/Header/Nav.tsx +1 -1
- package/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/AllTopicsDrawer/index.tsx +1 -1
- package/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/hooks/useThreadNavigation.ts +1 -1
- package/src/app/[variants]/(main)/group/features/Conversation/Header/ShareButton/index.tsx +1 -1
- package/src/app/[variants]/(main)/group/features/TelemetryNotification.tsx +2 -3
- package/src/app/[variants]/(main)/home/_layout/Body/Agent/AllAgentsDrawer/index.tsx +1 -1
- package/src/app/[variants]/(main)/hooks/useActiveTabKey.ts +6 -11
- package/src/app/[variants]/(main)/image/NotSupportClient.tsx +4 -3
- package/src/app/[variants]/(main)/image/_layout/ConfigPanel/components/ImageUpload.tsx +1 -1
- package/src/app/[variants]/(main)/image/_layout/ConfigPanel/components/MultiImagesUpload/ImageManageModal.tsx +1 -1
- package/src/app/[variants]/(main)/image/_layout/ConfigPanel/components/MultiImagesUpload/index.tsx +1 -1
- package/src/app/[variants]/(main)/memory/(home)/features/RoleTagCloud/index.tsx +1 -1
- package/src/app/[variants]/(main)/memory/_layout/Sidebar/Header/Nav.tsx +1 -1
- package/src/app/[variants]/(main)/memory/features/SourceLink.tsx +1 -1
- package/src/app/[variants]/(main)/page/_layout/Body/AllPagesDrawer/index.tsx +1 -1
- package/src/app/[variants]/(main)/resource/features/DndContextWrapper.tsx +4 -2
- package/src/app/[variants]/(main)/resource/library/_layout/Header/LibraryHead.tsx +30 -35
- package/src/app/[variants]/(main)/resource/library/_layout/Header/index.tsx +9 -11
- package/src/app/[variants]/(main)/settings/about/features/ItemCard.tsx +2 -3
- package/src/app/[variants]/(main)/settings/about/features/ItemLink.tsx +2 -3
- package/src/app/[variants]/(main)/settings/about/features/Version.tsx +6 -7
- package/src/app/[variants]/(main)/settings/features/SettingsContent.tsx +1 -1
- package/src/app/[variants]/(main)/settings/features/UpgradeAlert.tsx +4 -4
- package/src/app/[variants]/(main)/settings/provider/(list)/Footer.tsx +2 -2
- package/src/app/[variants]/(main)/settings/provider/detail/index.tsx +1 -1
- package/src/app/[variants]/(main)/settings/provider/detail/ollama/CheckError.tsx +1 -1
- package/src/app/[variants]/(main)/settings/provider/features/ProviderConfig/index.tsx +12 -6
- package/src/app/[variants]/(main)/settings/security/index.tsx +1 -1
- package/src/app/[variants]/(main)/settings/stats/features/overview/ShareButton/ShareModal.tsx +1 -1
- package/src/app/[variants]/(main)/settings/stats/features/rankings/AssistantsRank.tsx +1 -1
- package/src/app/[variants]/(main)/settings/stats/features/rankings/TopicsRank.tsx +1 -1
- package/src/app/[variants]/(mobile)/_layout/index.tsx +1 -1
- package/src/app/[variants]/(mobile)/chat/settings/features/AgentInfoDescription/index.tsx +1 -1
- package/src/app/[variants]/(mobile)/chat/settings/features/SettingButton.tsx +1 -1
- package/src/app/[variants]/(mobile)/router/index.tsx +1 -1
- package/src/app/[variants]/page.tsx +1 -1
- package/src/app/[variants]/router/index.tsx +1 -1
- package/src/components/404/index.tsx +4 -4
- package/src/components/Analytics/index.tsx +1 -1
- package/src/components/BrandWatermark/index.tsx +4 -4
- package/src/components/Branding/ProductLogo/Custom.tsx +1 -1
- package/src/components/Error/index.tsx +3 -4
- package/src/components/GoBack/index.tsx +2 -2
- package/src/components/LabsModal/LabCard.tsx +1 -1
- package/src/components/Link.tsx +25 -5
- package/src/components/OllamaSetupGuide/index.tsx +5 -4
- package/src/components/WebFavicon/index.tsx +1 -1
- package/src/components/client/ClientResponsiveContent/index.tsx +1 -1
- package/src/components/client/ClientResponsiveLayout.tsx +1 -1
- package/src/components/mdx/Image.tsx +1 -1
- package/src/components/mdx/Link.tsx +26 -9
- package/src/features/AlertBanner/CloudBanner.tsx +2 -3
- package/src/features/ChatInput/ActionBar/Model/ControlsForm.tsx +8 -7
- package/src/features/ChatInput/ActionBar/Params/Controls.tsx +1 -3
- package/src/features/ChatInput/ActionBar/Token/index.tsx +1 -1
- package/src/features/ChatInput/Mobile/index.tsx +1 -1
- package/src/features/Conversation/ChatItem/components/MessageContent/index.tsx +1 -1
- package/src/features/Conversation/Error/OllamaBizError/index.tsx +1 -1
- package/src/features/Conversation/Error/OllamaSetupGuide/Desktop.tsx +1 -2
- package/src/features/Conversation/Error/index.tsx +1 -1
- package/src/features/Conversation/Messages/AssistantGroup/Tool/Actions/Settings.tsx +1 -1
- package/src/features/Conversation/Messages/AssistantGroup/Tool/Actions/index.tsx +11 -17
- package/src/features/Conversation/Messages/AssistantGroup/Tool/{Render → Detail}/LoadingPlaceholder/index.tsx +13 -3
- package/src/features/Conversation/Messages/AssistantGroup/Tool/Detail/Render/CustomRender.tsx +43 -0
- package/src/features/Conversation/Messages/AssistantGroup/Tool/Detail/Render/FallbacktArgumentRender.tsx +59 -0
- package/src/features/Conversation/Messages/AssistantGroup/Tool/Detail/Render/index.tsx +46 -0
- package/src/features/Conversation/Messages/AssistantGroup/Tool/{Render → Detail}/index.tsx +13 -19
- package/src/features/Conversation/Messages/AssistantGroup/Tool/index.tsx +18 -18
- package/src/features/Conversation/Messages/AssistantGroup/index.tsx +1 -1
- package/src/features/Conversation/Messages/Tool/Tool/index.tsx +11 -10
- package/src/features/Conversation/Messages/components/SearchGrounding.tsx +1 -1
- package/src/features/Conversation/TodoProgress/index.tsx +56 -23
- package/src/features/DataImporter/Error.tsx +3 -3
- package/src/features/DevPanel/CacheViewer/cacheProvider.tsx +2 -1
- package/src/features/DevPanel/MetadataViewer/Og.tsx +1 -1
- package/src/features/DevPanel/features/FloatPanel.tsx +1 -1
- package/src/features/DevPanel/features/Table/TooltipContent.tsx +3 -4
- package/src/features/DevPanel/index.tsx +1 -1
- package/src/features/EditorCanvas/InlineToolbar.tsx +1 -6
- package/src/features/FileViewer/NotSupport/index.tsx +2 -3
- package/src/features/Follow/index.tsx +8 -9
- package/src/features/LibraryModal/AddFilesToKnowledgeBase/SelectForm.tsx +2 -2
- package/src/features/MCP/Scores.tsx +1 -1
- package/src/features/MCPPluginDetail/Nav.tsx +8 -8
- package/src/features/MCPPluginDetail/Overview/TagList.tsx +1 -1
- package/src/features/MobileTabBar/index.tsx +2 -1
- package/src/features/OllamaSetupGuide/Desktop.tsx +1 -2
- package/src/features/PWAInstall/Install.tsx +1 -1
- package/src/features/PWAInstall/index.tsx +1 -1
- package/src/features/PluginStore/McpList/index.tsx +1 -1
- package/src/features/PluginStore/PluginList/Detail/Header.tsx +6 -6
- package/src/features/PluginsUI/Render/DefaultType/index.tsx +1 -1
- package/src/features/PluginsUI/Render/MCPType/index.tsx +1 -1
- package/src/features/Portal/Artifacts/Body/Renderer/index.tsx +1 -1
- package/src/features/ResourceManager/components/ChunkDrawer/index.tsx +1 -1
- package/src/features/ResourceManager/components/Explorer/Header/index.tsx +57 -4
- package/src/features/ResourceManager/components/Explorer/ListView/ListItem/index.tsx +6 -4
- package/src/features/ResourceManager/components/Explorer/ListView/Skeleton.tsx +26 -26
- package/src/features/ResourceManager/components/Explorer/ListView/index.tsx +16 -5
- package/src/features/ResourceManager/components/Explorer/ToolBar/BatchActionsDropdown.tsx +147 -149
- package/src/features/ResourceManager/components/LibraryHierarchy/styles.ts +5 -4
- package/src/features/ResourceManager/index.tsx +1 -1
- package/src/features/Setting/Footer.tsx +4 -5
- package/src/features/User/UserPanel/PanelContent.tsx +1 -1
- package/src/hooks/useActiveTabKey.ts +6 -4
- package/src/hooks/useIsSingleMode.test.ts +10 -24
- package/src/hooks/useIsSingleMode.ts +4 -2
- package/src/hooks/useIsSubSlug.ts +2 -1
- package/src/hooks/useQuery.ts +5 -5
- package/src/layout/GlobalProvider/AppTheme.tsx +2 -2
- package/src/layout/GlobalProvider/StyleRegistry.tsx +1 -1
- package/src/layout/GlobalProvider/useUserStateRedirect.ts +13 -25
- package/src/libs/next/Image.tsx +13 -0
- package/src/libs/next/Link.tsx +13 -0
- package/src/libs/next/dynamic.tsx +13 -0
- package/src/libs/next/index.ts +22 -0
- package/src/libs/next/navigation.ts +22 -0
- package/src/libs/router/Link.tsx +30 -0
- package/src/libs/router/index.ts +18 -0
- package/src/libs/router/navigation.ts +72 -0
- package/src/locales/default/plugin.ts +1 -0
- package/src/server/modules/AgentRuntime/AgentStateManager.ts +5 -1
- package/src/store/chat/slices/message/selectors/dbMessage.test.ts +11 -11
- package/src/store/chat/slices/portal/selectors.test.ts +5 -15
- package/src/store/file/slices/resource/action.ts +4 -2
- package/src/store/page/index.ts +1 -1
- package/src/store/page/slices/crud/index.ts +1 -1
- package/src/tools/inspectors.ts +2 -0
- package/src/tools/interventions.ts +2 -0
- package/src/tools/renders.ts +3 -1
- package/src/tools/streamings.ts +2 -0
- package/packages/builtin-tool-gtd/src/client/Inspector/CompleteTodos/index.tsx +0 -52
- package/packages/builtin-tool-gtd/src/client/Inspector/RemoveTodos/index.tsx +0 -52
- package/src/app/[variants]/(main)/hooks/usePathname.ts +0 -10
- package/src/app/[variants]/(main)/hooks/useQuery.ts +0 -12
- package/src/app/[variants]/(main)/hooks/useRouter.ts +0 -22
- package/src/app/[variants]/(main)/hooks/useSearchParams.ts +0 -11
- package/src/features/Conversation/Messages/AssistantGroup/Tool/Render/CustomRender.tsx +0 -113
- package/src/features/Conversation/Messages/Tool/Tool/Render.tsx +0 -47
- /package/src/features/Conversation/Messages/AssistantGroup/Tool/{Render → Detail}/AbortResponse.tsx +0 -0
- /package/src/features/Conversation/Messages/AssistantGroup/Tool/{Render → Detail}/Arguments/index.tsx +0 -0
- /package/src/features/Conversation/Messages/AssistantGroup/Tool/{Render → Detail}/ErrorResponse.tsx +0 -0
- /package/src/features/Conversation/Messages/AssistantGroup/Tool/{Render → Detail}/Intervention/ApprovalActions.tsx +0 -0
- /package/src/features/Conversation/Messages/AssistantGroup/Tool/{Render → Detail}/Intervention/Fallback.tsx +0 -0
- /package/src/features/Conversation/Messages/AssistantGroup/Tool/{Render → Detail}/Intervention/KeyValueEditor.tsx +0 -0
- /package/src/features/Conversation/Messages/AssistantGroup/Tool/{Render → Detail}/Intervention/ModeSelector.tsx +0 -0
- /package/src/features/Conversation/Messages/AssistantGroup/Tool/{Render → Detail}/Intervention/index.tsx +0 -0
- /package/src/features/Conversation/Messages/AssistantGroup/Tool/{Render → Detail}/PluginSettings.tsx +0 -0
- /package/src/features/Conversation/Messages/AssistantGroup/Tool/{Render → Detail}/RejectedResponse.tsx +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Block, Icon } from '@lobehub/ui';
|
|
2
2
|
import { cssVar } from 'antd-style';
|
|
3
3
|
import { type LucideIcon } from 'lucide-react';
|
|
4
|
-
import Link from 'next/link';
|
|
5
4
|
import { memo } from 'react';
|
|
6
5
|
|
|
7
6
|
export interface ItemCardProps {
|
|
@@ -13,12 +12,12 @@ export interface ItemCardProps {
|
|
|
13
12
|
|
|
14
13
|
const ItemCard = memo<ItemCardProps>(({ label, icon, href }) => {
|
|
15
14
|
return (
|
|
16
|
-
<
|
|
15
|
+
<a href={href} rel="noreferrer" style={{ color: 'inherit' }} target="_blank">
|
|
17
16
|
<Block clickable gap={12} horizontal paddingBlock={12} paddingInline={18}>
|
|
18
17
|
{icon && <Icon fill={cssVar.colorText} icon={icon} size={18} />}
|
|
19
18
|
{label}
|
|
20
19
|
</Block>
|
|
21
|
-
</
|
|
20
|
+
</a>
|
|
22
21
|
);
|
|
23
22
|
});
|
|
24
23
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Flexbox, Icon } from '@lobehub/ui';
|
|
2
2
|
import { cssVar } from 'antd-style';
|
|
3
3
|
import { type LucideIcon, SquareArrowOutUpRight } from 'lucide-react';
|
|
4
|
-
import Link from 'next/link';
|
|
5
4
|
import { memo } from 'react';
|
|
6
5
|
|
|
7
6
|
export interface ItemLinkProps {
|
|
@@ -13,12 +12,12 @@ export interface ItemLinkProps {
|
|
|
13
12
|
|
|
14
13
|
const ItemLink = memo<ItemLinkProps>(({ label, href }) => {
|
|
15
14
|
return (
|
|
16
|
-
<
|
|
15
|
+
<a href={href} rel="noreferrer" style={{ color: 'inherit' }} target="_blank">
|
|
17
16
|
<Flexbox align={'center'} gap={8} horizontal>
|
|
18
17
|
{label}
|
|
19
18
|
<Icon color={cssVar.colorTextDescription} icon={SquareArrowOutUpRight} size={14} />
|
|
20
19
|
</Flexbox>
|
|
21
|
-
</
|
|
20
|
+
</a>
|
|
22
21
|
);
|
|
23
22
|
});
|
|
24
23
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BRANDING_NAME } from '@lobechat/business-const';
|
|
2
2
|
import { Block, Button, Flexbox, Tag } from '@lobehub/ui';
|
|
3
3
|
import { createStaticStyles } from 'antd-style';
|
|
4
|
-
import Link from 'next/link';
|
|
5
4
|
import { memo } from 'react';
|
|
6
5
|
import { useTranslation } from 'react-i18next';
|
|
7
6
|
|
|
@@ -31,7 +30,7 @@ const Version = memo<{ mobile?: boolean }>(({ mobile }) => {
|
|
|
31
30
|
width={'100%'}
|
|
32
31
|
>
|
|
33
32
|
<Flexbox align={'center'} flex={'none'} gap={16} horizontal>
|
|
34
|
-
<
|
|
33
|
+
<a href={OFFICIAL_SITE} rel="noreferrer" target="_blank">
|
|
35
34
|
<Block
|
|
36
35
|
align={'center'}
|
|
37
36
|
className={styles.logo}
|
|
@@ -42,7 +41,7 @@ const Version = memo<{ mobile?: boolean }>(({ mobile }) => {
|
|
|
42
41
|
>
|
|
43
42
|
<ProductLogo size={52} />
|
|
44
43
|
</Block>
|
|
45
|
-
</
|
|
44
|
+
</a>
|
|
46
45
|
<Flexbox align={'flex-start'} gap={6}>
|
|
47
46
|
<div style={{ fontSize: 18, fontWeight: 'bolder' }}>{BRANDING_NAME}</div>
|
|
48
47
|
<Flexbox gap={6} horizontal={!mobile}>
|
|
@@ -56,15 +55,15 @@ const Version = memo<{ mobile?: boolean }>(({ mobile }) => {
|
|
|
56
55
|
</Flexbox>
|
|
57
56
|
</Flexbox>
|
|
58
57
|
<Flexbox flex={mobile ? 1 : undefined} gap={8} horizontal>
|
|
59
|
-
<
|
|
58
|
+
<a href={CHANGELOG_URL} rel="noreferrer" style={{ flex: 1 }} target="_blank">
|
|
60
59
|
<Button block={mobile}>{t('changelog')}</Button>
|
|
61
|
-
</
|
|
60
|
+
</a>
|
|
62
61
|
{hasNewVersion && (
|
|
63
|
-
<
|
|
62
|
+
<a href={MANUAL_UPGRADE_URL} rel="noreferrer" style={{ flex: 1 }} target="_blank">
|
|
64
63
|
<Button block={mobile} type={'primary'}>
|
|
65
64
|
{t('upgradeVersion.action')}
|
|
66
65
|
</Button>
|
|
67
|
-
</
|
|
66
|
+
</a>
|
|
68
67
|
)}
|
|
69
68
|
</Flexbox>
|
|
70
69
|
</Flexbox>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { ENABLE_BUSINESS_FEATURES } from '@lobechat/business-const';
|
|
4
|
-
import dynamic from 'next/dynamic';
|
|
4
|
+
import dynamic from '@/libs/next/dynamic';
|
|
5
5
|
import { Fragment } from 'react';
|
|
6
6
|
|
|
7
7
|
import Loading from '@/components/Loading/BrandTextLoading';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { Alert, Button, Flexbox } from '@lobehub/ui';
|
|
4
|
-
import Link from 'next/link';
|
|
5
4
|
import { memo } from 'react';
|
|
6
5
|
import { useTranslation } from 'react-i18next';
|
|
7
6
|
|
|
@@ -20,16 +19,17 @@ const UpgradeAlert = memo(() => {
|
|
|
20
19
|
title={
|
|
21
20
|
<Flexbox gap={8}>
|
|
22
21
|
<p>{t('upgradeVersion.newVersion', { version: `v${latestVersion}` })}</p>
|
|
23
|
-
<
|
|
22
|
+
<a
|
|
24
23
|
aria-label={t('upgradeVersion.action')}
|
|
25
24
|
href={MANUAL_UPGRADE_URL}
|
|
25
|
+
rel="noreferrer"
|
|
26
26
|
style={{ marginBottom: 6 }}
|
|
27
|
-
target=
|
|
27
|
+
target="_blank"
|
|
28
28
|
>
|
|
29
29
|
<Button block size={'small'} type={'primary'}>
|
|
30
30
|
{t('upgradeVersion.action')}
|
|
31
31
|
</Button>
|
|
32
|
-
</
|
|
32
|
+
</a>
|
|
33
33
|
</Flexbox>
|
|
34
34
|
}
|
|
35
35
|
type={'info'}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { Center } from '@lobehub/ui';
|
|
4
4
|
import { cssVar } from 'antd-style';
|
|
5
|
-
import Link from 'next/link';
|
|
6
5
|
import { memo } from 'react';
|
|
7
6
|
import { Trans, useTranslation } from 'react-i18next';
|
|
8
7
|
|
|
@@ -24,10 +23,11 @@ const Footer = memo(() => {
|
|
|
24
23
|
<Trans
|
|
25
24
|
components={[
|
|
26
25
|
<span key="0" />,
|
|
27
|
-
<
|
|
26
|
+
<a
|
|
28
27
|
aria-label={t('llm.waitingForMoreLinkAriaLabel')}
|
|
29
28
|
href={MORE_MODEL_PROVIDER_REQUEST_URL}
|
|
30
29
|
key="1"
|
|
30
|
+
rel="noreferrer"
|
|
31
31
|
target="_blank"
|
|
32
32
|
/>,
|
|
33
33
|
]}
|
|
@@ -16,7 +16,6 @@ import { useDebounceFn } from 'ahooks';
|
|
|
16
16
|
import { Form as AntdForm, Switch } from 'antd';
|
|
17
17
|
import { createStaticStyles, cssVar, cx, responsive } from 'antd-style';
|
|
18
18
|
import { Loader2Icon, LockIcon } from 'lucide-react';
|
|
19
|
-
import Link from 'next/link';
|
|
20
19
|
import { type ReactNode, memo, useCallback, useLayoutEffect, useRef } from 'react';
|
|
21
20
|
import { Trans, useTranslation } from 'react-i18next';
|
|
22
21
|
import urlJoin from 'url-join';
|
|
@@ -261,7 +260,7 @@ const ProviderConfig = memo<ProviderConfigProps>(
|
|
|
261
260
|
<span key="0" />,
|
|
262
261
|
<span key="1" />,
|
|
263
262
|
<span key="2" />,
|
|
264
|
-
<
|
|
263
|
+
<a href={apiKeyUrl} key="3" rel="noreferrer" target="_blank" />,
|
|
265
264
|
]}
|
|
266
265
|
i18nKey="providerModels.config.apiKey.descWithUrl"
|
|
267
266
|
ns={'modelProvider'}
|
|
@@ -282,7 +281,13 @@ const ProviderConfig = memo<ProviderConfigProps>(
|
|
|
282
281
|
<Trans
|
|
283
282
|
components={[
|
|
284
283
|
<span key="0" />,
|
|
285
|
-
<
|
|
284
|
+
<a
|
|
285
|
+
href={AES_GCM_URL}
|
|
286
|
+
key="1"
|
|
287
|
+
rel="noreferrer"
|
|
288
|
+
style={{ marginInline: 4 }}
|
|
289
|
+
target="_blank"
|
|
290
|
+
/>,
|
|
286
291
|
]}
|
|
287
292
|
i18nKey="providerModels.config.aesGcm"
|
|
288
293
|
ns={'modelProvider'}
|
|
@@ -437,15 +442,16 @@ const ProviderConfig = memo<ProviderConfigProps>(
|
|
|
437
442
|
<>
|
|
438
443
|
{title ?? <ProviderCombine provider={id} size={24} />}
|
|
439
444
|
<Tooltip title={t('providerModels.config.helpDoc')}>
|
|
440
|
-
<
|
|
445
|
+
<a
|
|
441
446
|
href={urlJoin(BASE_PROVIDER_DOC_URL, id)}
|
|
442
447
|
onClick={(e) => e.stopPropagation()}
|
|
443
|
-
|
|
448
|
+
rel="noreferrer"
|
|
449
|
+
target="_blank"
|
|
444
450
|
>
|
|
445
451
|
<Center className={styles.help} height={20} width={20}>
|
|
446
452
|
?
|
|
447
453
|
</Center>
|
|
448
|
-
</
|
|
454
|
+
</a>
|
|
449
455
|
</Tooltip>
|
|
450
456
|
</>
|
|
451
457
|
)}
|
package/src/app/[variants]/(main)/settings/stats/features/overview/ShareButton/ShareModal.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { type FormItemProps, FormModal, type FormModalProps, Segmented } from '@lobehub/ui';
|
|
4
4
|
import { Skeleton } from '@lobehub/ui';
|
|
5
5
|
import { createStaticStyles } from 'antd-style';
|
|
6
|
-
import dynamic from 'next/dynamic';
|
|
6
|
+
import dynamic from '@/libs/next/dynamic';
|
|
7
7
|
import { memo, useState } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BarList } from '@lobehub/charts';
|
|
2
2
|
import { ActionIcon, Avatar, Modal } from '@lobehub/ui';
|
|
3
3
|
import { MaximizeIcon } from 'lucide-react';
|
|
4
|
-
import Link from '
|
|
4
|
+
import Link from '@/libs/router/Link';
|
|
5
5
|
import qs from 'query-string';
|
|
6
6
|
import { memo, useState } from 'react';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
@@ -2,7 +2,7 @@ import { BarList } from '@lobehub/charts';
|
|
|
2
2
|
import { ActionIcon, Icon, Modal } from '@lobehub/ui';
|
|
3
3
|
import { cssVar } from 'antd-style';
|
|
4
4
|
import { MaximizeIcon, MessageSquareIcon } from 'lucide-react';
|
|
5
|
-
import Link from '
|
|
5
|
+
import Link from '@/libs/router/Link';
|
|
6
6
|
import qs from 'query-string';
|
|
7
7
|
import { memo, useState } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { ProDescriptions } from '@ant-design/pro-components';
|
|
4
4
|
import { type AgentItemDetail } from '@lobehub/market-sdk';
|
|
5
5
|
import { Flexbox, Tag } from '@lobehub/ui';
|
|
6
|
-
import Image from 'next/
|
|
6
|
+
import Image from '@/libs/next/Image';
|
|
7
7
|
import { memo } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
9
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import { ActionIcon } from '@lobehub/ui';
|
|
4
4
|
import { AlignJustify } from 'lucide-react';
|
|
5
|
-
import dynamic from 'next/dynamic';
|
|
6
5
|
import { memo } from 'react';
|
|
7
6
|
import { useTranslation } from 'react-i18next';
|
|
8
7
|
|
|
9
8
|
import { DESKTOP_HEADER_ICON_SIZE, MOBILE_HEADER_ICON_SIZE } from '@/const/layoutTokens';
|
|
10
9
|
import { useOpenChatSettings } from '@/hooks/useInterceptingRoutes';
|
|
10
|
+
import dynamic from '@/libs/next/dynamic';
|
|
11
11
|
import { useSessionStore } from '@/store/session';
|
|
12
12
|
import { useUserStore } from '@/store/user';
|
|
13
13
|
import { settingsSelectors } from '@/store/user/selectors';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { Button, Flexbox, FluentEmoji } from '@lobehub/ui';
|
|
4
|
-
import Link from 'next/link';
|
|
5
4
|
import { memo } from 'react';
|
|
6
5
|
import { useTranslation } from 'react-i18next';
|
|
7
6
|
|
|
@@ -32,9 +31,10 @@ const NotFound = memo(() => {
|
|
|
32
31
|
<div>{t('notFound.desc')}</div>
|
|
33
32
|
<div style={{ marginTop: '0.5em' }}>{t('notFound.check')}</div>
|
|
34
33
|
</div>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
|
|
35
|
+
<Button onClick={() => (window.location.href = '/')} type={'primary'}>
|
|
36
|
+
{t('notFound.backHome')}
|
|
37
|
+
</Button>
|
|
38
38
|
</Flexbox>
|
|
39
39
|
);
|
|
40
40
|
});
|
|
@@ -4,7 +4,6 @@ import { ORG_NAME, UTM_SOURCE } from '@lobechat/business-const';
|
|
|
4
4
|
import { Flexbox, type FlexboxProps } from '@lobehub/ui';
|
|
5
5
|
import { LobeHub } from '@lobehub/ui/brand';
|
|
6
6
|
import { createStaticStyles, cssVar } from 'antd-style';
|
|
7
|
-
import Link from 'next/link';
|
|
8
7
|
import { memo } from 'react';
|
|
9
8
|
|
|
10
9
|
import { isCustomORG } from '@/const/version';
|
|
@@ -35,13 +34,14 @@ const BrandWatermark = memo<Omit<FlexboxProps, 'children'>>(({ style, ...rest })
|
|
|
35
34
|
{isCustomORG ? (
|
|
36
35
|
<span>{ORG_NAME}</span>
|
|
37
36
|
) : (
|
|
38
|
-
<
|
|
37
|
+
<a
|
|
39
38
|
className={styles.logoLink}
|
|
40
39
|
href={`https://lobehub.com?utm_source=${UTM_SOURCE}&utm_content=brand_watermark`}
|
|
41
|
-
|
|
40
|
+
rel="noreferrer"
|
|
41
|
+
target="_blank"
|
|
42
42
|
>
|
|
43
43
|
<LobeHub size={20} type={'text'} />
|
|
44
|
-
</
|
|
44
|
+
</a>
|
|
45
45
|
)}
|
|
46
46
|
</Flexbox>
|
|
47
47
|
);
|
|
@@ -3,7 +3,7 @@ import type { IconType } from '@lobehub/icons';
|
|
|
3
3
|
import { Flexbox, type FlexboxProps } from '@lobehub/ui';
|
|
4
4
|
import type { LobeChatProps } from '@lobehub/ui/brand';
|
|
5
5
|
import { createStaticStyles, cssVar } from 'antd-style';
|
|
6
|
-
import Image, { type ImageProps } from 'next/
|
|
6
|
+
import Image, { type ImageProps } from '@/libs/next/Image';
|
|
7
7
|
import { type ReactNode, forwardRef, memo } from 'react';
|
|
8
8
|
|
|
9
9
|
const styles = createStaticStyles(({ css }) => {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { Button, Flexbox, FluentEmoji } from '@lobehub/ui';
|
|
4
|
-
import Link from 'next/link';
|
|
5
4
|
import { memo } from 'react';
|
|
6
5
|
import { useTranslation } from 'react-i18next';
|
|
7
6
|
|
|
@@ -39,9 +38,9 @@ const ErrorCapture = memo<ErrorCaptureProps>(({ reset }) => {
|
|
|
39
38
|
<p style={{ marginBottom: '2em' }}>{t('error.desc')}</p>
|
|
40
39
|
<Flexbox gap={12} horizontal style={{ marginBottom: '1em' }}>
|
|
41
40
|
<Button onClick={() => reset()}>{t('error.retry')}</Button>
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
</
|
|
41
|
+
<Button onClick={() => (window.location.href = '/')} type={'primary'}>
|
|
42
|
+
{t('error.backHome')}
|
|
43
|
+
</Button>
|
|
45
44
|
</Flexbox>
|
|
46
45
|
</Flexbox>
|
|
47
46
|
);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Flexbox, Icon } from '@lobehub/ui';
|
|
2
2
|
import { createStaticStyles, cssVar } from 'antd-style';
|
|
3
3
|
import { ArrowLeft } from 'lucide-react';
|
|
4
|
-
import Link from 'next/link';
|
|
5
4
|
import { memo } from 'react';
|
|
6
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
+
import { Link } from 'react-router-dom';
|
|
7
7
|
|
|
8
8
|
const styles = createStaticStyles(({ css }) => {
|
|
9
9
|
return {
|
|
@@ -31,7 +31,7 @@ const GoBack = memo<GoBackProps>(({ href }) => {
|
|
|
31
31
|
const { t } = useTranslation('components');
|
|
32
32
|
|
|
33
33
|
return (
|
|
34
|
-
<Link
|
|
34
|
+
<Link to={href}>
|
|
35
35
|
<Flexbox align={'center'} className={styles.container} gap={4} horizontal>
|
|
36
36
|
<Icon icon={ArrowLeft} />
|
|
37
37
|
<div>{t('GoBack.back')}</div>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { Flexbox } from '@lobehub/ui';
|
|
4
4
|
import { Switch } from 'antd';
|
|
5
5
|
import { createStaticStyles, cssVar } from 'antd-style';
|
|
6
|
-
import Image from 'next/
|
|
6
|
+
import Image from '@/libs/next/Image';
|
|
7
7
|
import { type PropsWithChildren, memo } from 'react';
|
|
8
8
|
|
|
9
9
|
import { SkeletonSwitch } from '@/components/Skeleton';
|
package/src/components/Link.tsx
CHANGED
|
@@ -1,12 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import React, { type AnchorHTMLAttributes, memo } from 'react';
|
|
2
|
+
import { Link as RouterLink } from 'react-router-dom';
|
|
3
3
|
|
|
4
|
-
interface LinkProps extends
|
|
4
|
+
interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
5
5
|
children?: React.ReactNode | undefined;
|
|
6
|
+
href?: string;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Smart Link component for global use.
|
|
11
|
+
* - External links (http://, https://) → native <a> tag
|
|
12
|
+
* - Internal routes → React Router Link
|
|
13
|
+
*/
|
|
14
|
+
const Link = memo<LinkProps>(({ href, children, ...props }) => {
|
|
15
|
+
// External links use native <a> tag
|
|
16
|
+
if (href?.startsWith('http://') || href?.startsWith('https://')) {
|
|
17
|
+
return (
|
|
18
|
+
<a href={href} rel="noreferrer" {...props}>
|
|
19
|
+
{children}
|
|
20
|
+
</a>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Internal routes use React Router Link
|
|
25
|
+
return (
|
|
26
|
+
<RouterLink to={href || '/'} {...props}>
|
|
27
|
+
{children}
|
|
28
|
+
</RouterLink>
|
|
29
|
+
);
|
|
10
30
|
});
|
|
11
31
|
|
|
12
32
|
export default Link;
|
|
@@ -2,7 +2,6 @@ import { ProviderCombine } from '@lobehub/icons';
|
|
|
2
2
|
import { Flexbox, Highlighter, Snippet, Tabs } from '@lobehub/ui';
|
|
3
3
|
import { Steps } from 'antd';
|
|
4
4
|
import { createStaticStyles, cssVar } from 'antd-style';
|
|
5
|
-
import Link from 'next/link';
|
|
6
5
|
import { readableColor } from 'polished';
|
|
7
6
|
import React, { memo, useMemo } from 'react';
|
|
8
7
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -48,7 +47,7 @@ const SetupGuide = memo(() => {
|
|
|
48
47
|
<Trans
|
|
49
48
|
components={[
|
|
50
49
|
<span key="0" />,
|
|
51
|
-
<
|
|
50
|
+
<a href={'https://ollama.com/download'} key="1" rel="noreferrer" target="_blank" />,
|
|
52
51
|
]}
|
|
53
52
|
i18nKey={'OllamaSetupGuide.install.description'}
|
|
54
53
|
ns={'components'}
|
|
@@ -94,7 +93,7 @@ const SetupGuide = memo(() => {
|
|
|
94
93
|
<Trans
|
|
95
94
|
components={[
|
|
96
95
|
<span key="0" />,
|
|
97
|
-
<
|
|
96
|
+
<a href={'https://ollama.com/download'} key="1" rel="noreferrer" target="_blank" />,
|
|
98
97
|
]}
|
|
99
98
|
i18nKey={'OllamaSetupGuide.install.description'}
|
|
100
99
|
ns={'components'}
|
|
@@ -139,9 +138,11 @@ const SetupGuide = memo(() => {
|
|
|
139
138
|
<Trans
|
|
140
139
|
components={[
|
|
141
140
|
<span key="0" />,
|
|
142
|
-
<
|
|
141
|
+
<a
|
|
143
142
|
href={'https://github.com/ollama/ollama/blob/main/docs/linux.md'}
|
|
144
143
|
key="1"
|
|
144
|
+
rel="noreferrer"
|
|
145
|
+
target="_blank"
|
|
145
146
|
/>,
|
|
146
147
|
]}
|
|
147
148
|
i18nKey={'OllamaSetupGuide.install.linux.manual'}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { type Loader } from 'next/dist/shared/lib/dynamic';
|
|
4
|
-
import dynamic from 'next/dynamic';
|
|
4
|
+
import dynamic from '@/libs/next/dynamic';
|
|
5
5
|
import { type FC, memo } from 'react';
|
|
6
6
|
|
|
7
7
|
import MobileSwitchLoading from '@/features/MobileSwitchLoading';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { type Loader } from 'next/dist/shared/lib/dynamic';
|
|
4
|
-
import dynamic from 'next/dynamic';
|
|
4
|
+
import dynamic from '@/libs/next/dynamic';
|
|
5
5
|
import { type FC, type PropsWithChildren, memo } from 'react';
|
|
6
6
|
|
|
7
7
|
import MobileSwitchLoading from '@/features/MobileSwitchLoading';
|
|
@@ -1,20 +1,37 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
3
|
+
import { type AnchorHTMLAttributes, type FC } from 'react';
|
|
4
|
+
import { Link } from 'react-router-dom';
|
|
5
5
|
|
|
6
6
|
const EXTERNAL_HREF_REGEX = /https?:\/\//;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
9
|
+
href?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const A: FC<LinkProps> = ({ href = '', children, ...props }) => {
|
|
9
13
|
const isOutbound = EXTERNAL_HREF_REGEX.test(href as string);
|
|
10
14
|
const isOfficial = String(href).includes('lobechat') || String(href).includes('lobehub');
|
|
15
|
+
|
|
16
|
+
// External links use native <a> tag
|
|
17
|
+
if (isOutbound) {
|
|
18
|
+
return (
|
|
19
|
+
<a
|
|
20
|
+
href={href}
|
|
21
|
+
rel={isOfficial ? 'noreferrer' : 'nofollow noreferrer'}
|
|
22
|
+
target="_blank"
|
|
23
|
+
{...props}
|
|
24
|
+
>
|
|
25
|
+
{children}
|
|
26
|
+
</a>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Internal links use React Router
|
|
11
31
|
return (
|
|
12
|
-
<Link
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
target={isOutbound ? '_blank' : undefined}
|
|
16
|
-
{...props}
|
|
17
|
-
/>
|
|
32
|
+
<Link to={href} {...props}>
|
|
33
|
+
{children}
|
|
34
|
+
</Link>
|
|
18
35
|
);
|
|
19
36
|
};
|
|
20
37
|
|
|
@@ -5,7 +5,6 @@ import { Button, Center, Flexbox, Icon, lobeStaticStylish } from '@lobehub/ui';
|
|
|
5
5
|
import { useSize } from 'ahooks';
|
|
6
6
|
import { createStaticStyles, cx } from 'antd-style';
|
|
7
7
|
import { ArrowRightIcon } from 'lucide-react';
|
|
8
|
-
import Link from 'next/link';
|
|
9
8
|
import { memo, useEffect, useRef, useState } from 'react';
|
|
10
9
|
import Marquee from 'react-fast-marquee';
|
|
11
10
|
import { useTranslation } from 'react-i18next';
|
|
@@ -83,11 +82,11 @@ const CloudBanner = memo<{ mobile?: boolean }>(({ mobile }) => {
|
|
|
83
82
|
<div className={styles.background} />
|
|
84
83
|
<Center className={styles.wrapper} gap={16} horizontal width={'100%'}>
|
|
85
84
|
{isTruncated ? <Marquee pauseOnHover>{content}</Marquee> : content}
|
|
86
|
-
<
|
|
85
|
+
<a href={`${OFFICIAL_URL}?utm_source=${UTM_SOURCE}&utm_medium=banner`} rel="noreferrer" target="_blank">
|
|
87
86
|
<Button size={'small'} type="primary">
|
|
88
87
|
{t('alert.cloud.action')} <Icon icon={ArrowRightIcon} />
|
|
89
88
|
</Button>
|
|
90
|
-
</
|
|
89
|
+
</a>
|
|
91
90
|
</Center>
|
|
92
91
|
</Center>
|
|
93
92
|
);
|