Skip to content

Commit b2a59b4

Browse files
newfish-cmykc121914yu
authored andcommitted
adjust dashborad page (#5872)
* create page * create page * create button * router name * bot * template * create page * mobile * toolfolder * fix * fix * fix build * split tool select * img
1 parent 25b14b2 commit b2a59b4

File tree

96 files changed

+3423
-1920
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+3423
-1920
lines changed

.claude/design/i18n优化实施计划.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export default i18n;
133133
export const pageNamespaces: Record<string, string[]> = {
134134
// 应用相关
135135
'/app/detail': ['app', 'chat', 'workflow', 'publish', 'file'],
136-
'/dashboard/apps': ['app'],
136+
'/dashboard/agent': ['app'],
137137

138138
// 数据集相关
139139
'/dataset/list': ['dataset'],
@@ -583,7 +583,7 @@ P0 - 高频访问页面 (优先迁移):
583583
- /app/detail (应用编辑页)
584584
- /dataset/list (数据集列表)
585585
- /dataset/detail (数据集详情)
586-
- /dashboard/apps (应用列表)
586+
- /dashboard/agent (应用列表)
587587

588588
P1 - 中频访问页面:
589589
- /account/setting (账户设置)
@@ -810,7 +810,7 @@ import { test, expect } from '@playwright/test';
810810
811811
test.describe('i18n Performance', () => {
812812
test('should load translations within 200ms', async ({ page }) => {
813-
await page.goto('http://localhost:3000/dashboard/apps');
813+
await page.goto('http://localhost:3000/dashboard/agent');
814814
815815
const startTime = Date.now();
816816
@@ -826,7 +826,7 @@ test.describe('i18n Performance', () => {
826826
});
827827

828828
test('should switch routes without translation flash', async ({ page }) => {
829-
await page.goto('http://localhost:3000/dashboard/apps');
829+
await page.goto('http://localhost:3000/dashboard/agent');
830830
await page.waitForLoadState('networkidle');
831831

832832
// 点击链接切换路由

.claude/design/路由性能诊断报告.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export async function getServerSideProps(content: any) {
8282
};
8383
}
8484

85-
// projects/app/src/pages/dashboard/apps/index.tsx:344
85+
// projects/app/src/pages/dashboard/agent/index.tsx:344
8686
export async function getServerSideProps(content: any) {
8787
return {
8888
props: {
@@ -317,7 +317,7 @@ const { loading: loadingApp, runAsync: reloadApp } = useRequest2(
317317
refreshDeps: [appId],
318318
errorToast: t('common:core.app.error.Get app failed'),
319319
onError(err: any) {
320-
router.replace('/dashboard/apps');
320+
router.replace('/dashboard/agent');
321321
},
322322
onSuccess(res) {
323323
setAppDetail(res);
@@ -585,7 +585,7 @@ import i18n from './client';
585585
const pageNamespaces = {
586586
'/app/detail': ['app', 'chat', 'workflow'],
587587
'/dataset/list': ['dataset'],
588-
'/dashboard/apps': ['app'],
588+
'/dashboard/agent': ['app'],
589589
// ... 更多映射
590590
};
591591
@@ -1321,7 +1321,7 @@ import { test, expect } from '@playwright/test';
13211321
13221322
test.describe('Route Switching Performance', () => {
13231323
test('should switch routes within 500ms', async ({ page }) => {
1324-
await page.goto('http://localhost:3000/dashboard/apps');
1324+
await page.goto('http://localhost:3000/dashboard/agent');
13251325
13261326
// 等待页面完全加载
13271327
await page.waitForLoadState('networkidle');

document/content/docs/introduction/development/sealos.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ FastGPT 商业版共包含了2个应用(fastgpt, fastgpt-plus)和2个数据
155155
SYSTEM_NAME=FastGPT
156156
SYSTEM_DESCRIPTION=
157157
SYSTEM_FAVICON=/favicon.ico
158-
HOME_URL=/dashboard/apps
158+
HOME_URL=/dashboard/agent
159159
```
160160

161161
SYSTEM_FAVICON 可以是一个网络地址

packages/global/common/system/config/constants.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ export enum SystemConfigsTypeEnum {
22
fastgpt = 'fastgpt',
33
fastgptPro = 'fastgptPro',
44
systemMsgModal = 'systemMsgModal',
5-
license = 'license'
5+
license = 'license',
6+
operationalAd = 'operationalAd'
67
}
78

89
export const SystemConfigsTypeMap = {
@@ -17,5 +18,8 @@ export const SystemConfigsTypeMap = {
1718
},
1819
[SystemConfigsTypeEnum.license]: {
1920
label: 'license'
21+
},
22+
[SystemConfigsTypeEnum.operationalAd]: {
23+
label: 'operationalAd'
2024
}
2125
};

packages/global/common/system/types/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export type FastGPTFeConfigsType = {
5353
googleClientVerKey?: string;
5454
mcpServerProxyEndpoint?: string;
5555
chineseRedirectUrl?: string;
56+
botIframeUrl?: string;
5657

5758
show_emptyChat?: boolean;
5859
show_appStore?: boolean;

packages/global/core/app/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export enum AppTypeEnum {
1010
folder = 'folder',
1111
toolFolder = 'toolFolder',
1212
simple = 'simple',
13+
agent = 'agent',
1314
workflow = 'advanced',
1415
plugin = 'plugin',
1516
toolSet = 'toolSet', // 'mcp'

packages/service/support/user/audit/util.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ import { retryFn } from '@fastgpt/global/common/system/utils';
1212

1313
export function getI18nAppType(type: AppTypeEnum): string {
1414
if (type === AppTypeEnum.folder) return i18nT('account_team:type.Folder');
15-
if (type === AppTypeEnum.simple) return i18nT('account_team:type.Simple bot');
15+
if (type === AppTypeEnum.simple) return i18nT('app:type.Chat_Agent');
1616
if (type === AppTypeEnum.workflow) return i18nT('account_team:type.Workflow bot');
17-
if (type === AppTypeEnum.plugin) return i18nT('account_team:type.Plugin');
17+
if (type === AppTypeEnum.plugin) return i18nT('app:toolType_workflow');
1818
if (type === AppTypeEnum.httpPlugin) return i18nT('account_team:type.Http plugin');
19-
if (type === AppTypeEnum.httpToolSet) return i18nT('account_team:type.Http tool set');
20-
if (type === AppTypeEnum.toolSet) return i18nT('account_team:type.Tool set');
21-
if (type === AppTypeEnum.tool) return i18nT('account_team:type.Tool');
19+
if (type === AppTypeEnum.httpToolSet) return i18nT('app:toolType_http');
20+
if (type === AppTypeEnum.toolSet) return i18nT('app:toolType_mcp');
21+
if (type === AppTypeEnum.tool) return i18nT('app:toolType_mcp');
2222
return i18nT('common:UnKnow');
2323
}
2424

packages/web/components/common/Icon/constants.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,14 @@ export const iconPaths = {
9393
'common/playFill': () => import('./icons/common/playFill.svg'),
9494
'common/playLight': () => import('./icons/common/playLight.svg'),
9595
'common/publishFill': () => import('./icons/common/publishFill.svg'),
96+
'common/refresh': () => import('./icons/common/refresh.svg'),
9697
'common/refreshLight': () => import('./icons/common/refreshLight.svg'),
9798
'common/resultLight': () => import('./icons/common/resultLight.svg'),
9899
'common/retryLight': () => import('./icons/common/retryLight.svg'),
99100
'common/rightArrow': () => import('./icons/common/rightArrow.svg'),
100101
'common/rightArrowFill': () => import('./icons/common/rightArrowFill.svg'),
101102
'common/rightArrowLight': () => import('./icons/common/rightArrowLight.svg'),
103+
'common/rocket': () => import('./icons/common/rocket.svg'),
102104
'common/routePushLight': () => import('./icons/common/routePushLight.svg'),
103105
'common/running': () => import('./icons/common/running.svg'),
104106
'common/saveFill': () => import('./icons/common/saveFill.svg'),
@@ -115,7 +117,7 @@ export const iconPaths = {
115117
'common/text/t': () => import('./icons/common/text/t.svg'),
116118
'common/thirdParty': () => import('./icons/common/thirdParty.svg'),
117119
'common/tickFill': () => import('./icons/common/tickFill.svg'),
118-
'common/plugin': () => import('./icons/common/toolkit.svg'),
120+
'common/toolkit': () => import('./icons/common/toolkit.svg'),
119121
'common/trash': () => import('./icons/common/trash.svg'),
120122
'common/upRightArrowLight': () => import('./icons/common/upRightArrowLight.svg'),
121123
'common/uploadFileFill': () => import('./icons/common/uploadFileFill.svg'),
@@ -131,10 +133,13 @@ export const iconPaths = {
131133
'common/wecom': () => import('./icons/common/wecom.svg'),
132134
configmap: () => import('./icons/configmap.svg'),
133135
copy: () => import('./icons/copy.svg'),
136+
'core/app/agent': () => import('./icons/core/app/agent.svg'),
137+
'core/app/aiAgent': () => import('./icons/core/app/aiAgent.svg'),
134138
'core/app/aiFill': () => import('./icons/core/app/aiFill.svg'),
135139
'core/app/aiLight': () => import('./icons/core/app/aiLight.svg'),
136140
'core/app/aiLightSmall': () => import('./icons/core/app/aiLightSmall.svg'),
137141
'core/app/appApiLight': () => import('./icons/core/app/appApiLight.svg'),
142+
'core/app/create': () => import('./icons/core/app/create.svg'),
138143
'core/app/customFeedback': () => import('./icons/core/app/customFeedback.svg'),
139144
'core/app/headphones': () => import('./icons/core/app/headphones.svg'),
140145
'core/app/inputGuides': () => import('./icons/core/app/inputGuides.svg'),
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)