feat: context box

This commit is contained in:
archer
2023-07-23 22:58:20 +08:00
parent 6fd83e1e75
commit 6fc6c99477
9 changed files with 88 additions and 67 deletions

View File

@@ -115,7 +115,6 @@ const Share = ({ appId }: { appId: string }) => {
<Thead>
<Tr>
<Th></Th>
<Th></Th>
<Th></Th>
<Th>使</Th>
<Th></Th>
@@ -125,7 +124,6 @@ const Share = ({ appId }: { appId: string }) => {
{shareChatList.map((item) => (
<Tr key={item._id}>
<Td>{item.name}</Td>
<Td>{item.maxContext}</Td>
<Td>{formatPrice(item.total)}</Td>
<Td>{item.lastTime ? formatTimeToChatTime(item.lastTime) : '未使用'}</Td>
<Td>
@@ -197,42 +195,6 @@ const Share = ({ appId }: { appId: string }) => {
/>
</Flex>
</FormControl>
<FormControl mt={9}>
<Flex alignItems={'center'}>
<Box flex={'0 0 120px'} w={0}>
</Box>
<Slider
aria-label="slider-ex-1"
min={1}
max={20}
step={1}
value={getShareChatValues('maxContext')}
onChange={(e) => {
setShareChatValues('maxContext', e);
setRefresh(!refresh);
}}
>
<SliderMark
value={getShareChatValues('maxContext')}
textAlign="center"
bg="myBlue.600"
color="white"
w={'18px'}
h={'18px'}
borderRadius={'100px'}
fontSize={'xs'}
transform={'translate(-50%, -200%)'}
>
{getShareChatValues('maxContext')}
</SliderMark>
<SliderTrack>
<SliderFilledTrack bg={'myBlue.700'} />
</SliderTrack>
<SliderThumb />
</Slider>
</Flex>
</FormControl>
</ModalBody>
<ModalFooter>