mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-24 22:03:54 +00:00
ui
This commit is contained in:
@@ -57,7 +57,7 @@ const Layout = ({ children }: { children: JSX.Element }) => {
|
||||
|
||||
const { data: unread = 0 } = useQuery(['getUnreadCount'], getUnreadCount, {
|
||||
enabled: !!userInfo,
|
||||
refetchInterval: 5000
|
||||
refetchInterval: 10000
|
||||
});
|
||||
|
||||
return (
|
||||
|
@@ -11,7 +11,7 @@ export interface Props extends GridProps {
|
||||
onChange: (id: string) => void;
|
||||
}
|
||||
|
||||
const SlideTabs = ({ list, size = 'md', activeId, onChange, ...props }: Props) => {
|
||||
const SideTabs = ({ list, size = 'md', activeId, onChange, ...props }: Props) => {
|
||||
const sizeMap = useMemo(() => {
|
||||
switch (size) {
|
||||
case 'sm':
|
||||
@@ -68,4 +68,4 @@ const SlideTabs = ({ list, size = 'md', activeId, onChange, ...props }: Props) =
|
||||
);
|
||||
};
|
||||
|
||||
export default React.memo(SlideTabs);
|
||||
export default React.memo(SideTabs);
|
@@ -110,8 +110,6 @@ const TokenUsage = ({ appId }: { appId: string }) => {
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
boundaryGap: false,
|
||||
splitNumber: 5,
|
||||
max: Math.max(...data.map((item) => item.tokenLen)),
|
||||
min: 0
|
||||
},
|
||||
@@ -180,12 +178,6 @@ const TokenUsage = ({ appId }: { appId: string }) => {
|
||||
myChart.current.setOption(option);
|
||||
}, [data, option]);
|
||||
|
||||
// limit changed, update
|
||||
useEffect(() => {
|
||||
if (!myChart.current || !myChart?.current?.getOption()) return;
|
||||
myChart.current.setOption(option);
|
||||
}, [option]);
|
||||
|
||||
// resize chart
|
||||
useEffect(() => {
|
||||
if (!myChart.current || !myChart.current.getOption()) return;
|
||||
|
@@ -6,7 +6,7 @@ import dynamic from 'next/dynamic';
|
||||
import { defaultApp } from '@/constants/model';
|
||||
|
||||
import Tabs from '@/components/Tabs';
|
||||
import SlideTabs from '@/components/SlideTabs';
|
||||
import SideTabs from '@/components/SideTabs';
|
||||
import Settings from './components/Settings';
|
||||
import Avatar from '@/components/Avatar';
|
||||
import MyIcon from '@/components/Icon';
|
||||
@@ -81,7 +81,7 @@ const AppDetail = ({ currentTab }: { currentTab: `${TabEnum}` }) => {
|
||||
{appDetail.name}
|
||||
</Box>
|
||||
</Flex>
|
||||
<SlideTabs
|
||||
<SideTabs
|
||||
flex={1}
|
||||
mx={'auto'}
|
||||
mt={2}
|
||||
|
@@ -23,6 +23,7 @@ import PageContainer from '@/components/PageContainer';
|
||||
import Avatar from '@/components/Avatar';
|
||||
const CreateModal = dynamic(() => import('./component/CreateModal'));
|
||||
import styles from './index.module.scss';
|
||||
import MyTooltip from '@/components/MyTooltip';
|
||||
|
||||
const MyApps = () => {
|
||||
const { toast } = useToast();
|
||||
@@ -117,7 +118,7 @@ const MyApps = () => {
|
||||
aria-label={'delete'}
|
||||
display={['', 'none']}
|
||||
_hover={{
|
||||
bg: 'myGray.100'
|
||||
bg: 'red.100'
|
||||
}}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
@@ -140,7 +141,11 @@ const MyApps = () => {
|
||||
right={4}
|
||||
bottom={4}
|
||||
size={'sm'}
|
||||
icon={<MyIcon name={'chatLight'} w={'14px'} />}
|
||||
icon={
|
||||
<MyTooltip label={'去聊天'}>
|
||||
<MyIcon name={'chatLight'} w={'14px'} />
|
||||
</MyTooltip>
|
||||
}
|
||||
variant={'base'}
|
||||
borderRadius={'md'}
|
||||
aria-label={'delete'}
|
||||
|
@@ -45,7 +45,7 @@ const BillSchema = new Schema({
|
||||
try {
|
||||
BillSchema.index({ userId: 1 });
|
||||
// BillSchema.index({ time: -1 });
|
||||
// BillSchema.index({ time: 1 }, { expireAfterSeconds: 90 * 24 * 60 });
|
||||
BillSchema.index({ time: 1 }, { expireAfterSeconds: 90 * 24 * 60 });
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
Reference in New Issue
Block a user