mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-01 03:48:24 +00:00
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:
@@ -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,
|
||||
|
@@ -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;
|
||||
}
|
||||
})),
|
||||
{
|
||||
|
Reference in New Issue
Block a user