feat: phone slider

This commit is contained in:
archer
2023-07-26 11:59:12 +08:00
parent 248be38939
commit ffdef41bf2
24 changed files with 275 additions and 166 deletions

View File

@@ -69,7 +69,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
return formatPrice(files.reduce((sum, file) => sum + file.tokens, 0) * unitPrice);
}, [files, unitPrice]);
const { openConfirm, ConfirmChild } = useConfirm({
const { openConfirm, ConfirmModal } = useConfirm({
content: `该任务无法终止,需要一定时间生成索引,请确认导入。如果余额不足,未完成的任务会被暂停,充值后可继续进行。`
});
@@ -455,7 +455,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
)}
</Box>
)}
<ConfirmChild />
<ConfirmModal />
</Box>
);
};

View File

@@ -39,7 +39,7 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
);
const emptyFiles = useMemo(() => files.length === 0, [files]);
const { openConfirm, ConfirmChild } = useConfirm({
const { openConfirm, ConfirmModal } = useConfirm({
content: `该任务无法终止,需要一定时间生成索引,请确认导入。如果余额不足,未完成的任务会被暂停,充值后可继续进行。`
});
@@ -234,7 +234,7 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
</Box>
</Box>
)}
<ConfirmChild />
<ConfirmModal />
</Box>
);
};

View File

@@ -71,7 +71,7 @@ const QAImport = ({ kbId }: { kbId: string }) => {
return formatPrice(files.reduce((sum, file) => sum + file.tokens, 0) * unitPrice * 1.3);
}, [files, unitPrice]);
const { openConfirm, ConfirmChild } = useConfirm({
const { openConfirm, ConfirmModal } = useConfirm({
content: `该任务无法终止!导入后会自动调用大模型生成问答对,会有一些细节丢失,请确认!如果余额不足,未完成的任务会被暂停。`
});
@@ -446,7 +446,7 @@ const QAImport = ({ kbId }: { kbId: string }) => {
)}
</Box>
)}
<ConfirmChild />
<ConfirmModal />
</Box>
);
};

View File

@@ -40,7 +40,7 @@ const Info = (
const [btnLoading, setBtnLoading] = useState(false);
const [refresh, setRefresh] = useState(false);
const { openConfirm, ConfirmChild } = useConfirm({
const { openConfirm, ConfirmModal } = useConfirm({
content: '确认删除该知识库?数据将无法恢复,请确认!'
});
@@ -251,7 +251,7 @@ const Info = (
/>
</Flex>
<File onSelect={onSelectFile} />
<ConfirmChild />
<ConfirmModal />
</Box>
);
};

View File

@@ -18,7 +18,7 @@ const Kb = () => {
const theme = useTheme();
const router = useRouter();
const { toast } = useToast();
const { openConfirm, ConfirmChild } = useConfirm({
const { openConfirm, ConfirmModal } = useConfirm({
title: '删除提示',
content: '确认删除该知识库?'
});
@@ -152,7 +152,7 @@ const Kb = () => {
</Box>
</Flex>
)}
<ConfirmChild />
<ConfirmModal />
</PageContainer>
);
};