mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-25 20:02:47 +00:00
* perf: zod with app log (#6083) * perf: safe decode * perf: zod with app log * fix: text * remove log * rename field * refactor: improve like/dislike interaction (#6080) * refactor: improve like/dislike interaction * button style & merge status * perf * fix * i18n * feedback ui * format * api optimize * openapi * read status --------- Co-authored-by: archer <545436317@qq.com> * perf: remove empty chat * perf: delete resource tip * fix: confirm * feedback filter * fix: ts * perf: linker scroll * perf: feedback ui * fix: plugin file input store * fix: max tokens * update comment * fix: condition value type * fix feedback (#6095) * fix feedback * text * list * fix: versionid --------- Co-authored-by: archer <545436317@qq.com> * fix: chat setting render;export logs filter * add test * perf: log list api * perf: redirect check * perf: log list * create ui * create ui --------- Co-authored-by: heheer <heheer@sealos.io>
47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import { Box, type BoxProps } from '@chakra-ui/react';
|
|
import { useConfirm } from '@fastgpt/web/hooks/useConfirm';
|
|
import { useToast } from '@fastgpt/web/hooks/useToast';
|
|
import React from 'react';
|
|
import { useTranslation } from 'next-i18next';
|
|
|
|
const ResumeInherit = ({
|
|
onResume,
|
|
...props
|
|
}: BoxProps & {
|
|
onResume?: () => Promise<any> | any;
|
|
}) => {
|
|
const { t } = useTranslation();
|
|
const { toast } = useToast();
|
|
const { ConfirmModal: CommonConfirmModal, openConfirm: openCommonConfirm } = useConfirm({});
|
|
|
|
return onResume ? (
|
|
<Box display={'inline'} fontSize={'sm'} {...props}>
|
|
{t('common:permission.No InheritPermission')}
|
|
<Box
|
|
display={'inline'}
|
|
textDecoration={'underline'}
|
|
cursor={'pointer'}
|
|
_hover={{ color: 'primary.600' }}
|
|
onClick={() => {
|
|
openCommonConfirm({
|
|
onConfirm: () =>
|
|
onResume()?.then(() => {
|
|
toast({
|
|
title: t('common:permission.Resume InheritPermission Success'),
|
|
status: 'success'
|
|
});
|
|
}),
|
|
customContent: t('common:permission.Resume InheritPermission Confirm')
|
|
})();
|
|
}}
|
|
>
|
|
{t('common:click_to_resume')}
|
|
</Box>
|
|
|
|
<CommonConfirmModal />
|
|
</Box>
|
|
) : null;
|
|
};
|
|
|
|
export default ResumeInherit;
|