4.8.10 test (#2433)

* perf: node template ui

* perf: select tool path load error

* pay i18n

* i18n

* perf: oneapi code

* perf: doc

* node templates

* perf: usage table role

* feat: count vector total by datasetId

* perf: user select tip and tempalte market ui

* i18n

* perf: sso config tip
This commit is contained in:
Archer
2024-08-20 18:31:40 +08:00
committed by GitHub
parent 40b1d22d9d
commit 26d800981c
27 changed files with 345 additions and 160 deletions

View File

@@ -17,7 +17,8 @@ import { GetSystemPluginTemplatesBody } from '@/pages/api/core/app/plugin/getSys
/* ============ team plugin ============== */
export const getTeamPlugTemplates = (data?: ListAppBody) =>
getMyApps(data).then((res) =>
res.map<NodeTemplateListItemType>((app) => ({
res.map((app) => ({
tmbId: app.tmbId,
id: app._id,
pluginId: app._id,
isFolder: app.type === AppTypeEnum.folder || app.type === AppTypeEnum.httpPlugin,

View File

@@ -6,6 +6,8 @@ import type { UserType } from '@fastgpt/global/support/user/type.d';
import { getTokenLogin, putUserInfo } from '@/web/support/user/api';
import { FeTeamPlanStatusType } from '@fastgpt/global/support/wallet/sub/type';
import { getTeamPlanStatus } from './team/api';
import { getTeamMembers } from '@/web/support/user/team/api';
import { TeamMemberItemType } from '@fastgpt/global/support/user/team/type';
type State = {
systemMsgReadId: string;
@@ -18,6 +20,9 @@ type State = {
teamPlanStatus: FeTeamPlanStatusType | null;
initTeamPlanStatus: () => Promise<any>;
teamMembers: TeamMemberItemType[];
loadAndGetTeamMembers: () => Promise<TeamMemberItemType[]>;
};
export const useUserStore = create<State>()(
@@ -78,6 +83,17 @@ export const useUserStore = create<State>()(
});
return res;
});
},
teamMembers: [],
loadAndGetTeamMembers: async () => {
if (get().teamMembers.length) return Promise.resolve(get().teamMembers);
const res = await getTeamMembers();
set((state) => {
state.teamMembers = res;
});
return res;
}
})),
{