feat: sync api collection will refresh title;perf: invite link ux (#4237)

* update queue

* feat: sync api collection will refresh title

* sync collection

* remove lock

* perf: invite link ux
This commit is contained in:
Archer
2025-03-19 21:03:21 +08:00
committed by archer
parent 75c1631670
commit 6eae841e4a
44 changed files with 372 additions and 331 deletions

View File

@@ -22,7 +22,13 @@ import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
import { useTranslation } from 'next-i18next';
import { useForm } from 'react-hook-form';
function CreateInvitationModal({ onClose }: { onClose: (linkId?: string) => void }) {
function CreateInvitationModal({
onSuccess,
onClose
}: {
onSuccess: (linkId: string) => void;
onClose: () => void;
}) {
const { t } = useTranslation();
const expiresOptions: Array<{ label: string; value: InvitationLinkExpiresType }> = [
{ label: t('account_team:30mins'), value: '30m' }, // 30 mins
@@ -43,12 +49,11 @@ function CreateInvitationModal({ onClose }: { onClose: (linkId?: string) => void
const { runAsync: createInvitationLink, loading } = useRequest2(postCreateInvitationLink, {
manual: true,
successToast: t('common:common.Create Success'),
errorToast: t('common:common.Create Failed'),
onSuccess: (data) => {
onClose(data);
},
onFinally: () => onClose()
onSuccess(data);
onClose();
}
});
return (